diff --git a/src/calibre/gui2/actions/__init__.py b/src/calibre/gui2/actions/__init__.py index c9643d2f3d..4f2d5fe559 100644 --- a/src/calibre/gui2/actions/__init__.py +++ b/src/calibre/gui2/actions/__init__.py @@ -199,7 +199,7 @@ class InterfaceAction(QObject): the keyboard shortcuts for this action. By default it is set to the value of ``text``. - :return: The created Qation, This action has one extra attribute + :return: The created QAction, This action has one extra attribute calibre_shortcut_unique_name which if not None refers to the unique name under which this action is registered with the keyboard manager. ''' diff --git a/src/calibre/gui2/cover_flow.py b/src/calibre/gui2/cover_flow.py index 6509c7a762..0352c9603f 100644 --- a/src/calibre/gui2/cover_flow.py +++ b/src/calibre/gui2/cover_flow.py @@ -162,6 +162,17 @@ class CBDialog(QDialog): self.pre_fs_geom = None cover_flow.setFocus(Qt.OtherFocusReason) + self.view_action = a = QAction(self) + iactions = parent.iactions + self.addAction(a) + a.setShortcuts(list(iactions['View'].menuless_qaction.shortcuts())+ + [QKeySequence(Qt.Key_Space)]) + a.triggered.connect(iactions['View'].menuless_qaction.trigger) + self.sd_action = a = QAction(self) + self.addAction(a) + a.setShortcuts(list(iactions['Send To Device']. + menuless_qaction.shortcuts())) + a.triggered.connect(iactions['Send To Device'].menuless_qaction.trigger) def closeEvent(self, *args): if not self.isFullScreen():