From feb269da465a1fd8e3da7602bcd34a116957e485 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 9 Nov 2014 18:50:42 +0530 Subject: [PATCH] Linux: Fix regression on Unity that prevented some keyboard shortcuts from working because of the global menu bar. Fixes #1390901 [Book Merge via Keyboard Shortcut Not Working](https://bugs.launchpad.net/calibre/+bug/1390901) --- src/calibre/gui2/actions/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/calibre/gui2/actions/__init__.py b/src/calibre/gui2/actions/__init__.py index 1bc1a01e0c..e57e36b810 100644 --- a/src/calibre/gui2/actions/__init__.py +++ b/src/calibre/gui2/actions/__init__.py @@ -258,10 +258,10 @@ class InterfaceAction(QObject): self.gui.keyboard.register_shortcut(unique_name, shortcut_name, default_keys=keys, action=ac, description=description, group=self.action_spec[0]) - if isosx: - # In Qt 5 keyboard shortcuts dont work unless the - # action is explicitly added to the main window - self.gui.addAction(ac) + # In Qt 5 keyboard shortcuts dont work unless the + # action is explicitly added to the main window and on OSX and + # Unity since the menu might be exported, the shortcuts wont work + self.gui.addAction(ac) if triggered is not None: ac.triggered.connect(triggered) return ac