Moved debug mode checkbox to advanced settings

It really had no place in Basic settings, and will free up space for future
settings.
This commit is contained in:
Marta Marczykowska-Górecka 2019-12-11 23:22:32 +01:00
parent 5f86660305
commit 4298de6564
No known key found for this signature in database
GPG Key ID: 9A752C30B26FD04B
2 changed files with 30 additions and 31 deletions

View File

@ -395,12 +395,6 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog):
self.include_in_backups.setChecked(self.vm.include_in_backups)
try:
self.run_in_debug_mode.setChecked(self.vm.debug)
self.run_in_debug_mode.setVisible(True)
except AttributeError:
self.run_in_debug_mode.setVisible(False)
try:
self.autostart_vm.setChecked(self.vm.autostart)
self.autostart_vm.setVisible(True)
@ -477,14 +471,6 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog):
except qubesadmin.exc.QubesException as ex:
msg.append(str(ex))
# run_in_debug_mode
try:
if self.run_in_debug_mode.isVisible():
if self.vm.debug != self.run_in_debug_mode.isChecked():
self.vm.debug = self.run_in_debug_mode.isChecked()
except qubesadmin.exc.QubesException as ex:
msg.append(str(ex))
# autostart_vm
try:
if self.autostart_vm.isVisible():
@ -732,6 +718,12 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog):
"NetVM by the following qubes:\n") +
"\n".join(domains_using))
try:
self.run_in_debug_mode.setChecked(self.vm.debug)
self.run_in_debug_mode.setVisible(True)
except AttributeError:
self.run_in_debug_mode.setVisible(False)
def enable_seamless(self):
self.vm.run_service_for_stdio("qubes.SetGuiMode", input=b'SEAMLESS')
@ -810,6 +802,14 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog):
except Exception as ex: # pylint: disable=broad-except
msg.append(str(ex))
# run_in_debug_mode
try:
if self.run_in_debug_mode.isVisible():
if self.vm.debug != self.run_in_debug_mode.isChecked():
self.vm.debug = self.run_in_debug_mode.isChecked()
except qubesadmin.exc.QubesException as ex:
msg.append(str(ex))
return msg
def include_in_balancing_changed(self, state):
@ -1074,12 +1074,12 @@ class VMSettingsWindow(ui_settingsdlg.Ui_SettingsDialog, QtWidgets.QDialog):
self.service_line_edit.addItem("")
supported_services = []
supported_services = set()
service_prefix = "supported-service."
for feature in self.vm.features:
if feature.startswith(service_prefix):
supported_services.append(feature[len(service_prefix):])
supported_services.add(feature[len(service_prefix):])
if getattr(self.vm, "template", None):
for feature in self.vm.template.features:
if feature.startswith(service_prefix):

View File

@ -29,7 +29,7 @@
<locale language="English" country="UnitedStates"/>
</property>
<property name="currentIndex">
<number>5</number>
<number>1</number>
</property>
<widget class="QWidget" name="basic_tab">
<property name="locale">
@ -373,13 +373,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="run_in_debug_mode">
<property name="text">
<string>Run in debug mode</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="0" colspan="3">
@ -813,14 +806,14 @@ border-width: 1px;</string>
<property name="topMargin">
<number>15</number>
</property>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QCheckBox" name="provides_network_checkbox">
<property name="text">
<string>Provides network</string>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QCheckBox" name="dvm_template_checkbox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Allows using this qube as a template for DisposableVMs. The DisposableVMs will inherit the VM's state (configuration, installed programs etc.), but their state will not persist between restarts. &lt;/p&gt;&lt;p&gt;Setting this option will cause this qube to be listed as an option in the &amp;quot;Default DisposableVM Template&amp;quot; dropdown for all other qubes. &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -830,14 +823,14 @@ border-width: 1px;</string>
</property>
</widget>
</item>
<item row="7" column="0" colspan="2">
<item row="8" column="0" colspan="2">
<widget class="QPushButton" name="boot_from_device_button">
<property name="text">
<string>Boot qube from CDROM</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="2">
<item row="9" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QPushButton" name="seamless_on_button">
@ -863,7 +856,7 @@ The qube must be running to disable seamless mode; this setting is not persisten
</item>
</layout>
</item>
<item row="5" column="0" colspan="2">
<item row="6" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_26">
@ -893,6 +886,13 @@ The qube must be running to disable seamless mode; this setting is not persisten
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="run_in_debug_mode">
<property name="text">
<string>Run in debug mode</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -1322,7 +1322,7 @@ The qube must be running to disable seamless mode; this setting is not persisten
<string>This qube has direct network access and Qubes Firewall settings will not be used. Configure other qubes' network access in their network settings or in a dedicated firewall qube.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
<bool>true</bool>
</property>
</widget>
</item>
@ -1564,7 +1564,6 @@ The qube must be running to disable seamless mode; this setting is not persisten
<tabstop>template_name</tabstop>
<tabstop>netVM</tabstop>
<tabstop>include_in_backups</tabstop>
<tabstop>run_in_debug_mode</tabstop>
<tabstop>autostart_vm</tabstop>
<tabstop>max_priv_storage</tabstop>
<tabstop>root_resize</tabstop>