summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/mainwindow.cc2
-rw-r--r--server/src/server.cc10
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++;