From 534ba212196b5141b8d6ecad49f6b22995522dc2 Mon Sep 17 00:00:00 2001 From: GRiker Date: Sun, 8 May 2011 03:33:31 -0600 Subject: [PATCH] Added genesis() to GenerateCatalogAction, enabling catalog builder to be launched from toolbar --- src/calibre/gui2/actions/catalog.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/actions/catalog.py b/src/calibre/gui2/actions/catalog.py index 093985d041..45544d8246 100644 --- a/src/calibre/gui2/actions/catalog.py +++ b/src/calibre/gui2/actions/catalog.py @@ -20,6 +20,9 @@ class GenerateCatalogAction(InterfaceAction): action_spec = (_('Create a catalog of the books in your calibre library'), 'catalog.png', 'Catalog builder', None) dont_add_to = frozenset(['menubar-device', 'toolbar-device', 'context-menu-device']) + def genesis(self): + self.qaction.triggered.connect(self.generate_catalog) + def generate_catalog(self): rows = self.gui.library_view.selectionModel().selectedRows() if not rows or len(rows) < 2: