small update to add "autostart" checkbox to the basic settings dialog

This commit is contained in:
Hansi 2014-05-17 19:21:00 +02:00 committed by Marek Marczykowski-Górecki
parent 2221dcee36
commit 44fe1cc845
2 changed files with 35 additions and 6 deletions

View File

@ -289,6 +289,12 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
else:
self.run_in_debug_mode.setVisible(False)
if hasattr(self.vm, 'autostart'):
self.autostart_vm.setVisible(True)
self.autostart_vm.setChecked(self.vm.autostart)
else:
self.autostart_vm.setVisible(False)
if hasattr(self.vm, 'seamless_gui_mode'):
self.seamless_gui.setVisible(True)
self.seamless_gui.setChecked(self.vm.seamless_gui_mode)
@ -405,6 +411,16 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
except Exception as ex:
msg.append(str(ex))
#autostart_vm
try:
if self.autostart_vm.isVisible():
if self.vm.autostart != self.autostart_vm.isChecked():
self.vm.autostart = self.autostart_vm.isChecked()
self.anything_changed = True
except Exception as ex:
msg.append(str(ex))
#seamless_gui
try:
if self.seamless_gui.isVisible():
if self.vm.seamless_gui_mode != self.seamless_gui.isChecked():

View File

@ -119,12 +119,23 @@
</item>
</layout>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="seamless_gui">
<property name="text">
<string>Seamless GUI</string>
</property>
</widget>
<item row="4" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QCheckBox" name="autostart_vm">
<property name="text">
<string>Start VM automatically on boot</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="seamless_gui">
<property name="text">
<string>Seamless GUI</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
@ -1140,6 +1151,8 @@
<tabstop>netVM</tabstop>
<tabstop>include_in_backups</tabstop>
<tabstop>run_in_debug_mode</tabstop>
<tabstop>autostart_vm</tabstop>
<tabstop>seamless_gui</tabstop>
<tabstop>max_priv_storage</tabstop>
<tabstop>init_mem</tabstop>
<tabstop>max_mem_size</tabstop>