def handle_shortcut(self, text): """Return the keystroke currently defined for the action.""" collection_name, action_name = text.split(None, 1) import actioncollectionmanager action = actioncollectionmanager.action(collection_name, action_name) seq = action.shortcut() key = seq.toString(QKeySequence.NativeText) or _("(no key defined)") return '<span class="shortcut">{0}</span>'.format(simplemarkdown.html_escape(key))
def handle_shortcut(self, text): """Return the keystroke currently defined for the action.""" collection_name, action_name = text.split(None, 1) import actioncollectionmanager action = actioncollectionmanager.action(collection_name, action_name) seq = action.shortcut() key = seq.toString(QKeySequence.NativeText) or _("(no key defined)") return '<span class="shortcut">{0}</span>'.format( simplemarkdown.html_escape(key))
def readSettings(self): self._showPopupAction.setShortcut( actioncollectionmanager.action("autocomplete", "popup_completions").shortcut())