mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add button to clear identifiers edit
This commit is contained in:
parent
7281c8de79
commit
ba71b95f78
@ -973,7 +973,7 @@ class IdentifiersEdit(QLineEdit): # {{{
|
||||
tt = self.BASE_TT
|
||||
extra = ''
|
||||
if not isbn:
|
||||
col = 'rgba(0,255,0,0%)'
|
||||
col = 'none'
|
||||
elif check_isbn(isbn) is not None:
|
||||
col = 'rgba(0,255,0,20%)'
|
||||
extra = '\n\n'+_('This ISBN number is valid')
|
||||
|
@ -156,6 +156,9 @@ class MetadataSingleDialogBase(ResizableDialog):
|
||||
|
||||
self.identifiers = IdentifiersEdit(self)
|
||||
self.basic_metadata_widgets.append(self.identifiers)
|
||||
self.clear_identifiers_button = QToolButton(self)
|
||||
self.clear_identifiers_button.setIcon(QIcon(I('trash.png')))
|
||||
self.clear_identifiers_button.clicked.connect(self.identifiers.clear)
|
||||
|
||||
self.publisher = PublisherEdit(self)
|
||||
self.basic_metadata_widgets.append(self.publisher)
|
||||
@ -541,8 +544,8 @@ class MetadataSingleDialog(MetadataSingleDialogBase): # {{{
|
||||
sto(self.rating, self.tags)
|
||||
create_row2(2, self.tags, self.tags_editor_button)
|
||||
sto(self.tags_editor_button, self.identifiers)
|
||||
create_row2(3, self.identifiers)
|
||||
sto(self.identifiers, self.timestamp)
|
||||
create_row2(3, self.identifiers, self.clear_identifiers_button)
|
||||
sto(self.clear_identifiers_button, self.timestamp)
|
||||
create_row2(4, self.timestamp, self.timestamp.clear_button)
|
||||
sto(self.timestamp.clear_button, self.pubdate)
|
||||
create_row2(5, self.pubdate, self.pubdate.clear_button)
|
||||
|
Loading…
x
Reference in New Issue
Block a user