mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
Implement Fix #1298 (Deleting Cover Art from Metadata dialog)
This commit is contained in:
parent
39e94cdc11
commit
25909da8cb
2 changed files with 20 additions and 0 deletions
|
|
@ -33,6 +33,11 @@ def __init__(self, parent, ext, size, path=None):
|
|||
|
||||
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 @@ def __init__(self, window, row, db, accepted_callback=None):
|
|||
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))
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue