Added startup progress dialog
This commit is contained in:
parent
d54ba5b8cf
commit
78ba3057eb
@ -509,6 +509,14 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow):
|
|||||||
return [vm for vm in self.qubes_app.domains]
|
return [vm for vm in self.qubes_app.domains]
|
||||||
|
|
||||||
def fill_table(self):
|
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)
|
self.table.setSortingEnabled(False)
|
||||||
vms_list = self.get_vms_list()
|
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)
|
vm_row = VmRowInTable(vm, row_no, self.table)
|
||||||
vms_in_table[vm.qid] = vm_row
|
vms_in_table[vm.qid] = vm_row
|
||||||
row_no += 1
|
row_no += 1
|
||||||
|
if row_no % 5 == 0:
|
||||||
|
self.qt_app.processEvents()
|
||||||
|
|
||||||
self.vms_list = vms_list
|
self.vms_list = vms_list
|
||||||
self.vms_in_table = vms_in_table
|
self.vms_in_table = vms_in_table
|
||||||
self.table.setSortingEnabled(True)
|
self.table.setSortingEnabled(True)
|
||||||
|
|
||||||
|
progress.hide()
|
||||||
|
|
||||||
def showhide_vms(self):
|
def showhide_vms(self):
|
||||||
if not self.search:
|
if not self.search:
|
||||||
for row_no in range(self.table.rowCount()):
|
for row_no in range(self.table.rowCount()):
|
||||||
@ -1268,7 +1280,6 @@ def main():
|
|||||||
qubes_app = Qubes()
|
qubes_app = Qubes()
|
||||||
|
|
||||||
manager_window = VmManagerWindow(qt_app, qubes_app)
|
manager_window = VmManagerWindow(qt_app, qubes_app)
|
||||||
|
|
||||||
manager_window.show()
|
manager_window.show()
|
||||||
qt_app.exec_()
|
qt_app.exec_()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user