From cd85d375f513e7f2a0e11184703fca4596804f24 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 2 Feb 2012 12:14:53 +0530 Subject: [PATCH] Fix device entry not visible in menubar even when it has been added via Preferences->Toolbars. Fixes #923175 (location manager not accessible from the menubar) --- src/calibre/gui2/bars.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/bars.py b/src/calibre/gui2/bars.py index 64d5160045..50b3f3e7f5 100644 --- a/src/calibre/gui2/bars.py +++ b/src/calibre/gui2/bars.py @@ -199,8 +199,9 @@ class MenuBar(QMenuBar): # {{{ def update_lm_actions(self): for ac in self.added_actions: - if ac in self.location_manager.all_actions: - ac.setVisible(ac in self.location_manager.available_actions) + clone = getattr(ac, 'clone', None) + if clone is not None and clone in self.location_manager.all_actions: + ac.setVisible(clone in self.location_manager.available_actions) def init_bar(self, actions): for ac in self.added_actions: