forked from M-Labs/artiq
gui: fix shortcut contexts. Closes #225
This commit is contained in:
parent
f9323c3286
commit
16f6d00e35
|
@ -160,16 +160,19 @@ class ExplorerDock(dockarea.Dock):
|
|||
open_action.triggered.connect(
|
||||
partial(self.expname_action, "open_experiment"))
|
||||
open_action.setShortcut("RETURN")
|
||||
open_action.setShortcutContext(QtCore.Qt.WidgetShortcut)
|
||||
self.el.addAction(open_action)
|
||||
submit_action = QtGui.QAction("Submit", self.el)
|
||||
submit_action.triggered.connect(
|
||||
partial(self.expname_action, "submit"))
|
||||
submit_action.setShortcut("CTRL+RETURN")
|
||||
submit_action.setShortcutContext(QtCore.Qt.WidgetShortcut)
|
||||
self.el.addAction(submit_action)
|
||||
reqterm_action = QtGui.QAction("Request termination of instances", self.el)
|
||||
reqterm_action.triggered.connect(
|
||||
partial(self.expname_action, "request_inst_term"))
|
||||
reqterm_action.setShortcut("CTRL+BACKSPACE")
|
||||
reqterm_action.setShortcutContext(QtCore.Qt.WidgetShortcut)
|
||||
self.el.addAction(reqterm_action)
|
||||
|
||||
set_shortcut_menu = QtGui.QMenu()
|
||||
|
|
|
@ -77,10 +77,12 @@ class ScheduleDock(dockarea.Dock):
|
|||
request_termination_action = QtGui.QAction("Request termination", self.table)
|
||||
request_termination_action.triggered.connect(partial(self.delete_clicked, True))
|
||||
request_termination_action.setShortcut("DELETE")
|
||||
request_termination_action.setShortcutContext(QtCore.Qt.WidgetShortcut)
|
||||
self.table.addAction(request_termination_action)
|
||||
delete_action = QtGui.QAction("Delete", self.table)
|
||||
delete_action.triggered.connect(partial(self.delete_clicked, False))
|
||||
delete_action.setShortcut("SHIFT+DELETE")
|
||||
delete_action.setShortcutContext(QtCore.Qt.WidgetShortcut)
|
||||
self.table.addAction(delete_action)
|
||||
|
||||
self.table_model = Model(dict())
|
||||
|
|
Loading…
Reference in New Issue