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
|
tt = self.BASE_TT
|
||||||
extra = ''
|
extra = ''
|
||||||
if not isbn:
|
if not isbn:
|
||||||
col = 'rgba(0,255,0,0%)'
|
col = 'none'
|
||||||
elif check_isbn(isbn) is not None:
|
elif check_isbn(isbn) is not None:
|
||||||
col = 'rgba(0,255,0,20%)'
|
col = 'rgba(0,255,0,20%)'
|
||||||
extra = '\n\n'+_('This ISBN number is valid')
|
extra = '\n\n'+_('This ISBN number is valid')
|
||||||
|
@ -156,6 +156,9 @@ class MetadataSingleDialogBase(ResizableDialog):
|
|||||||
|
|
||||||
self.identifiers = IdentifiersEdit(self)
|
self.identifiers = IdentifiersEdit(self)
|
||||||
self.basic_metadata_widgets.append(self.identifiers)
|
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.publisher = PublisherEdit(self)
|
||||||
self.basic_metadata_widgets.append(self.publisher)
|
self.basic_metadata_widgets.append(self.publisher)
|
||||||
@ -541,8 +544,8 @@ class MetadataSingleDialog(MetadataSingleDialogBase): # {{{
|
|||||||
sto(self.rating, self.tags)
|
sto(self.rating, self.tags)
|
||||||
create_row2(2, self.tags, self.tags_editor_button)
|
create_row2(2, self.tags, self.tags_editor_button)
|
||||||
sto(self.tags_editor_button, self.identifiers)
|
sto(self.tags_editor_button, self.identifiers)
|
||||||
create_row2(3, self.identifiers)
|
create_row2(3, self.identifiers, self.clear_identifiers_button)
|
||||||
sto(self.identifiers, self.timestamp)
|
sto(self.clear_identifiers_button, self.timestamp)
|
||||||
create_row2(4, self.timestamp, self.timestamp.clear_button)
|
create_row2(4, self.timestamp, self.timestamp.clear_button)
|
||||||
sto(self.timestamp.clear_button, self.pubdate)
|
sto(self.timestamp.clear_button, self.pubdate)
|
||||||
create_row2(5, self.pubdate, self.pubdate.clear_button)
|
create_row2(5, self.pubdate, self.pubdate.clear_button)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user