From b596d748b398242b556cb5a6271dff014d5e638d Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 30 Jul 2009 08:55:53 +0000 Subject: Changed illogically named 'window' tag into the more descriptive 'widgets' tag. --- server/src/macroparser.cc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'server/src/macroparser.cc') diff --git a/server/src/macroparser.cc b/server/src/macroparser.cc index fac39b6..b91462a 100644 --- a/server/src/macroparser.cc +++ b/server/src/macroparser.cc @@ -119,7 +119,7 @@ void MacroParser::characterData(std::string &data) void MacroParser::startTag(std::string name, std::map< std::string, std::string> attributes) { - // Create macro and enable parsing of queries, maps and window + // Create macro and enable parsing of queries, maps and widgets if(name == "macro") { if(state != UNDEFINED) error("macro found not root tag."); state = MACRO; @@ -219,17 +219,17 @@ void MacroParser::startTag(std::string name, std::map< std::string, std::string> } // Enable widget parsing - if(name == "window") { + if(name == "widgets") { - if(state != MACRO) error("window found outside macro."); - state = WINDOW; + if(state != MACRO) error("widgets found outside macro."); + state = WIDGETS; - assert(m); // No macro is currently available, cannot create window! + assert(m); // No macro is currently available, cannot create widgets! - m->window.attributes = attributes; - m->window.attributes["tagname"] = name; + m->widgets.attributes = attributes; + m->widgets.attributes["tagname"] = name; - Widget *current = &(m->window); + Widget *current = &(m->widgets); widgetstack.push_back(current); return; @@ -237,7 +237,7 @@ void MacroParser::startTag(std::string name, std::map< std::string, std::string> // TODO: We need to parse some (maybe even all) widgets in order to // make db lookup of the previous values. - if(state == WINDOW) { + if(state == WIDGETS) { assert(widgetstack.size()); // Widget stack is empty, cannot create! @@ -281,9 +281,9 @@ void MacroParser::endTag(std::string name) current_script = NULL; state = SCRIPTS; } - if(name == "window") state = MACRO; + if(name == "widgets") state = MACRO; - if(state == WINDOW) { + if(state == WIDGETS) { assert(widgetstack.size()); // Widget stack is empty, cannot pop! widgetstack.pop_back(); if(widgetstack.size() == 0) state = MACRO; -- cgit v1.2.3