From 5de64c93a2c3359e4f46e2727e6798e32288a2a6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 19 Nov 2014 08:55:12 +0530 Subject: [PATCH] Tooltips for function mode controls --- src/calibre/gui2/tweak_book/function_replace.py | 1 + src/calibre/gui2/tweak_book/search.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/calibre/gui2/tweak_book/function_replace.py b/src/calibre/gui2/tweak_book/function_replace.py index cde1ca0388..157530f0a1 100644 --- a/src/calibre/gui2/tweak_book/function_replace.py +++ b/src/calibre/gui2/tweak_book/function_replace.py @@ -103,6 +103,7 @@ class FunctionBox(EditWithComplete): self.set_separator(None) self.show_saved_search_actions = show_saved_search_actions self.refresh() + self.setToolTip(_('Choose a function to run on matched text (by name)')) def refresh(self): self.update_items_cache(set(functions())) diff --git a/src/calibre/gui2/tweak_book/search.py b/src/calibre/gui2/tweak_book/search.py index 0765b6e768..90ebf2900a 100644 --- a/src/calibre/gui2/tweak_book/search.py +++ b/src/calibre/gui2/tweak_book/search.py @@ -235,8 +235,10 @@ class SearchWidget(QWidget): fhl.setContentsMargins(0, 0, 0, 0) fhl.addWidget(fb, stretch=10, alignment=Qt.AlignVCenter) self.ae_func = b = QPushButton(_('Create/&edit'), self) + b.setToolTip(_('Create a new function, or edit an existing function')) fhl.addWidget(b) self.rm_func = b = QPushButton(_('Remo&ve'), self) + b.setToolTip(_('Remove this function')) fhl.addWidget(b) self.fsep = f = QFrame(self) f.setFrameShape(f.VLine) @@ -554,9 +556,11 @@ class EditSearch(QFrame): # {{{ g.setContentsMargins(0, 0, 0, 0) la.setBuddy(f) self.ae_func = b = QPushButton(_('Create/&edit'), self) + b.setToolTip(_('Create a new function, or edit an existing function')) g.addWidget(b, 1, 1) g.setColumnStretch(0, 10) self.rm_func = b = QPushButton(_('Remo&ve'), self) + b.setToolTip(_('Remove this function')) g.addWidget(b, 1, 2) self.case_sensitive = c = QCheckBox(_('Case sensitive'))