From 1d02420f86d0aedc1732978576d3e6bdab062dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 5 Aug 2015 01:23:35 +0200 Subject: [PATCH] global settings: VMs 'updates check' status now can be also retrieved qubesos/qubes-issues#892 --- qubesmanager/global_settings.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/qubesmanager/global_settings.py b/qubesmanager/global_settings.py index fe48d6a..1142ef0 100644 --- a/qubesmanager/global_settings.py +++ b/qubesmanager/global_settings.py @@ -45,7 +45,7 @@ from ui_globalsettingsdlg import * from ConfigParser import SafeConfigParser from qubes.qubesutils import parse_size from qubes.qubesutils import updates_dom0_toggle,updates_vms_toggle,\ - updates_dom0_status + updates_dom0_status,updates_vms_status from qubes import qmemman_algo dont_keep_dvm_in_memory_path = '/var/lib/qubes/dvmdata/dont-use-shm' @@ -284,12 +284,17 @@ class GlobalSettingsWindow(Ui_GlobalSettings, QDialog): self.updates_val = False self.updates_dom0_val = updates_dom0_status(self.qvm_collection) self.updates_dom0.setChecked(self.updates_dom0_val) - self.updates_vm.setCheckState(Qt.PartiallyChecked) + updates_vms = updates_vms_status(self.qvm_collection) + if updates_vms is None: + self.updates_vm.setCheckState(Qt.PartiallyChecked) + else: + self.updates_vm.setCheckState(updates_vms) def __apply_updates__(self): if self.updates_dom0.isChecked() != self.updates_dom0_val: updates_dom0_toggle(self.qvm_collection, self.updates_dom0.isChecked()) if self.updates_vm.checkState() != Qt.PartiallyChecked: + self.anything_changed = True updates_vms_toggle(self.qvm_collection, self.updates_vm .isChecked())