From fb31ae041a1468a792abe8c384b5a002997a7b89 Mon Sep 17 00:00:00 2001 From: Agnieszka Kostrzewa Date: Thu, 26 Apr 2012 00:16:54 +0200 Subject: [PATCH] Progress bar while waiting for updater to launch --- qubesmanager/main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qubesmanager/main.py b/qubesmanager/main.py index 79ff354..44ebe85 100755 --- a/qubesmanager/main.py +++ b/qubesmanager/main.py @@ -1289,7 +1289,7 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow): if not vm.is_running(): reply = QMessageBox.question(None, "VM Update Confirmation", - "VM need to be running for update. Do you want to start this VM?
", + "{0}
The VM has to be running to be updated.
Do you want to start it?
".format(vm.name), QMessageBox.Yes | QMessageBox.Cancel) if reply != QMessageBox.Yes: return @@ -1302,9 +1302,16 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow): thread.daemon = True thread.start() + progress = QProgressDialog ("{0}
Please wait for the updater to launch...".format(vm.name), "", 0, 0) + progress.setCancelButton(None) + progress.setModal(True) + progress.show() + while not thread_monitor.is_finished(): app.processEvents() time.sleep (0.2) + + progress.hide() if vm.qid != 0: if thread_monitor.success: