Another fix for the Add To Library action

This commit is contained in:
Kovid Goyal 2010-08-26 16:15:14 -06:00
parent 12ef06c540
commit f13c7f96b4

View File

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