diff options
Diffstat (limited to 'client/macrowindow.cc')
-rw-r--r-- | client/macrowindow.cc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/client/macrowindow.cc b/client/macrowindow.cc index 583a8a0..3638ea2 100644 --- a/client/macrowindow.cc +++ b/client/macrowindow.cc @@ -213,6 +213,36 @@ void MacroWindow::cont(QString name) printf("%s : MacroWindow -> continuing...\n", macro.toStdString().c_str()); } +void MacroWindow::cont_nocommit(QString name) +{ + QString macro; + QVector< Widget* >::iterator i=widgets.begin(); + while (i != widgets.end()) { + Widget* w = *i; + if(w->getName() == name) { + macro = w->getValue(); + } + i++; + } + if(true/*doCommit()*/) { + + // FIXME: Hack to prevent XML clotching. + // The server could not differentiate the commit and the request. + delete Global::netcom; + Global::netcom = new NetCom(host, port, user, cpr); + + + // TODO: Where to get the course var?? + new_macro("example", macro); + close(); + } else { + QMessageBox::critical(NULL, "Fejl", + "Makroen er ikke udfyldt korrekt, prøv igen.\n", + QMessageBox::Ok); + } + printf("%s : MacroWindow -> continuing...\n", macro.toStdString().c_str()); +} + bool MacroWindow::isClosed() { return isclosed || mainwidget->isVisible() == false; |