mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-03 11:53:17 +02: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
1 changed files with 8 additions and 0 deletions
|
|
@ -70,6 +70,9 @@ def genesis(self):
|
|||
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 @@ def location_selected(self, loc):
|
|||
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…
Reference in a new issue