From ce802456268a23251102fcdf18a0bcd597de9975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Wed, 11 Jul 2018 17:58:56 +0200 Subject: [PATCH] Removed 'close window' button in progress dialogs in Qube Manager The ability to close window suggested to the user (falsely) that they can close the window and thus abort the operation (like deleting a VM). To avoid confusion, the button has been exorcised. fixes QubesOS/qubes-issues#1479 --- qubesmanager/qube_manager.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index c3e8f07..8222cfc 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -524,6 +524,9 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): self.tr( "Loading Qube Manager..."), "", 0, 0) progress.setWindowTitle(self.tr("Qube Manager")) + progress.setWindowFlags(QtCore.Qt.Window | + QtCore.Qt.WindowTitleHint | + QtCore.Qt.CustomizeWindowHint) progress.setCancelButton(None) progress.setModal(True) progress.show() @@ -711,6 +714,9 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): progress = QtGui.QProgressDialog( self.tr( "Removing Qube: {0}...").format(vm.name), "", 0, 0) + progress.setWindowFlags(QtCore.Qt.Window | + QtCore.Qt.WindowTitleHint | + QtCore.Qt.CustomizeWindowHint) progress.setCancelButton(None) progress.setModal(True) progress.show() @@ -765,6 +771,9 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): progress = QtGui.QProgressDialog( self.tr("Cloning Qube {0} to {1}...").format( vm.name, clone_name), "", 0, 0) + progress.setWindowFlags(QtCore.Qt.Window | + QtCore.Qt.WindowTitleHint | + QtCore.Qt.CustomizeWindowHint) progress.setCancelButton(None) progress.setModal(True) progress.show() @@ -1008,6 +1017,9 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): self.tr( "{0}
Please wait for the updater to " "launch...").format(vm.name), "", 0, 0) + progress.setWindowFlags(QtCore.Qt.Window | + QtCore.Qt.WindowTitleHint | + QtCore.Qt.CustomizeWindowHint) progress.setCancelButton(None) progress.setModal(True) progress.show()