Merge remote-tracking branch 'qubesos/pr/100'

* qubesos/pr/100:
  Modified Qube Manager menu for dom0
This commit is contained in:
Marek Marczykowski-Górecki 2018-07-12 23:27:53 +02:00
commit 635171c4f4
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -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)"),
@ -1257,7 +1265,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