From 2f2217060e05b7e8d31e6230f52bb40af6527516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marta=20Marczykowska-G=C3=B3recka?= Date: Wed, 11 Jul 2018 17:21:17 +0200 Subject: [PATCH] Modified Qube Manager menu for dom0 Instead of generic menu with almost everything grayed-out, now context menu for dom0 has only Global Settings, Logs and update. references QubesOS/qubes-issues#1382 fixes QubesOS/qubes-issues#1165 --- 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 c3e8f07..76ab0e7 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -339,6 +339,14 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): self.tools_context_menu.addAction(self.action_toolbar) self.tools_context_menu.addAction(self.action_menubar) + self.dom0_context_menu = QtGui.QMenu(self) + self.dom0_context_menu.addAction(self.action_global_settings) + self.dom0_context_menu.addAction(self.action_updatevm) + self.dom0_context_menu.addSeparator() + + self.dom0_context_menu.addMenu(self.logs_menu) + self.dom0_context_menu.addSeparator() + self.connect( self.table.horizontalHeader(), QtCore.SIGNAL("sortIndicatorChanged(int, Qt::SortOrder)"), @@ -1245,7 +1253,10 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QtGui.QMainWindow): menu_empty = False self.logs_menu.setEnabled(not menu_empty) - self.context_menu.exec_(self.table.mapToGlobal(point)) + if vm.qid == 0: + self.dom0_context_menu.exec_(self.table.mapToGlobal(point)) + else: + self.context_menu.exec_(self.table.mapToGlobal(point)) except exc.QubesPropertyAccessError: pass