Not allowing to modify devices of a running VM (ticket #523)
This commit is contained in:
parent
f928dab468
commit
5b09bf0bb1
@ -463,6 +463,13 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
|
|||||||
self.dmm_warning_adv.hide()
|
self.dmm_warning_adv.hide()
|
||||||
self.dmm_warning_dev.hide()
|
self.dmm_warning_dev.hide()
|
||||||
|
|
||||||
|
if self.vm.is_running():
|
||||||
|
self.dev_list.setEnabled(False)
|
||||||
|
self.turn_off_vm_to_modify_devs.setVisible(True)
|
||||||
|
else:
|
||||||
|
self.dev_list.setEnabled(True)
|
||||||
|
self.turn_off_vm_to_modify_devs.setVisible(False)
|
||||||
|
|
||||||
|
|
||||||
def __apply_devices_tab__(self):
|
def __apply_devices_tab__(self):
|
||||||
sth_changed = False
|
sth_changed = False
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<locale language="English" country="UnitedStates"/>
|
<locale language="English" country="UnitedStates"/>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>4</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="basic_tab">
|
<widget class="QWidget" name="basic_tab">
|
||||||
<property name="locale">
|
<property name="locale">
|
||||||
@ -757,8 +757,8 @@
|
|||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Devices</string>
|
<string>Devices</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item row="0" column="0">
|
<item>
|
||||||
<layout class="QVBoxLayout" name="devices_layout">
|
<layout class="QVBoxLayout" name="devices_layout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="dmm_warning_dev">
|
<widget class="QLabel" name="dmm_warning_dev">
|
||||||
@ -777,6 +777,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="turn_off_vm_to_modify_devs">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<italic>true</italic>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>To modify PCI devices you have to turn off the VM.</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
Loading…
Reference in New Issue
Block a user