summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index e95039d..8fe9999 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -26,6 +26,8 @@
#include <qcursor.h>
#include <qwhatsthis.h>
+#include <qinputdialog.h>
+
#include <qvbox.h>
#include <kdebug.h>
#include "koprefs.h"
@@ -1126,10 +1128,20 @@ void KOTodoView::toggleRunningItem()
return;
Todo * t = mActiveItem->todo();
if ( t->isRunning() ) {
+#if 0
int result = KMessageBox::warningContinueCancel(this,
i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true);
- if (result != KMessageBox::Continue) return;
- t->setRunning( false );
+#endif
+
+ int result = KMessageBox::warningYesNoCancel(this,
+ i18n("The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is started"),i18n("Stop"),i18n("Stop+note"));
+ if (result == KMessageBox::Cancel) return;
+ if ( result == KMessageBox::No ) {
+ QString comment = QInputDialog::getText(mActiveItem->text(0).left( 25 ),i18n("Comment for todo:") );
+ t->setRunningFalse( comment );
+ } else {
+ t->setRunning( false );
+ }
mActiveItem->construct();
} else {
int result = KMessageBox::warningContinueCancel(this,