Added startup progress dialog

This commit is contained in:
donoban 2018-05-10 09:49:22 +02:00
parent d54ba5b8cf
commit 78ba3057eb
No known key found for this signature in database
GPG Key ID: 141310D8E3ED08A5

View File

@ -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_()