summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
authordeva <deva>2009-07-30 08:55:53 +0000
committerdeva <deva>2009-07-30 08:55:53 +0000
commitb596d748b398242b556cb5a6271dff014d5e638d (patch)
tree4c49da6cba80e53cd8ebc07081cb1b4cbd989d78 /server/src
parent77272458e7a8906d871b241b5385bbd0f783d861 (diff)
Changed illogically named 'window' tag into the more descriptive 'widgets' tag.
Diffstat (limited to 'server/src')
-rw-r--r--server/src/macroheaderparser.cc2
-rw-r--r--server/src/macroparser.cc22
-rw-r--r--server/src/macroparser.h2
-rw-r--r--server/src/macrotool_dump.cc2
-rw-r--r--server/src/macrotool_fieldnames.cc2
-rw-r--r--server/src/macrotool_filehandler.cc2
-rw-r--r--server/src/server.cc8
-rw-r--r--server/src/template.h2
-rw-r--r--server/src/templateheaderparser.cc2
-rw-r--r--server/src/templateparser.cc2
-rw-r--r--server/src/widgetgenerator.cc4
11 files changed, 25 insertions, 25 deletions
diff --git a/server/src/macroheaderparser.cc b/server/src/macroheaderparser.cc
index e9748b1..d6ba0bb 100644
--- a/server/src/macroheaderparser.cc
+++ b/server/src/macroheaderparser.cc
@@ -94,7 +94,7 @@ MacroHeaderParser::~MacroHeaderParser()
void MacroHeaderParser::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") {
assert(!m); // A Macro has already been allocated, cannot create macro!
m = new Macro();
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;
diff --git a/server/src/macroparser.h b/server/src/macroparser.h
index 9d90ff1..a283d26 100644
--- a/server/src/macroparser.h
+++ b/server/src/macroparser.h
@@ -39,7 +39,7 @@ class MacroParser : public SAXParser {
QUERY,
MAPS,
MAP,
- WINDOW,
+ WIDGETS,
SCRIPTS,
SCRIPT
} ParserState;
diff --git a/server/src/macrotool_dump.cc b/server/src/macrotool_dump.cc
index 71bc690..990d247 100644
--- a/server/src/macrotool_dump.cc
+++ b/server/src/macrotool_dump.cc
@@ -80,7 +80,7 @@ static std::map<std::string, struct _macro> macroList()
std::string key = macro->attributes["name"];// + "-" + macro->attributes["version"];
macros[key].name = macro->attributes["name"];
macros[key].file = *mfs;
- macros[key].title = macro->window.attributes["caption"];
+ macros[key].title = macro->widgets.attributes["caption"];
macros[key].version = macro->attributes["version"];
mfs++;
diff --git a/server/src/macrotool_fieldnames.cc b/server/src/macrotool_fieldnames.cc
index 4c18de5..1d92df8 100644
--- a/server/src/macrotool_fieldnames.cc
+++ b/server/src/macrotool_fieldnames.cc
@@ -85,7 +85,7 @@ static std::map<std::string, std::vector<std::string> > getMacroRefsList()
Macro *macro = parser.getMacro();
std::string key = name;
- reflist[key] = getWidgetNames(macro->window);
+ reflist[key] = getWidgetNames(macro->widgets);
mfs++;
}
diff --git a/server/src/macrotool_filehandler.cc b/server/src/macrotool_filehandler.cc
index 2d9ea4e..d0245ba 100644
--- a/server/src/macrotool_filehandler.cc
+++ b/server/src/macrotool_filehandler.cc
@@ -55,7 +55,7 @@ public:
std::vector< Query > queries;
std::vector< Map > maps;
std::vector< Script > scripts;
- Widget window;
+ Widget widgets;
std::map< std::string, std::string > attributes;
Resume resume;
};
diff --git a/server/src/server.cc b/server/src/server.cc
index f75aeab..0eeec43 100644
--- a/server/src/server.cc
+++ b/server/src/server.cc
@@ -65,9 +65,9 @@ static std::string error_box(std::string message)
"<pracro version=\"1.0\">\n"
" <template name=\"error\">\n"
" <macro name=\"error\" static=\"true\">\n"
- " <window caption=\"ERROR!\" layout=\"vbox\" name=\"error\">\n"
+ " <widgets caption=\"ERROR!\" layout=\"vbox\" name=\"error\">\n"
" <textedit name=\"errorlabel\" value=\"" + message + "\"/>\n"
- " </window>\n"
+ " </widgets>\n"
" </macro>\n"
" </template>\n"
"</pracro>\n";
@@ -173,7 +173,7 @@ static std::string handleRequest(Transaction *transaction,
MacroParser mp(macrolist.getLatestVersion(macro.attributes["name"]));
mp.parse();
Macro *m = mp.getMacro();
- answer += " caption=\"" + m->window.attributes["caption"] + "\"";
+ answer += " caption=\"" + m->widgets.attributes["caption"] + "\"";
answer += ">\n";
LUAQueryMapper lqm;
@@ -225,7 +225,7 @@ static std::string handleRequest(Transaction *transaction,
MacroParser mp(macrolist.getLatestVersion(macro.attributes["name"]));
mp.parse();
Macro *m = mp.getMacro();
- answer += " caption=\"" + m->window.attributes["caption"] + "\"";
+ answer += " caption=\"" + m->widgets.attributes["caption"] + "\"";
answer += ">\n";
}
diff --git a/server/src/template.h b/server/src/template.h
index c14577e..031f068 100644
--- a/server/src/template.h
+++ b/server/src/template.h
@@ -62,7 +62,7 @@ public:
std::vector< Query > queries;
std::vector< Map > maps;
std::vector< Script > scripts;
- Widget window;
+ Widget widgets;
std::map< std::string, std::string > attributes;
Resume resume;
bool isHeader;
diff --git a/server/src/templateheaderparser.cc b/server/src/templateheaderparser.cc
index 8b0f162..8698e05 100644
--- a/server/src/templateheaderparser.cc
+++ b/server/src/templateheaderparser.cc
@@ -94,7 +94,7 @@ TemplateHeaderParser::~TemplateHeaderParser()
void TemplateHeaderParser::startTag(std::string name, std::map< std::string, std::string> attributes)
{
- // Create template and enable parsing of queries, maps and window
+ // Create template and enable parsing of queries, maps and widgets
if(name == "template") {
assert(!t); // A Template has already been allocated, cannot create template!
t = new Template();
diff --git a/server/src/templateparser.cc b/server/src/templateparser.cc
index 62be9c7..3a1e17b 100644
--- a/server/src/templateparser.cc
+++ b/server/src/templateparser.cc
@@ -95,7 +95,7 @@ void TemplateParser::startTag(std::string name, std::map< std::string, std::stri
return;
}
- // Create macro and enable parsing of queries, maps and window
+ // Create macro and enable parsing of queries, maps and widgets
if(name == "macro" || name == "header") {
if(state != TEMPLATE) error("macro found outside template.");
state = MACRO;
diff --git a/server/src/widgetgenerator.cc b/server/src/widgetgenerator.cc
index b7d6ac3..f8f3790 100644
--- a/server/src/widgetgenerator.cc
+++ b/server/src/widgetgenerator.cc
@@ -192,9 +192,9 @@ static void get_fields(Widget &widget, Fieldnames &fields)
std::string widgetgenerator(std::string cpr, Macro &macro, LUAQueryMapper &mapper, Database &db)
{
Fieldnames fields;
- get_fields(macro.window, fields);
+ get_fields(macro.widgets, fields);
Values values = db.getValues(cpr, fields);
- return send_macro_widget(macro, macro.window, " ", mapper, values);
+ return send_macro_widget(macro, macro.widgets, " ", mapper, values);
}