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) (unidiff)
tree5f4e6aa51ef357c6d9ecbe4d9a2908b8c2ca1228 /korganizer
parent04fe8f3523c46511e846a42e4bb92d6b8d33758b (diff)
downloadkdepimpi-ef11b9d4de01d601bfcfb8efacb0aeff1e657edb.zip
kdepimpi-ef11b9d4de01d601bfcfb8efacb0aeff1e657edb.tar.gz
kdepimpi-ef11b9d4de01d601bfcfb8efacb0aeff1e657edb.tar.bz2
fix
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp21
-rw-r--r--korganizer/kotodoview.cpp6
2 files changed, 24 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index c530037..bd7376a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2701,17 +2701,38 @@ void CalendarView::cloneIncidence(Incidence * orgInc )
2701{ 2701{
2702 Incidence * newInc = orgInc->clone(); 2702 Incidence * newInc = orgInc->clone();
2703 newInc->recreate(); 2703 newInc->recreate();
2704 2704
2705 if ( newInc->type() == "Todo" ) { 2705 if ( newInc->type() == "Todo" ) {
2706 Todo* t = (Todo*) newInc; 2706 Todo* t = (Todo*) newInc;
2707 bool cloneSub = false;
2708 if ( orgInc->relations().count() ) {
2709 int result = KMessageBox::warningYesNoCancel(this,
2710 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 ) ),
2711 i18n("Todo has subtodos"),
2712 i18n("Yes"),
2713 i18n("No"));
2714
2715 if ( result == KMessageBox::Cancel ) {
2716 delete t;
2717 return;
2718 }
2719 if (result == KMessageBox::Yes) cloneSub = true;
2720 }
2707 showTodoEditor(); 2721 showTodoEditor();
2708 mTodoEditor->editTodo( t ); 2722 mTodoEditor->editTodo( t );
2709 if ( mTodoEditor->exec() ) { 2723 if ( mTodoEditor->exec() ) {
2724 if ( cloneSub ) {
2725 orgInc->cloneRelations( t );
2726 mCalendar->addIncidenceBranch( t );
2727 updateView();
2728
2729 } else {
2710 mCalendar->addTodo( t ); 2730 mCalendar->addTodo( t );
2711 updateView(); 2731 updateView();
2732 }
2712 } else { 2733 } else {
2713 delete t; 2734 delete t;
2714 } 2735 }
2715 } 2736 }
2716 else { 2737 else {
2717 Event* e = (Event*) newInc; 2738 Event* e = (Event*) newInc;
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 7ee1eef..9b5d4ce 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -1116,25 +1116,25 @@ void KOTodoView::itemDoubleClicked(QListViewItem *item)
1116 editItem( item ); 1116 editItem( item );
1117 else 1117 else
1118 showItem( item , QPoint(), 0 ); 1118 showItem( item , QPoint(), 0 );
1119} 1119}
1120void KOTodoView::toggleRunningItem() 1120void KOTodoView::toggleRunningItem()
1121{ 1121{
1122 qDebug("KOTodoView::toggleRunning() "); 1122 // qDebug("KOTodoView::toggleRunning() ");
1123 if ( ! mActiveItem ) 1123 if ( ! mActiveItem )
1124 return; 1124 return;
1125 Todo * t = mActiveItem->todo(); 1125 Todo * t = mActiveItem->todo();
1126 if ( t->isRunning() ) { 1126 if ( t->isRunning() ) {
1127 int result = KMessageBox::warningContinueCancel(this, 1127 int result = KMessageBox::warningContinueCancel(this,
1128 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); 1128 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);
1129 if (result != KMessageBox::Continue) return; 1129 if (result != KMessageBox::Continue) return;
1130 t->setRunning( false ); 1130 t->setRunning( false );
1131 mActiveItem->construct(); 1131 mActiveItem->construct();
1132 } else { 1132 } else {
1133 int result = KMessageBox::warningContinueCancel(this, 1133 int result = KMessageBox::warningContinueCancel(this,
1134 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); 1134 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);
1135 if (result != KMessageBox::Continue) return; 1135 if (result != KMessageBox::Continue) return;
1136 t->setRunning( true ); 1136 t->setRunning( true );
1137 mActiveItem->construct(); 1137 mActiveItem->construct();
1138 } 1138 }
1139} 1139}
1140 1140