- MenuTitle = _(getValbyAttr(node, "text"))
- if MenuTitle != "": #check for title
- a = boundFunction(self.session.open, Menu, node, node.childNodes)
- #TODO add check if !empty(node.childNodes)
- destList.append((MenuTitle, a))
-
- def addItem(self, destList, node):
- ItemText = _(getValbyAttr(node, "text"))
- if ItemText != "": #check for name
- for x in node.childNodes:
- if x.nodeType != xml.dom.minidom.Element.nodeType:
- continue
- elif x.tagName == 'screen':
- module = getValbyAttr(x, "module")
- screen = getValbyAttr(x, "screen")
-
- if len(screen) == 0:
- screen = module
-
- if module != "":
- module = "Screens." + module
-
- # check for arguments. they will be appended to the
- # openDialog call
- args = XMLTools.mergeText(x.childNodes)
- screen += ", " + args
-
- destList.append((ItemText, boundFunction(self.runScreen, (module, screen))))
- return
- elif x.tagName == 'code':
- destList.append((ItemText, boundFunction(self.execText, XMLTools.mergeText(x.childNodes))))