summaryrefslogtreecommitdiff
path: root/client/macrowindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/macrowindow.cc')
-rw-r--r--client/macrowindow.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/client/macrowindow.cc b/client/macrowindow.cc
index b37fe5f..4c51c07 100644
--- a/client/macrowindow.cc
+++ b/client/macrowindow.cc
@@ -105,9 +105,8 @@ void MacroWindow::initMacro(QDomNode &node)
if(xml_elem.hasAttribute("language") &&
xml_elem.attribute("language") == "lua") {
- if(xml_elem.hasAttribute("name")) {
- luaprograms[xml_elem.attribute("name")] = xml_elem.text();
- }
+ // luaprograms.push_back(xml_elem.text());
+ this->lua->runValidator(xml_elem.text(), NULL, "preload", "");
} else {
printf("Unknown script type %s\n", xml_elem.attribute("language").toStdString().c_str());
}
@@ -230,7 +229,7 @@ void MacroWindow::cont(QString name)
QVector< Widget* >::iterator i=widgets.begin();
while (i != widgets.end()) {
Widget* w = *i;
- if(w->getName() == name) {
+ if(w->name() == name) {
macro = w->getValue();
}
i++;
@@ -257,7 +256,7 @@ void MacroWindow::cont_nocommit(QString name)
QVector< Widget* >::iterator i=widgets.begin();
while (i != widgets.end()) {
Widget* w = *i;
- if(w->getName() == name) {
+ if(w->name() == name) {
macro = w->getValue();
}
i++;
@@ -288,14 +287,14 @@ Widget *MacroWindow::getWidget(QString name)
QVector< Widget* >::iterator i = widgets.begin();
while (i != widgets.end()) {
Widget* w = *i;
- if(name == w->getName()) return w;
+ if(name == w->name()) return w;
i++;
}
QVector< Widget* >::iterator j = auxwidgets.begin();
while (j != auxwidgets.end()) {
Widget* w = *j;
- if(name == w->getName()) return w;
+ if(name == w->name()) return w;
j++;
}