mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #958145 ([Enhancement] add a link to 'adding books' preferences in the 'add books' function)
This commit is contained in:
parent
86771a5286
commit
34da8d4060
@ -70,6 +70,9 @@ class AddAction(InterfaceAction):
|
||||
self.add_menu.addSeparator()
|
||||
ma('add-formats', _('Add files to selected book records'),
|
||||
triggered=self.add_formats, shortcut=_('Shift+A'))
|
||||
self.add_menu.addSeparator()
|
||||
ma('add-config', _('Configure the adding of books'),
|
||||
triggered=self.add_config)
|
||||
|
||||
self.qaction.triggered.connect(self.add_books)
|
||||
|
||||
@ -78,6 +81,11 @@ class AddAction(InterfaceAction):
|
||||
for action in list(self.add_menu.actions())[1:]:
|
||||
action.setEnabled(enabled)
|
||||
|
||||
def add_config(self):
|
||||
self.gui.iactions['Preferences'].do_config(
|
||||
initial_plugin=('Import/Export', 'Adding'),
|
||||
close_after_initial=True)
|
||||
|
||||
def add_formats(self, *args):
|
||||
if self.gui.stack.currentIndex() != 0:
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user