summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Unidiff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 2ba8528..e31a6e1 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3991,50 +3991,50 @@ void CalendarView::todo_unsub(Todo *anTodo )
3991 3991
3992void CalendarView::deleteTodo(Todo *todo) 3992void CalendarView::deleteTodo(Todo *todo)
3993{ 3993{
3994 if (!todo) { 3994 if (!todo) {
3995 KNotifyClient::beep(); 3995 KNotifyClient::beep();
3996 return; 3996 return;
3997 } 3997 }
3998 if (KOPrefs::instance()->mConfirm) { 3998 if (KOPrefs::instance()->mConfirm) {
3999 QString text = KGlobal::formatMessage ( todo->summary(),0 ); 3999 QString text = KGlobal::formatMessage ( todo->summary(),0 );
4000 if (!todo->relations().isEmpty()) { 4000 if (!todo->relations().isEmpty()) {
4001 text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!"); 4001 text += i18n("\nhas sub-todos.\nAll completed sub-todos\nwill be deleted as well!");
4002 4002
4003 } 4003 }
4004 switch (msgItemDelete(i18n("Todo:") +"\n"+text)) { 4004 switch (msgItemDelete(i18n("Todo:") +"\n"+text)) {
4005 case KMessageBox::Continue: // OK 4005 case KMessageBox::Continue: // OK
4006 bool deleteT = false; 4006 bool deleteT = false;
4007 if (!todo->relations().isEmpty()) { 4007 if (!todo->relations().isEmpty()) {
4008 deleteT = removeCompletedSubTodos( todo ); 4008 deleteT = removeCompletedSubTodos( todo );
4009 } 4009 }
4010 // deleteT == true: todo already deleted in removeCompletedSubTodos 4010 // deleteT == true: todo already deleted in removeCompletedSubTodos
4011 if ( !deleteT ) { 4011 if ( !deleteT ) {
4012 checkExternalId( todo ); 4012 checkExternalId( todo );
4013 calendar()->deleteTodo(todo); 4013 calendar()->deleteTodo(todo);
4014 changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); 4014 changeTodoDisplay( todo,KOGlobals::EVENTDELETED );
4015 updateView();
4016 } 4015 }
4016 updateView();
4017 break; 4017 break;
4018 } // switch 4018 } // switch
4019 } else { 4019 } else {
4020 checkExternalId( todo ); 4020 checkExternalId( todo );
4021 mCalendar->deleteTodo(todo); 4021 mCalendar->deleteTodo(todo);
4022 changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); 4022 changeTodoDisplay( todo,KOGlobals::EVENTDELETED );
4023 updateView(); 4023 updateView();
4024 } 4024 }
4025 4025
4026 emit updateSearchDialog(); 4026 emit updateSearchDialog();
4027} 4027}
4028void CalendarView::deleteJournal(Journal *jour) 4028void CalendarView::deleteJournal(Journal *jour)
4029{ 4029{
4030 if (!jour) { 4030 if (!jour) {
4031 KNotifyClient::beep(); 4031 KNotifyClient::beep();
4032 return; 4032 return;
4033 } 4033 }
4034 if (KOPrefs::instance()->mConfirm) { 4034 if (KOPrefs::instance()->mConfirm) {
4035 4035
4036 QString des; 4036 QString des;
4037 if ( !jour->summary().isEmpty() ) { 4037 if ( !jour->summary().isEmpty() ) {
4038 des = jour->summary(); 4038 des = jour->summary();
4039 } else { 4039 } else {
4040 des = jour->description().left(30); 4040 des = jour->description().left(30);