mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
2ba566fa41
commit
43661588b0
@ -15,6 +15,8 @@ from calibre import prints
|
||||
from calibre.gui2 import Dispatcher
|
||||
from calibre.gui2.keyboard import NameConflict
|
||||
|
||||
def menu_action_unique_name(plugin, unique_name):
|
||||
return u'%s : menu action : %s'%(plugin.unique_name, unique_name)
|
||||
|
||||
class InterfaceAction(QObject):
|
||||
|
||||
@ -214,7 +216,7 @@ class InterfaceAction(QObject):
|
||||
if shortcut is not None and shortcut is not False:
|
||||
keys = ((shortcut,) if isinstance(shortcut, basestring) else
|
||||
tuple(shortcut))
|
||||
unique_name = '%s : menu action : %s'%(self.unique_name, unique_name)
|
||||
unique_name = menu_action_unique_name(self, unique_name)
|
||||
if description is not None:
|
||||
ac.setToolTip(description)
|
||||
ac.setStatusTip(description)
|
||||
|
@ -116,6 +116,11 @@ class Manager(QObject): # {{{
|
||||
done unregistering.
|
||||
'''
|
||||
self.shortcuts.pop(unique_name, None)
|
||||
for group in self.groups.itervalues():
|
||||
try:
|
||||
group.remove(unique_name)
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
def finalize(self):
|
||||
custom_keys_map = {un:tuple(keys) for un, keys in self.config.get(
|
||||
|
Loading…
x
Reference in New Issue
Block a user