Skip to content

Commit

Permalink
Modified Qube Manager menu for dom0
Browse files Browse the repository at this point in the history
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
  • Loading branch information
marmarta committed Jul 12, 2018
1 parent 9d62468 commit 2f22170
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion qubesmanager/qube_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,14 @@ def __init__(self, qt_app, qubes_app, parent=None):
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)"),
Expand Down Expand Up @@ -1245,7 +1253,10 @@ def open_context_menu(self, point):
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

Expand Down

0 comments on commit 2f22170

Please sign in to comment.