diff --git a/qubesmanager/global_settings.py b/qubesmanager/global_settings.py
index e8ad420..cec533c 100644
--- a/qubesmanager/global_settings.py
+++ b/qubesmanager/global_settings.py
@@ -90,6 +90,15 @@ class GlobalSettingsWindow(ui_globalsettingsdlg.Ui_GlobalSettings,
filter_function=(lambda vm: vm.klass == 'TemplateVM')
)
+ # default dispvm
+ self.default_dispvm_vmlist, self.default_dispvm_idx = \
+ utils.prepare_vm_choice(
+ self.default_dispvm_combo,
+ self.qvm_collection, 'default_dispvm',
+ None,
+ (lambda vm: getattr(vm, 'template_for_dispvms', False))
+ )
+
def __apply_system_defaults__(self):
# upatevm
if self.qvm_collection.updatevm != \
@@ -119,6 +128,14 @@ class GlobalSettingsWindow(ui_globalsettingsdlg.Ui_GlobalSettings,
self.default_template_vmlist[
self.default_template_combo.currentIndex()]
+ # default_dispvm
+ if self.qvm_collection.default_dispvm != \
+ self.default_dispvm_vmlist[
+ self.default_dispvm_combo.currentIndex()]:
+ self.qvm_collection.default_dispvm = \
+ self.default_dispvm_vmlist[
+ self.default_dispvm_combo.currentIndex()]
+
def __init_kernel_defaults__(self):
self.kernels_list, self.kernels_idx = utils.prepare_kernel_choice(
self.default_kernel_combo, self.qvm_collection, 'default_kernel',
diff --git a/ui/globalsettingsdlg.ui b/ui/globalsettingsdlg.ui
index 7ade6e1..3e76bc3 100644
--- a/ui/globalsettingsdlg.ui
+++ b/ui/globalsettingsdlg.ui
@@ -6,8 +6,8 @@
0
0
- 651
- 386
+ 974
+ 587
@@ -81,6 +81,16 @@
-
+ -
+
+
+ Default DispVM:
+
+
+
+ -
+
+