From ac6d8efcbdee89c08501494ef39d2dc0fef439d9 2011-09-07 17:58:00 From: Evan Patterson Date: 2011-09-07 17:58:00 Subject: [PATCH] Merge pull request #763 from punchagan/master Set context for shortcuts in ConsoleWidget --- diff --git a/IPython/frontend/qt/console/console_widget.py b/IPython/frontend/qt/console/console_widget.py index a760eaa..2ec21f4 100644 --- a/IPython/frontend/qt/console/console_widget.py +++ b/IPython/frontend/qt/console/console_widget.py @@ -233,19 +233,22 @@ class ConsoleWidget(Configurable, QtGui.QWidget): # Qt ctrl = cmd on OSX, so the match gets a false positive on OSX. printkey = "Ctrl+Shift+P" action.setShortcut(printkey) + action.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut) action.triggered.connect(self.print_) self.addAction(action) self._print_action = action action = QtGui.QAction('Save as HTML/XML', None) action.setShortcut(QtGui.QKeySequence.Save) + action.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut) action.triggered.connect(self.export_html) self.addAction(action) self._export_action = action - + action = QtGui.QAction('Select All', None) action.setEnabled(True) action.setShortcut(QtGui.QKeySequence.SelectAll) + action.setShortcutContext(QtCore.Qt.WidgetWithChildrenShortcut) action.triggered.connect(self.select_all) self.addAction(action) self._select_all_action = action