Implement Fix #1298 (Deleting Cover Art from Metadata dialog)

This commit is contained in:
Kovid Goyal 2008-11-24 14:57:15 -08:00
parent 39e94cdc11
commit 25909da8cb
2 changed files with 20 additions and 0 deletions

View File

@ -33,6 +33,11 @@ class Format(QListWidgetItem):
class MetadataSingleDialog(QDialog, Ui_MetadataSingleDialog):
def do_reset_cover(self, *args):
pix = QPixmap(':/images/book.svg')
self.cover.setPixmap(pix)
self.cover_changed = True
def select_cover(self, checked):
files = choose_images(self, 'change cover dialog',
u'Choose cover for ' + qstring_to_unicode(self.title.text()))
@ -149,6 +154,7 @@ class MetadataSingleDialog(QDialog, Ui_MetadataSingleDialog):
self.remove_unused_series)
QObject.connect(self.auto_author_sort, SIGNAL('clicked()'),
self.deduce_author_sort)
self.connect(self.reset_cover, SIGNAL('clicked()'), self.do_reset_cover)
self.connect(self.swap_button, SIGNAL('clicked()'), self.swap_title_author)
self.timeout = float(prefs['network_timeout'])
self.title.setText(db.title(row))

View File

@ -519,6 +519,20 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="reset_cover" >
<property name="toolTip" >
<string>Reset cover to default</string>
</property>
<property name="text" >
<string>...</string>
</property>
<property name="icon" >
<iconset resource="../images.qrc" >
<normaloff>:/images/trash.svg</normaloff>:/images/trash.svg</iconset>
</property>
</widget>
</item>
</layout>
</item>
</layout>