From 5196f6d006d4c8a3c52aa8f7e7f8f353ab1456a9 Mon Sep 17 00:00:00 2001 From: John Schember Date: Sat, 5 Sep 2009 08:12:27 -0400 Subject: [PATCH] Only ask to convert existing when there are already converted books. --- src/calibre/gui2/tools.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/calibre/gui2/tools.py b/src/calibre/gui2/tools.py index 7e1655b425..5670031e68 100644 --- a/src/calibre/gui2/tools.py +++ b/src/calibre/gui2/tools.py @@ -198,10 +198,11 @@ def convert_existing(parent, db, book_ids, output_format): already_converted_ids.append(book_id) already_converted_titles.append(db.get_metadata(book_id, True).title) - if not question_dialog(parent, _('Convert existing'), - _('The following books have already been converted to %s format. ' - 'Do you wish to reconvert them?') % output_format, - '\n'.join(already_converted_titles)): - book_ids = [x for x in book_ids if x not in already_converted_ids] + if already_converted_ids: + if not question_dialog(parent, _('Convert existing'), + _('The following books have already been converted to %s format. ' + 'Do you wish to reconvert them?') % output_format, + '\n'.join(already_converted_titles)): + book_ids = [x for x in book_ids if x not in already_converted_ids] return book_ids