diff --git a/src/calibre/gui2/dialogs/metadata_single.py b/src/calibre/gui2/dialogs/metadata_single.py index b23baa9de6..d07eac7670 100644 --- a/src/calibre/gui2/dialogs/metadata_single.py +++ b/src/calibre/gui2/dialogs/metadata_single.py @@ -328,7 +328,14 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog): ResizableDialog.__init__(self, window) self.bc_box.layout().setAlignment(self.cover, Qt.AlignCenter|Qt.AlignHCenter) self.cancel_all = False - self.normal_aus_tooltip = unicode(self.author_sort.toolTip()) + base = unicode(self.author_sort.toolTip()) + self.ok_aus_tooltip = '
' + textwrap.fill(base+'
'+
+ _(' The green color indicates that the current '
+ 'author sort matches the current author'))
+ self.bad_aus_tooltip = '
'+textwrap.fill(base + '
'+
+ _(' The red color indicates that the current '
+ 'author sort does not match the current author'))
+
if cancel_all:
self.__abort_button = self.button_box.addButton(self.button_box.Abort)
self.__abort_button.setToolTip(_('Abort the editing of all remaining books'))
@@ -452,9 +459,6 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog):
else:
self.create_custom_column_editors()
self.generate_cover_button.clicked.connect(self.generate_cover)
- self.author_sort.setToolTip(textwrap.fill('
'+self.normal_aus_tooltip+'
'+
- _(' The green color indicates that the current '
- 'author sort matches the current author')))
def create_custom_column_editors(self):
w = self.central_widget.widget(1)
@@ -491,11 +495,7 @@ class MetadataSingleDialog(ResizableDialog, Ui_MetadataSingleDialog):
col = 'rgb(255, 0, 0, 20%)'
self.author_sort.setStyleSheet('QLineEdit { color: black; '
'background-color: %s; }'%col)
- tt = self.normal_aus_tooltip
- if not normal:
- tt = '
'+textwrap.fill(tt + '
'+
- _(' The red color indicates that the current '
- 'author sort does not match the current author'))
+ tt = self.ok_aus_tooltip if normal else self.bad_aus_tooltip
self.author_sort.setToolTip(tt)
def validate_isbn(self, isbn):