Introducing 'Run in debug mode' option. (#537)

This commit is contained in:
Agnieszka Kostrzewa 2012-04-24 14:27:28 +02:00
parent a5a6e90e41
commit 6b22eb5a0f
2 changed files with 61 additions and 34 deletions

View File

@ -249,6 +249,12 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
self.include_in_backups.setChecked(self.vm.include_in_backups)
if hasattr(self.vm, 'debug'):
self.run_in_debug_mode.setVisible(True)
self.run_in_debug_mode.setChecked(self.vm.debug)
else:
self.run_in_debug_mode.setVisible(False)
#type
self.type_label.setText(self.vm.type)
@ -329,6 +335,13 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
#include in backups
if self.vm.include_in_backups != self.include_in_backups.isChecked():
self.vm.include_in_backups = self.include_in_backups.isChecked()
self.anything_changed = True
#run_in_debug_mode
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()
self.anything_changed = True
#max priv storage
priv_size = self.max_priv_storage.value()

View File

@ -29,7 +29,7 @@
<locale language="English" country="UnitedStates"/>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="basic_tab">
<property name="locale">
@ -59,13 +59,6 @@
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="vmlabel">
<property name="frame">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
@ -86,23 +79,41 @@
<item row="2" column="1">
<widget class="QComboBox" name="netVM"/>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="include_in_backups">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Include in backups by default</string>
</property>
<property name="checked">
<item row="0" column="2">
<widget class="QComboBox" name="vmlabel">
<property name="frame">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QCheckBox" name="include_in_backups">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Include in backups by default</string>
</property>
<property name="checked">
<bool>true</bool>
</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>
</layout>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QGroupBox" name="groupBox_4">
<property name="enabled">
<bool>true</bool>
@ -154,7 +165,7 @@
</layout>
</widget>
</item>
<item row="2" column="0" colspan="2">
<item row="3" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox">
<property name="enabled">
<bool>true</bool>
@ -202,7 +213,7 @@
</layout>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -215,12 +226,15 @@
</property>
</spacer>
</item>
<item row="1" column="1">
<item row="2" column="1">
<widget class="QGroupBox" name="networking_groupbox">
<property name="title">
<string>Networking</string>
</property>
<layout class="QFormLayout" name="formLayout_3">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_10">
<property name="text">
@ -228,19 +242,6 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="ip_label">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>---</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
@ -281,6 +282,19 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="ip_label">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>---</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>