From 34da8d4060e5ae63719493f91b59dbd36d1d78e1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 18 Mar 2012 19:29:26 +0530 Subject: [PATCH] Fix #958145 ([Enhancement] add a link to 'adding books' preferences in the 'add books' function) --- src/calibre/gui2/actions/add.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/calibre/gui2/actions/add.py b/src/calibre/gui2/actions/add.py index bb695db841..bbdef5b1b5 100644 --- a/src/calibre/gui2/actions/add.py +++ b/src/calibre/gui2/actions/add.py @@ -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