From 806915f83454951444d2bcad91b9073d6be56b53 Mon Sep 17 00:00:00 2001 From: donoban Date: Wed, 9 May 2018 14:36:39 +0200 Subject: [PATCH] Added Timer for template updates Since there is no template updates dbus events, we need to check it periodically --- qubesmanager/qube_manager.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 32fd841..33c542a 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -383,6 +383,17 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): manager.Starting.connect(self.OnStarting) manager.Started.connect(self.OnStarted) + # Check Updates Timer + timer = QtCore.QTimer(self) + timer.timeout.connect(self.CheckUpdates) + timer.start(1000 * 60 * 5) # 5mins + + def CheckUpdates(self): + print("Checking updates") + for vm in self.qubes_app.domains: + if vm.klass == 'TempateVM': + self.vms_in_table[vm.qid].update() + def OnDomainAdded(self, manager, domain): #needs to clear cache self.qubes_app.domains.clear_cache()