summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-04-10 13:17:21 (UTC)
committer zautrix <zautrix>2005-04-10 13:17:21 (UTC)
commitef11b9d4de01d601bfcfb8efacb0aeff1e657edb (patch) (side-by-side diff)
tree5f4e6aa51ef357c6d9ecbe4d9a2908b8c2ca1228 /korganizer
parent04fe8f3523c46511e846a42e4bb92d6b8d33758b (diff)
downloadkdepimpi-ef11b9d4de01d601bfcfb8efacb0aeff1e657edb.zip
kdepimpi-ef11b9d4de01d601bfcfb8efacb0aeff1e657edb.tar.gz
kdepimpi-ef11b9d4de01d601bfcfb8efacb0aeff1e657edb.tar.bz2
fix
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp25
-rw-r--r--korganizer/kotodoview.cpp6
2 files changed, 26 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index c530037..bd7376a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2706,2 +2706,16 @@ void CalendarView::cloneIncidence(Incidence * orgInc )
Todo* t = (Todo*) newInc;
+ bool cloneSub = false;
+ if ( orgInc->relations().count() ) {
+ int result = KMessageBox::warningYesNoCancel(this,
+ i18n("The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?").arg( newInc->summary().left ( 25 ) ),
+ i18n("Todo has subtodos"),
+ i18n("Yes"),
+ i18n("No"));
+
+ if ( result == KMessageBox::Cancel ) {
+ delete t;
+ return;
+ }
+ if (result == KMessageBox::Yes) cloneSub = true;
+ }
showTodoEditor();
@@ -2709,4 +2723,11 @@ void CalendarView::cloneIncidence(Incidence * orgInc )
if ( mTodoEditor->exec() ) {
- mCalendar->addTodo( t );
- updateView();
+ if ( cloneSub ) {
+ orgInc->cloneRelations( t );
+ mCalendar->addIncidenceBranch( t );
+ updateView();
+
+ } else {
+ mCalendar->addTodo( t );
+ updateView();
+ }
} else {
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 7ee1eef..9b5d4ce 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -1121,3 +1121,3 @@ void KOTodoView::toggleRunningItem()
{
- qDebug("KOTodoView::toggleRunning() ");
+ // qDebug("KOTodoView::toggleRunning() ");
if ( ! mActiveItem )
@@ -1127,3 +1127,3 @@ void KOTodoView::toggleRunningItem()
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( 20 ) ),i18n("Todo is started"),i18n("Stop todo"),i18n("Cancel"), true);
+ 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;
@@ -1133,3 +1133,3 @@ void KOTodoView::toggleRunningItem()
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( 20 ) ),i18n("Todo is stopped"),i18n("Start todo"),i18n("Cancel"), true);
+ 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;