diff --git a/qubesmanager/settings.py b/qubesmanager/settings.py index 4cca8bf5..429ae274 100755 --- a/qubesmanager/settings.py +++ b/qubesmanager/settings.py @@ -730,6 +730,11 @@ def __init_advanced_tab__(self): self.seamless_on_button.clicked.connect(self.enable_seamless) self.seamless_off_button.clicked.connect(self.disable_seamless) + if hasattr(self.vm, "template_for_dispvms"): + self.dvm_template_checkbox.setChecked(self.vm.template_for_dispvms) + else: + self.dvm_template_checkbox.setVisible(False) + def enable_seamless(self): self.vm.run_service_for_stdio("qubes.SetGuiMode", input=b'SEAMLESS') @@ -785,6 +790,18 @@ def __apply_advanced_tab__(self): except Exception as ex: # pylint: disable=broad-except msg.append(str(ex)) + if getattr(self.vm, "template_for_dispvms", False) != \ + self.dvm_template_checkbox.isChecked(): + try: + self.vm.template_for_dispvms = \ + self.dvm_template_checkbox.isChecked() + if self.dvm_template_checkbox.isChecked(): + self.vm.features["appmenus-dispvm"] = True + else: + del self.vm.features["appmenus-dispvm"] + except Exception as ex: # pylint: disable=broad-except + msg.append(str(ex)) + return msg def include_in_balancing_changed(self, state): diff --git a/ui/settingsdlg.ui b/ui/settingsdlg.ui index e0c0c482..4c04ce4c 100644 --- a/ui/settingsdlg.ui +++ b/ui/settingsdlg.ui @@ -792,7 +792,7 @@ border-width: 1px; 15 - + Default DispVM: @@ -802,17 +802,17 @@ border-width: 1px; - + - + Boot qube from CDROM - + @@ -838,6 +838,16 @@ The qube must be running to disable seamless mode; this setting is not persisten + + + + + + + Allow starting DisposableVMs from this qube + + +