diff options
author | deva <deva> | 2008-09-19 15:02:48 +0000 |
---|---|---|
committer | deva <deva> | 2008-09-19 15:02:48 +0000 |
commit | 463404ce952bffb323cd68335eb5e326d7837c88 (patch) | |
tree | 4ff0ae1740e6e0c5d9674ceaf9e2780f4b5fe2c1 | |
parent | 3541224f0fb3d5b7b531eef45318d7e41cb51915 (diff) |
Temporary frame caption solution
-rw-r--r-- | client/mainwindow.cc | 2 | ||||
-rw-r--r-- | server/src/server.cc | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/client/mainwindow.cc b/client/mainwindow.cc index 06207a5..50ca8a9 100644 --- a/client/mainwindow.cc +++ b/client/mainwindow.cc @@ -82,7 +82,7 @@ void MainWindow::update() if(macros.find(macroname) == macros.end()) { macros[macroname] = new MacroWindow(netcom, macronode, course); - QGroupBox *g = new QGroupBox(" " + macroname); + QGroupBox *g = new QGroupBox(" " + xml_elem.attribute("caption", macroname)); g->setCheckable(false); g->setChecked(false); diff --git a/server/src/server.cc b/server/src/server.cc index 5d72098..83d9157 100644 --- a/server/src/server.cc +++ b/server/src/server.cc @@ -135,9 +135,9 @@ static std::string handleTransaction(Transaction &transaction) answer += " <macro name=\"" + macro.attributes["name"] + "\" completed="; if(db.checkMacro(transaction.cpr, macro.attributes["name"])) answer += "\"true\""; else answer += "\"false\""; - answer += ">\n"; if(macro.attributes["name"] == request.macro) { + answer += ">\n"; foundmacro = true; @@ -192,6 +192,14 @@ static std::string handleTransaction(Transaction &transaction) } answer += widgetgenerator(transaction.cpr, *m, lqm, db); + } else { + // only find macro title + MacroParser mp(macro.attributes["name"]); + mp.parse(); + Macro *m = mp.getMacro(); + answer += "caption=\"" + m->window.attributes["caption"] + "\""; + answer += ">\n"; + } answer += " </macro>\n"; mi2++; |