From 0c366ed6b09c06439f3349b220e803b21e4547b9 Mon Sep 17 00:00:00 2001 From: deva Date: Wed, 10 Sep 2008 09:03:48 +0000 Subject: Added continue without commit action to buttons. --- client/macrowindow.cc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'client/macrowindow.cc') 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; -- cgit v1.2.3