forked from openlp/openlp
display tool tip in shortcut dialog
This commit is contained in:
parent
989b922ab9
commit
02603eaad5
@ -310,7 +310,7 @@ class Ui_MainWindow(object):
|
||||
can_shortcuts=True,
|
||||
category=UiStrings().Help, triggers=self.on_online_help_clicked)
|
||||
self.web_site_item = create_action(main_window, u'webSiteItem', can_shortcuts=True, category=UiStrings().Help)
|
||||
# Some shortcuts not connected to buttons or menu entires.
|
||||
# Shortcuts not connected to buttons or menu entires.
|
||||
self.search_shortcut_action = create_action(main_window,
|
||||
u'searchShortcut', can_shortcuts=True, category=UiStrings().File,
|
||||
triggers=self.on_search_shortcut_triggered)
|
||||
@ -438,6 +438,9 @@ class Ui_MainWindow(object):
|
||||
if os.name == u'nt':
|
||||
self.offlineHelpItem.setText(translate('OpenLP.MainWindow', '&User Guide'))
|
||||
self.on_line_help_item.setText(translate('OpenLP.MainWindow', '&Online Help'))
|
||||
self.search_shortcut_action.setText(UiStrings().Search)
|
||||
self.search_shortcut_action.setToolTip(
|
||||
translate('OpenLP.MainWindow', 'Jump to the search box of the current active plugin.'))
|
||||
self.web_site_item.setText(translate('OpenLP.MainWindow', '&Web Site'))
|
||||
for item in self.language_group.actions():
|
||||
item.setText(item.objectName())
|
||||
|
@ -129,11 +129,18 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
|
||||
continue
|
||||
item = QtGui.QTreeWidgetItem([category.name])
|
||||
for action in category.actions:
|
||||
actionText = REMOVE_AMPERSAND.sub('', action.text())
|
||||
actionItem = QtGui.QTreeWidgetItem([actionText])
|
||||
actionItem.setIcon(0, action.icon())
|
||||
actionItem.setData(0, QtCore.Qt.UserRole, action)
|
||||
item.addChild(actionItem)
|
||||
action_text = REMOVE_AMPERSAND.sub('', action.text())
|
||||
action_item = QtGui.QTreeWidgetItem([action_text])
|
||||
action_item.setIcon(0, action.icon())
|
||||
action_item.setData(0, QtCore.Qt.UserRole, action)
|
||||
tool_tip_text = action.toolTip()
|
||||
# Only display tool tips if they are helpful.
|
||||
if tool_tip_text != action_text:
|
||||
# Display the tool tip in all three colums.
|
||||
action_item.setToolTip(0, tool_tip_text)
|
||||
action_item.setToolTip(1, tool_tip_text)
|
||||
action_item.setToolTip(2, tool_tip_text)
|
||||
item.addChild(action_item)
|
||||
self.treeWidget.addTopLevelItem(item)
|
||||
item.setExpanded(True)
|
||||
self.refreshShortcutList()
|
||||
|
Loading…
Reference in New Issue
Block a user