author | zautrix <zautrix> | 2005-04-28 09:08:21 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-28 09:08:21 (UTC) |
commit | 8fbdf5d2b0ee1e1496cb856e0ead37c668066353 (patch) (side-by-side diff) | |
tree | 964dd57f1492857fb9471a0af9943d08c56e5c6e /korganizer | |
parent | 42786862c89c0de78cec783f251eae66bcbc53db (diff) | |
download | kdepimpi-8fbdf5d2b0ee1e1496cb856e0ead37c668066353.zip kdepimpi-8fbdf5d2b0ee1e1496cb856e0ead37c668066353.tar.gz kdepimpi-8fbdf5d2b0ee1e1496cb856e0ead37c668066353.tar.bz2 |
added comment for todo
-rw-r--r-- | korganizer/kotodoview.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index e95039d..8fe9999 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -21,16 +21,18 @@ without including the source code for Qt in the source distribution. */ #include <qlayout.h> #include <qheader.h> #include <qcursor.h> #include <qwhatsthis.h> +#include <qinputdialog.h> + #include <qvbox.h> #include <kdebug.h> #include "koprefs.h" #include <klocale.h> #include <kglobal.h> #include <kiconloader.h> #include <kmessagebox.h> @@ -1121,20 +1123,30 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item) } void KOTodoView::toggleRunningItem() { // qDebug("KOTodoView::toggleRunning() "); if ( ! mActiveItem ) 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; +#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, i18n("The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?").arg(mActiveItem->text(0).left( 25 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true); if (result != KMessageBox::Continue) return; t->setRunning( true ); mActiveItem->construct(); } |