From 11ab7672662555226d833529742f3b8ec25ceb14 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 30 Jul 2013 13:38:56 +0530 Subject: [PATCH] Fix drag 'n drop of cover onto conversion dialog not working --- src/calibre/gui2/convert/metadata.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/convert/metadata.py b/src/calibre/gui2/convert/metadata.py index 1d354a7881..f0ff1f8af7 100644 --- a/src/calibre/gui2/convert/metadata.py +++ b/src/calibre/gui2/convert/metadata.py @@ -61,6 +61,11 @@ class MetadataWidget(Widget, Ui_Form): self.initialize_options(get_option, get_help, db, book_id) self.connect(self.cover_button, SIGNAL("clicked()"), self.select_cover) self.comment.hide_toolbars() + self.cover.cover_changed.connect(self.change_cover) + + def change_cover(self, data): + self.cover_changed = True + self.cover_data = data def deduce_author_sort(self, *args): au = unicode(self.author.currentText()) @@ -68,7 +73,6 @@ class MetadataWidget(Widget, Ui_Form): authors = string_to_authors(au) self.author_sort.setText(self.db.author_sort_from_authors(authors)) - def initialize_metadata_options(self): self.initialize_combos() self.author.editTextChanged.connect(self.deduce_author_sort) @@ -210,7 +214,6 @@ class MetadataWidget(Widget, Ui_Form): bool(self.opt_prefer_metadata_cover.isChecked()), } - def commit(self, save_defaults=False): ''' Settings are stored in two attributes: `opf_file` and `cover_file`. @@ -242,3 +245,4 @@ class MetadataWidget(Widget, Ui_Form): self.cover_file = cf return recs +