- b = XMLTools.mergeText(node.childNodes)
- if b != "": #check for function
- destList.append((ItemText,boundFunction(self.evalText,b)))
- else:
- destList.append((ItemText,self.nothing)) #use dummy as function
+ 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
+
+ # 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))))
+ return
+ elif x.tagName == 'setup':
+ id = getValbyAttr(x, "id")
+ destList.append((ItemText, boundFunction(self.openSetup, id)))
+ return
+
+ destList.append((ItemText,self.nothing))
+