From 78ba3057eb2f59e7f17233c4378e842ba888cbb1 Mon Sep 17 00:00:00 2001 From: donoban Date: Thu, 10 May 2018 09:49:22 +0200 Subject: [PATCH] Added startup progress dialog --- qubesmanager/qube_manager.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index 20a8f8c..75790ee 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -509,6 +509,14 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): return [vm for vm in self.qubes_app.domains] def fill_table(self): + progress = QtGui.QProgressDialog( + self.tr( + "Loading Qube Manager..."), "", 0, 0) + progress.setWindowTitle(self.tr("Qube Manager")) + progress.setCancelButton(None) + progress.setModal(True) + progress.show() + self.table.setSortingEnabled(False) vms_list = self.get_vms_list() @@ -521,11 +529,15 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): vm_row = VmRowInTable(vm, row_no, self.table) vms_in_table[vm.qid] = vm_row row_no += 1 + if row_no % 5 == 0: + self.qt_app.processEvents() self.vms_list = vms_list self.vms_in_table = vms_in_table self.table.setSortingEnabled(True) + progress.hide() + def showhide_vms(self): if not self.search: for row_no in range(self.table.rowCount()): @@ -1268,7 +1280,6 @@ def main(): qubes_app = Qubes() manager_window = VmManagerWindow(qt_app, qubes_app) - manager_window.show() qt_app.exec_()