Tooltips for function mode controls

This commit is contained in:
Kovid Goyal 2014-11-19 08:55:12 +05:30
parent d8cef2d192
commit 5de64c93a2
2 changed files with 5 additions and 0 deletions

View File

@ -103,6 +103,7 @@ class FunctionBox(EditWithComplete):
self.set_separator(None) self.set_separator(None)
self.show_saved_search_actions = show_saved_search_actions self.show_saved_search_actions = show_saved_search_actions
self.refresh() self.refresh()
self.setToolTip(_('Choose a function to run on matched text (by name)'))
def refresh(self): def refresh(self):
self.update_items_cache(set(functions())) self.update_items_cache(set(functions()))

View File

@ -235,8 +235,10 @@ class SearchWidget(QWidget):
fhl.setContentsMargins(0, 0, 0, 0) fhl.setContentsMargins(0, 0, 0, 0)
fhl.addWidget(fb, stretch=10, alignment=Qt.AlignVCenter) fhl.addWidget(fb, stretch=10, alignment=Qt.AlignVCenter)
self.ae_func = b = QPushButton(_('Create/&edit'), self) self.ae_func = b = QPushButton(_('Create/&edit'), self)
b.setToolTip(_('Create a new function, or edit an existing function'))
fhl.addWidget(b) fhl.addWidget(b)
self.rm_func = b = QPushButton(_('Remo&ve'), self) self.rm_func = b = QPushButton(_('Remo&ve'), self)
b.setToolTip(_('Remove this function'))
fhl.addWidget(b) fhl.addWidget(b)
self.fsep = f = QFrame(self) self.fsep = f = QFrame(self)
f.setFrameShape(f.VLine) f.setFrameShape(f.VLine)
@ -554,9 +556,11 @@ class EditSearch(QFrame): # {{{
g.setContentsMargins(0, 0, 0, 0) g.setContentsMargins(0, 0, 0, 0)
la.setBuddy(f) la.setBuddy(f)
self.ae_func = b = QPushButton(_('Create/&edit'), self) 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.addWidget(b, 1, 1)
g.setColumnStretch(0, 10) g.setColumnStretch(0, 10)
self.rm_func = b = QPushButton(_('Remo&ve'), self) self.rm_func = b = QPushButton(_('Remo&ve'), self)
b.setToolTip(_('Remove this function'))
g.addWidget(b, 1, 2) g.addWidget(b, 1, 2)
self.case_sensitive = c = QCheckBox(_('Case sensitive')) self.case_sensitive = c = QCheckBox(_('Case sensitive'))