From 09befeb45938e4d7019e3431e7ca910cd433cbe1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 13 Apr 2013 12:19:07 +0530 Subject: [PATCH] Polish books: Do not allow the user to only update the jacket without also updating the metadata --- src/calibre/gui2/actions/polish.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/actions/polish.py b/src/calibre/gui2/actions/polish.py index cb3519e523..eb21fb2626 100644 --- a/src/calibre/gui2/actions/polish.py +++ b/src/calibre/gui2/actions/polish.py @@ -17,7 +17,7 @@ from PyQt4.Qt import (QDialog, QGridLayout, QIcon, QCheckBox, QLabel, QFrame, QSizePolicy, QTimer, QModelIndex, QTextEdit, QInputDialog, QMenu) -from calibre.gui2 import error_dialog, Dispatcher, gprefs +from calibre.gui2 import error_dialog, Dispatcher, gprefs, question_dialog from calibre.gui2.actions import InterfaceAction from calibre.gui2.convert.metadata import create_opf_file from calibre.gui2.dialogs.progress import ProgressDialog @@ -204,6 +204,15 @@ class Polish(QDialog): # {{{ ac[action] = saved_prefs[action] = bool(getattr(self, 'opt_'+action).isChecked()) if ac[action]: something = True + if ac['jacket'] and not ac['metadata']: + if not question_dialog(self, _('Must update metadata'), + _('You have selected the option to add metadata as ' + 'a "book jacket". For this option to work, you ' + 'must also select the option to update metadata in' + ' the book files. Do you want to select it?')): + return + ac['metadata'] = saved_prefs['metadata'] = True + self.opt_metadata.setChecked(True) if not something: return error_dialog(self, _('No actions selected'), _('You must select at least one action, or click Cancel.'),