##// END OF EJS Templates
Set context for shortcuts in ConsoleWidget.
Puneeth Chaganti -
Show More
@@ -233,19 +233,22 b' class ConsoleWidget(Configurable, QtGui.QWidget):'
233 # Qt ctrl = cmd on OSX, so the match gets a false positive on OSX.
233 # Qt ctrl = cmd on OSX, so the match gets a false positive on OSX.
234 printkey = "Ctrl+Shift+P"
234 printkey = "Ctrl+Shift+P"
235 action.setShortcut(printkey)
235 action.setShortcut(printkey)
236 action.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut)
236 action.triggered.connect(self.print_)
237 action.triggered.connect(self.print_)
237 self.addAction(action)
238 self.addAction(action)
238 self._print_action = action
239 self._print_action = action
239
240
240 action = QtGui.QAction('Save as HTML/XML', None)
241 action = QtGui.QAction('Save as HTML/XML', None)
241 action.setShortcut(QtGui.QKeySequence.Save)
242 action.setShortcut(QtGui.QKeySequence.Save)
243 action.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut)
242 action.triggered.connect(self.export_html)
244 action.triggered.connect(self.export_html)
243 self.addAction(action)
245 self.addAction(action)
244 self._export_action = action
246 self._export_action = action
245
247
246 action = QtGui.QAction('Select All', None)
248 action = QtGui.QAction('Select All', None)
247 action.setEnabled(True)
249 action.setEnabled(True)
248 action.setShortcut(QtGui.QKeySequence.SelectAll)
250 action.setShortcut(QtGui.QKeySequence.SelectAll)
251 action.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut)
249 action.triggered.connect(self.select_all)
252 action.triggered.connect(self.select_all)
250 self.addAction(action)
253 self.addAction(action)
251 self._select_all_action = action
254 self._select_all_action = action
General Comments 0
You need to be logged in to leave comments. Login now