mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-17 11:15:05 +01:00
Polish books: Do not allow the user to only update the jacket without also updating the metadata
This commit is contained in:
parent
63db4993e3
commit
09befeb459
1 changed files with 10 additions and 1 deletions
|
|
@ -17,7 +17,7 @@
|
|||
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 @@ def accept(self):
|
|||
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.'),
|
||||
|
|
|
|||
Loading…
Reference in a new issue