MCPcopy Create free account
hub / github.com/Image-Py/imagepy / buildShortcut

Function buildShortcut

imagepy/ui/pluginloader.py:76–86  ·  view source on GitHub ↗
(parent)

Source from the content-addressed store, hash-verified

74 return acc, code
75
76def buildShortcut(parent):
77 shortcuts = []
78 for item in list(PluginsManager.plgs.values()):
79 cut = ShotcutManager.get(item.title)
80 if cut!=None:
81 acc, code = codeSplit(cut)
82 if code==-1: continue;
83 nid = wx.NewId()
84 parent.Bind(wx.EVT_MENU, lambda x, p=item:p().start(), id=nid)
85 shortcuts.append((acc, code, nid))
86 return wx.AcceleratorTable(shortcuts)

Callers

nothing calls this directly

Calls 5

codeSplitFunction · 0.85
appendMethod · 0.80
getMethod · 0.45
BindMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected