diff options
Diffstat (limited to 'client/macrowindow.cc')
-rw-r--r-- | client/macrowindow.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/client/macrowindow.cc b/client/macrowindow.cc index 764bf79..551c804 100644 --- a/client/macrowindow.cc +++ b/client/macrowindow.cc @@ -71,12 +71,17 @@ void MacroWindow::initMacro(QDomNode &node) if(xml_elem.hasAttribute("name")) macro = xml_elem.attribute("name"); if(xml_elem.hasAttribute("version")) version = xml_elem.attribute("version"); - } else if(xml_elem.tagName() == "luaprograms") { + } else if(xml_elem.tagName() == "scripts") { // Nothing to do here - } else if(xml_elem.tagName() == "luaprogram") { - - if(xml_elem.hasAttribute("name")) { - luaprograms[xml_elem.attribute("name")] = xml_elem.text(); + } else if(xml_elem.tagName() == "script") { + + if(xml_elem.hasAttribute("language") && + xml_elem.attribute("language") == "lua") { + if(xml_elem.hasAttribute("name")) { + luaprograms[xml_elem.attribute("name")] = xml_elem.text(); + } + } else { + printf("Unknown script type %s\n", xml_elem.attribute("language").toStdString().c_str()); } } else if(xml_elem.tagName() == "window") { |