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

Function buildItem

imagepy/ui/pluginloader.py:7–18  ·  view source on GitHub ↗
(parent, root, item)

Source from the content-addressed store, hash-verified

5from glob import glob
6
7def buildItem(parent, root, item):
8 if item=='-':
9 root.AppendSeparator()
10 return
11 sc = ShotcutManager.get(item.title)
12 LanguageManager.add(item.title)
13
14 title = LanguageManager.get(item.title) if sc==None else LanguageManager.get(item.title)+'\t'+sc
15
16 mi = wx.MenuItem(root, -1, title)
17 parent.Bind(wx.EVT_MENU, lambda x, p=item:p().start(), mi)
18 root.Append(mi)
19
20def buildMenu(parent, data, curpath):
21 menu = wx.Menu()

Callers 1

buildMenuFunction · 0.85

Calls 4

getMethod · 0.45
addMethod · 0.45
BindMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected