(parent)
| 74 | return acc, code |
| 75 | |
| 76 | def 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) |