From 68bbf644524e6a450529f569529c57c568e51a8f Mon Sep 17 00:00:00 2001
From: Kovid Goyal
Date: Sat, 23 Feb 2013 22:52:07 +0530
Subject: [PATCH] Book polishing: Make updating cover a separate option, so you
can now update metadata without updating the ocver.
---
src/calibre/ebooks/oeb/polish/main.py | 1 +
src/calibre/gui2/actions/polish.py | 24 +++++++++++++++---------
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/src/calibre/ebooks/oeb/polish/main.py b/src/calibre/ebooks/oeb/polish/main.py
index bd222cdbd2..c04686ed6c 100644
--- a/src/calibre/ebooks/oeb/polish/main.py
+++ b/src/calibre/ebooks/oeb/polish/main.py
@@ -174,6 +174,7 @@ def gui_polish(data):
files = data.pop('files')
if not data.pop('metadata'):
data.pop('opf')
+ if not data.pop('do_cover'):
data.pop('cover')
file_map = {x:x for x in files}
opts = ALL_OPTS.copy()
diff --git a/src/calibre/gui2/actions/polish.py b/src/calibre/gui2/actions/polish.py
index aeb3a2e332..dd41c0690f 100644
--- a/src/calibre/gui2/actions/polish.py
+++ b/src/calibre/gui2/actions/polish.py
@@ -44,13 +44,18 @@ class Polish(QDialog): # {{{
_('Smarten punctuation
%s')%HELP['smarten_punctuation'],
'metadata':_('Updating metadata
'
- 'This will update all metadata and covers in the'
+ '
This will update all metadata except the cover in the'
' ebook files to match the current metadata in the'
- ' calibre library.
If the ebook file does not have'
- ' an identifiable cover, a new cover is inserted.
'
+ ' calibre library.
'
' Note that most ebook'
' formats are not capable of supporting all the'
- ' metadata in calibre.
'),
+ ' metadata in calibre.There is a separate option to'
+ ' update the cover.
'),
+ 'do_cover': _('Update the covers in the ebook files to match the'
+ ' current cover in the calibre library.
'
+ 'If the ebook file does not have'
+ ' an identifiable cover, a new cover is inserted.
'
+ ),
'jacket':_('Book Jacket
%s')%HELP['jacket'],
'remove_jacket':_('Remove Book Jacket
%s')%HELP['remove_jacket'],
}
@@ -63,11 +68,12 @@ class Polish(QDialog): # {{{
count = 0
self.all_actions = OrderedDict([
- ('subset', _('Subset all embedded fonts')),
- ('smarten_punctuation', _('Smarten punctuation')),
- ('metadata', _('Update metadata in book files')),
- ('jacket', _('Add metadata as a "book jacket" page')),
- ('remove_jacket', _('Remove a previously inserted book jacket')),
+ ('subset', _('&Subset all embedded fonts')),
+ ('smarten_punctuation', _('Smarten &punctuation')),
+ ('metadata', _('Update &metadata in the book files')),
+ ('do_cover', _('Update the &cover in the book files')),
+ ('jacket', _('Add metadata as a "book &jacket" page')),
+ ('remove_jacket', _('&Remove a previously inserted book jacket')),
])
prefs = gprefs.get('polishing_settings', {})
for name, text in self.all_actions.iteritems():