Include in memory balancing enabled where it applies (ticket #498)
This commit is contained in:
parent
7cf25ccffd
commit
68560f9151
@ -90,6 +90,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
|
|||||||
|
|
||||||
###### advanced tab
|
###### advanced tab
|
||||||
self.__init_advanced_tab__()
|
self.__init_advanced_tab__()
|
||||||
|
self.include_in_balancing.stateChanged.connect(self.include_in_balancing_state_changed)
|
||||||
|
|
||||||
###### firewall tab
|
###### firewall tab
|
||||||
if self.tabWidget.isTabEnabled(self.tabs_indices["firewall"]):
|
if self.tabWidget.isTabEnabled(self.tabs_indices["firewall"]):
|
||||||
@ -104,6 +105,7 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
|
|||||||
|
|
||||||
####### devices tab
|
####### devices tab
|
||||||
self.__init_devices_tab__()
|
self.__init_devices_tab__()
|
||||||
|
self.connect(self.dev_list, SIGNAL("selected_changed()"), self.devices_selection_changed)
|
||||||
|
|
||||||
####### services tab
|
####### services tab
|
||||||
self.__init_services_tab__()
|
self.__init_services_tab__()
|
||||||
@ -356,7 +358,11 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
|
|||||||
self.vcpus.setMaximum(QubesHost().no_cpus)
|
self.vcpus.setMaximum(QubesHost().no_cpus)
|
||||||
self.vcpus.setValue(int(self.vm.vcpus))
|
self.vcpus.setValue(int(self.vm.vcpus))
|
||||||
|
|
||||||
self.include_in_balancing.setChecked('meminfo-writer' in self.vm.services and self.vm.services['meminfo-writer']==True)
|
if len(self.vm.pcidevs) > 0:
|
||||||
|
self.include_in_balancing.setEnabled(False)
|
||||||
|
else:
|
||||||
|
self.include_in_balancing.setChecked('meminfo-writer' in self.vm.services and self.vm.services['meminfo-writer']==True)
|
||||||
|
self.tabWidget.setTabEnabled(self.tabs_indices["devices"], not self.include_in_balancing.isChecked())
|
||||||
|
|
||||||
#kernel
|
#kernel
|
||||||
if self.vm.template is not None:
|
if self.vm.template is not None:
|
||||||
@ -480,6 +486,11 @@ class VMSettingsWindow(Ui_SettingsDialog, QDialog):
|
|||||||
self.vm.pcidevs = pcidevs
|
self.vm.pcidevs = pcidevs
|
||||||
self.anything_changed = True
|
self.anything_changed = True
|
||||||
|
|
||||||
|
def include_in_balancing_state_changed(self, state):
|
||||||
|
self.tabWidget.setTabEnabled(self.tabs_indices["devices"], not state == QtCore.Qt.Checked)
|
||||||
|
|
||||||
|
def devices_selection_changed(self):
|
||||||
|
self.include_in_balancing.setEnabled(self.dev_list.selected_list.count() == 0)
|
||||||
|
|
||||||
######## services tab
|
######## services tab
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user