- def addItems(self, list, childNode):
- for x in childNode:
- if x.nodeType != xml.dom.minidom.Element.nodeType:
- continue
- elif x.tagName == 'item':
- item_text = _(x.getAttribute("text").encode("UTF-8") or "??")
- b = eval(XMLTools.mergeText(x.childNodes));
+ def addItems(self, list, parentNode):
+ for x in parentNode:
+ if x.tag == 'item':
+ item_level = int(x.get("level", 0))
+
+ if not self.levelChanged in config.usage.setup_level.notifiers:
+ config.usage.setup_level.notifiers.append(self.levelChanged)
+ self.onClose.append(self.removeNotifier)
+
+ if item_level > config.usage.setup_level.index:
+ continue
+
+ requires = x.get("requires")
+ if requires and not SystemInfo.get(requires, False):
+ continue;
+
+ item_text = _(x.get("text", "??").encode("UTF-8"))
+ b = eval(x.text or "");