mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Another fix for the Add To Library action
This commit is contained in:
parent
12ef06c540
commit
f13c7f96b4
@ -14,10 +14,12 @@ class AddToLibraryAction(InterfaceAction):
|
|||||||
_('Add books to your calibre library from the connected device'), None)
|
_('Add books to your calibre library from the connected device'), None)
|
||||||
dont_add_to = frozenset(['toolbar', 'context-menu'])
|
dont_add_to = frozenset(['toolbar', 'context-menu'])
|
||||||
|
|
||||||
|
def genesis(self):
|
||||||
|
self.qaction.triggered.connect(self.add_books_to_library)
|
||||||
|
|
||||||
def location_selected(self, loc):
|
def location_selected(self, loc):
|
||||||
enabled = loc != 'library'
|
enabled = loc != 'library'
|
||||||
self.qaction.setEnabled(enabled)
|
self.qaction.setEnabled(enabled)
|
||||||
self.qaction.triggered.connect(self.add_books_to_library)
|
|
||||||
|
|
||||||
def add_books_to_library(self, *args):
|
def add_books_to_library(self, *args):
|
||||||
self.gui.iactions['Add Books'].add_books_from_device(
|
self.gui.iactions['Add Books'].add_books_from_device(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user