From f13c7f96b4e36a3ded6a48e65418bd5588b47397 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 26 Aug 2010 16:15:14 -0600 Subject: [PATCH] Another fix for the Add To Library action --- src/calibre/gui2/actions/add_to_library.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/actions/add_to_library.py b/src/calibre/gui2/actions/add_to_library.py index adc9f83333..7771fa7ed6 100644 --- a/src/calibre/gui2/actions/add_to_library.py +++ b/src/calibre/gui2/actions/add_to_library.py @@ -14,10 +14,12 @@ class AddToLibraryAction(InterfaceAction): _('Add books to your calibre library from the connected device'), None) dont_add_to = frozenset(['toolbar', 'context-menu']) + def genesis(self): + self.qaction.triggered.connect(self.add_books_to_library) + def location_selected(self, loc): enabled = loc != 'library' self.qaction.setEnabled(enabled) - self.qaction.triggered.connect(self.add_books_to_library) def add_books_to_library(self, *args): self.gui.iactions['Add Books'].add_books_from_device(