Added genesis() to GenerateCatalogAction, enabling catalog builder to be launched from toolbar

This commit is contained in:
GRiker 2011-05-08 03:33:31 -06:00
parent 1dc466a15e
commit 534ba21219

View File

@ -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: