summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (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 bd7376a..904bbe2 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3946,97 +3946,97 @@ void CalendarView::editIncidence(Incidence *incidence)
3946 3946
3947void CalendarView::deleteIncidence(Incidence *incidence) 3947void CalendarView::deleteIncidence(Incidence *incidence)
3948{ 3948{
3949 //qDebug(" CalendarView::deleteIncidence "); 3949 //qDebug(" CalendarView::deleteIncidence ");
3950 if ( incidence ) { 3950 if ( incidence ) {
3951 DeleteIncidenceVisitor v; 3951 DeleteIncidenceVisitor v;
3952 v.act( incidence, this ); 3952 v.act( incidence, this );
3953 } 3953 }
3954} 3954}
3955 3955
3956 3956
3957void CalendarView::lookForOutgoingMessages() 3957void CalendarView::lookForOutgoingMessages()
3958{ 3958{
3959 OutgoingDialog *ogd = mDialogManager->outgoingDialog(); 3959 OutgoingDialog *ogd = mDialogManager->outgoingDialog();
3960 ogd->loadMessages(); 3960 ogd->loadMessages();
3961} 3961}
3962 3962
3963void CalendarView::lookForIncomingMessages() 3963void CalendarView::lookForIncomingMessages()
3964{ 3964{
3965 IncomingDialog *icd = mDialogManager->incomingDialog(); 3965 IncomingDialog *icd = mDialogManager->incomingDialog();
3966 icd->retrieve(); 3966 icd->retrieve();
3967} 3967}
3968 3968
3969bool CalendarView::removeCompletedSubTodos( Todo* t ) 3969bool CalendarView::removeCompletedSubTodos( Todo* t )
3970{ 3970{
3971 bool deleteTodo = true; 3971 bool deleteTodo = true;
3972 QPtrList<Incidence> subTodos; 3972 QPtrList<Incidence> subTodos;
3973 Incidence *aTodo; 3973 Incidence *aTodo;
3974 subTodos = t->relations(); 3974 subTodos = t->relations();
3975 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) { 3975 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) {
3976 if (! removeCompletedSubTodos( (Todo*) aTodo )) 3976 if (! removeCompletedSubTodos( (Todo*) aTodo ))
3977 deleteTodo = false; 3977 deleteTodo = false;
3978 } 3978 }
3979 if ( deleteTodo ) { 3979 if ( deleteTodo ) {
3980 if ( t->isCompleted() && !t->doesRecur()) { 3980 if ( t->isCompleted() && !t->doesRecur()) {
3981 checkExternalId( t ); 3981 checkExternalId( t );
3982 mCalendar->deleteTodo( t ); 3982 mCalendar->deleteTodo( t );
3983 changeTodoDisplay( t,KOGlobals::EVENTDELETED ); 3983 changeTodoDisplay( t,KOGlobals::EVENTDELETED );
3984 } 3984 }
3985 else 3985 else
3986 deleteTodo = false; 3986 deleteTodo = false;
3987 } 3987 }
3988 return deleteTodo; 3988 return deleteTodo;
3989 3989
3990} 3990}
3991void CalendarView::purgeCompleted() 3991void CalendarView::purgeCompleted()
3992{ 3992{
3993 int result = KMessageBox::warningContinueCancel(this, 3993 int result = KMessageBox::warningContinueCancel(this,
3994 i18n("Delete all\ncompleted To-Dos?"),i18n("Purge To-Dos"),i18n("Purge")); 3994 i18n("Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)"),i18n("Purge Todos"),i18n("Purge"));
3995 3995
3996 if (result == KMessageBox::Continue) { 3996 if (result == KMessageBox::Continue) {
3997 3997
3998 QPtrList<Todo> todoCal; 3998 QPtrList<Todo> todoCal;
3999 QPtrList<Todo> rootTodos; 3999 QPtrList<Todo> rootTodos;
4000 //QPtrList<Incidence> rel; 4000 //QPtrList<Incidence> rel;
4001 Todo *aTodo;//, *rTodo; 4001 Todo *aTodo;//, *rTodo;
4002 Incidence *rIncidence; 4002 Incidence *rIncidence;
4003 bool childDelete = false; 4003 bool childDelete = false;
4004 bool deletedOne = true; 4004 bool deletedOne = true;
4005 todoCal = calendar()->todos(); 4005 todoCal = calendar()->todos();
4006 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { 4006 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) {
4007 if ( !aTodo->relatedTo() ) 4007 if ( !aTodo->relatedTo() )
4008 rootTodos.append( aTodo ); 4008 rootTodos.append( aTodo );
4009 } 4009 }
4010 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) { 4010 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) {
4011 removeCompletedSubTodos( aTodo ); 4011 removeCompletedSubTodos( aTodo );
4012 } 4012 }
4013 4013
4014 updateView(); 4014 updateView();
4015 } 4015 }
4016} 4016}
4017 4017
4018void CalendarView::slotCalendarChanged() 4018void CalendarView::slotCalendarChanged()
4019{ 4019{
4020 ; 4020 ;
4021} 4021}
4022 4022
4023void CalendarView::keyPressEvent ( QKeyEvent *e) 4023void CalendarView::keyPressEvent ( QKeyEvent *e)
4024{ 4024{
4025 //qDebug(" alendarView::keyPressEvent "); 4025 //qDebug(" alendarView::keyPressEvent ");
4026 e->ignore(); 4026 e->ignore();
4027} 4027}
4028 4028
4029 4029
4030bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) 4030bool CalendarView::sync(KSyncManager* manager, QString filename, int mode)
4031{ 4031{
4032 // mSyncManager = manager; 4032 // mSyncManager = manager;
4033 if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) { 4033 if ( filename == QDir::homeDirPath ()+"/.kdecalendardump.ics" ) {
4034 qDebug("KO: SyncKDE request detected!"); 4034 qDebug("KO: SyncKDE request detected!");
4035 } 4035 }
4036 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); 4036 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
4037 mCurrentSyncName = mSyncManager->getCurrentSyncName(); 4037 mCurrentSyncName = mSyncManager->getCurrentSyncName();
4038 return syncCalendar( filename, mode ); 4038 return syncCalendar( filename, mode );
4039} 4039}
4040bool CalendarView::syncExternal(KSyncManager* manager, QString resource) 4040bool CalendarView::syncExternal(KSyncManager* manager, QString resource)
4041{ 4041{
4042 //mSyncManager = manager; 4042 //mSyncManager = manager;