summaryrefslogtreecommitdiff
path: root/client/macro.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/macro.cc')
-rw-r--r--client/macro.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/client/macro.cc b/client/macro.cc
index bd7393f..2777cf5 100644
--- a/client/macro.cc
+++ b/client/macro.cc
@@ -45,8 +45,8 @@ void Macro::update(QDomNode &n)
QDomElement xml_elem = node.toElement();
- if(xml_elem.tagName() != "macro") return;
- if(xml_elem.hasAttribute("header")) return;
+ if(xml_elem.tagName() != "macro" && xml_elem.tagName() != "header") return;
+ // if(xml_elem.hasAttribute("header")) return;
name = xml_elem.attribute("name");
@@ -57,7 +57,7 @@ void Macro::init(QBoxLayout *layout, Macros &macros, bool initialising, NetCom &
{
QDomElement xml_elem = node.toElement();
- if(xml_elem.tagName() != "macro") return;
+ if(xml_elem.tagName() != "macro" && xml_elem.tagName() != "header") return;
isstatic = xml_elem.attribute("static", "false") == "true";
iscompact = xml_elem.attribute("compact", "false") == "true";
@@ -67,14 +67,16 @@ void Macro::init(QBoxLayout *layout, Macros &macros, bool initialising, NetCom &
requires = xml_elem.attribute("requires").split(",");
}
- if(xml_elem.hasAttribute("header")) {
+ // if(xml_elem.hasAttribute("header")) {
+ if(xml_elem.tagName() == "header") {
// Macro is a special headline macro.
// Simply create a headline, and ignore the rest.
// Only add header on initial contruction.
if(initialising == true) {
QLabel *header = new QLabel();
- header->setText(xml_elem.attribute("header"));
+ // header->setText(xml_elem.attribute("header"));
+ header->setText(xml_elem.attribute("caption"));
QFont headerfont = header->font();
headerfont.setBold(true);
headerfont.setPointSize(headerfont.pointSize() + 2);