summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index b56f1f9..04051a2 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3601,133 +3601,134 @@ void CalendarView::deleteIncidence()
3601 } 3601 }
3602} 3602}
3603 3603
3604void CalendarView::showIncidence(Incidence *incidence) 3604void CalendarView::showIncidence(Incidence *incidence)
3605{ 3605{
3606 if ( incidence ) { 3606 if ( incidence ) {
3607 ShowIncidenceVisitor v; 3607 ShowIncidenceVisitor v;
3608 v.act( incidence, this ); 3608 v.act( incidence, this );
3609 } 3609 }
3610} 3610}
3611 3611
3612void CalendarView::editIncidence(Incidence *incidence) 3612void CalendarView::editIncidence(Incidence *incidence)
3613{ 3613{
3614 if ( incidence ) { 3614 if ( incidence ) {
3615 3615
3616 EditIncidenceVisitor v; 3616 EditIncidenceVisitor v;
3617 v.act( incidence, this ); 3617 v.act( incidence, this );
3618 3618
3619 } 3619 }
3620} 3620}
3621 3621
3622void CalendarView::deleteIncidence(Incidence *incidence) 3622void CalendarView::deleteIncidence(Incidence *incidence)
3623{ 3623{
3624 //qDebug(" CalendarView::deleteIncidence "); 3624 //qDebug(" CalendarView::deleteIncidence ");
3625 if ( incidence ) { 3625 if ( incidence ) {
3626 DeleteIncidenceVisitor v; 3626 DeleteIncidenceVisitor v;
3627 v.act( incidence, this ); 3627 v.act( incidence, this );
3628 } 3628 }
3629} 3629}
3630 3630
3631 3631
3632void CalendarView::lookForOutgoingMessages() 3632void CalendarView::lookForOutgoingMessages()
3633{ 3633{
3634 OutgoingDialog *ogd = mDialogManager->outgoingDialog(); 3634 OutgoingDialog *ogd = mDialogManager->outgoingDialog();
3635 ogd->loadMessages(); 3635 ogd->loadMessages();
3636} 3636}
3637 3637
3638void CalendarView::lookForIncomingMessages() 3638void CalendarView::lookForIncomingMessages()
3639{ 3639{
3640 IncomingDialog *icd = mDialogManager->incomingDialog(); 3640 IncomingDialog *icd = mDialogManager->incomingDialog();
3641 icd->retrieve(); 3641 icd->retrieve();
3642} 3642}
3643 3643
3644bool CalendarView::removeCompletedSubTodos( Todo* t ) 3644bool CalendarView::removeCompletedSubTodos( Todo* t )
3645{ 3645{
3646 bool deleteTodo = true; 3646 bool deleteTodo = true;
3647 QPtrList<Incidence> subTodos; 3647 QPtrList<Incidence> subTodos;
3648 Incidence *aTodo; 3648 Incidence *aTodo;
3649 subTodos = t->relations(); 3649 subTodos = t->relations();
3650 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) { 3650 for (aTodo = subTodos.first(); aTodo; aTodo = subTodos.next()) {
3651 if (! removeCompletedSubTodos( (Todo*) aTodo )) 3651 if (! removeCompletedSubTodos( (Todo*) aTodo ))
3652 deleteTodo = false; 3652 deleteTodo = false;
3653 } 3653 }
3654 if ( deleteTodo ) { 3654 if ( deleteTodo ) {
3655 if ( t->isCompleted() ) { 3655 if ( t->isCompleted() ) {
3656 checkExternalId( t ); 3656 checkExternalId( t );
3657 mCalendar->deleteTodo( t ); 3657 mCalendar->deleteTodo( t );
3658 changeTodoDisplay( t,KOGlobals::EVENTDELETED ); 3658 changeTodoDisplay( t,KOGlobals::EVENTDELETED );
3659 } 3659 }
3660 else 3660 else
3661 deleteTodo = false; 3661 deleteTodo = false;
3662 } 3662 }
3663 return deleteTodo; 3663 return deleteTodo;
3664 3664
3665} 3665}
3666void CalendarView::purgeCompleted() 3666void CalendarView::purgeCompleted()
3667{ 3667{
3668 int result = KMessageBox::warningContinueCancel(this, 3668 int result = KMessageBox::warningContinueCancel(this,
3669 i18n("Delete all\ncompleted To-Dos?"),i18n("Purge To-Dos"),i18n("Purge")); 3669 i18n("Delete all\ncompleted To-Dos?"),i18n("Purge To-Dos"),i18n("Purge"));
3670 3670
3671 if (result == KMessageBox::Continue) { 3671 if (result == KMessageBox::Continue) {
3672 3672
3673 QPtrList<Todo> todoCal; 3673 QPtrList<Todo> todoCal;
3674 QPtrList<Todo> rootTodos; 3674 QPtrList<Todo> rootTodos;
3675 //QPtrList<Incidence> rel; 3675 //QPtrList<Incidence> rel;
3676 Todo *aTodo;//, *rTodo; 3676 Todo *aTodo;//, *rTodo;
3677 Incidence *rIncidence; 3677 Incidence *rIncidence;
3678 bool childDelete = false; 3678 bool childDelete = false;
3679 bool deletedOne = true; 3679 bool deletedOne = true;
3680 todoCal = calendar()->todos(); 3680 todoCal = calendar()->todos();
3681 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) { 3681 for (aTodo = todoCal.first(); aTodo; aTodo = todoCal.next()) {
3682 if ( !aTodo->relatedTo() ) 3682 if ( !aTodo->relatedTo() )
3683 rootTodos.append( aTodo ); 3683 rootTodos.append( aTodo );
3684 } 3684 }
3685 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) { 3685 for (aTodo = rootTodos.first(); aTodo; aTodo = rootTodos.next()) {
3686 removeCompletedSubTodos( aTodo ); 3686 removeCompletedSubTodos( aTodo );
3687 } 3687 }
3688 3688
3689 updateView(); 3689 updateView();
3690 } 3690 }
3691} 3691}
3692 3692
3693void CalendarView::slotCalendarChanged() 3693void CalendarView::slotCalendarChanged()
3694{ 3694{
3695 ; 3695 ;
3696} 3696}
3697 3697
3698NavigatorBar *CalendarView::navigatorBar() 3698NavigatorBar *CalendarView::navigatorBar()
3699{ 3699{
3700 return mNavigatorBar; 3700 return mNavigatorBar;
3701} 3701}
3702 3702
3703 3703
3704 3704
3705void CalendarView::keyPressEvent ( QKeyEvent *e) 3705void CalendarView::keyPressEvent ( QKeyEvent *e)
3706{ 3706{
3707 //qDebug(" alendarView::keyPressEvent "); 3707 //qDebug(" alendarView::keyPressEvent ");
3708 e->ignore(); 3708 e->ignore();
3709} 3709}
3710 3710
3711 3711
3712bool CalendarView::sync(KSyncManager* manager, QString filename, int mode) 3712bool CalendarView::sync(KSyncManager* manager, QString filename, int mode)
3713{ 3713{
3714 // mSyncManager = manager; 3714 // mSyncManager = manager;
3715 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); 3715 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
3716 mCurrentSyncName = mSyncManager->getCurrentSyncName(); 3716 mCurrentSyncName = mSyncManager->getCurrentSyncName();
3717 return syncCalendar( filename, mode ); 3717 return syncCalendar( filename, mode );
3718} 3718}
3719bool CalendarView::syncExternal(KSyncManager* manager, QString resource) 3719bool CalendarView::syncExternal(KSyncManager* manager, QString resource)
3720{ 3720{
3721 //mSyncManager = manager; 3721 //mSyncManager = manager;
3722 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice(); 3722 mCurrentSyncDevice = mSyncManager->getCurrentSyncDevice();
3723 mCurrentSyncName = mSyncManager->getCurrentSyncName(); 3723 mCurrentSyncName = mSyncManager->getCurrentSyncName();
3724 if ( resource == "sharp" ) 3724 if ( resource == "sharp" )
3725 syncExternal( 0 ); 3725 syncExternal( 0 );
3726 if ( resource == "phone" ) 3726 if ( resource == "phone" )
3727 syncExternal( 1 ); 3727 syncExternal( 1 );
3728 // pending setmodified 3728 // pending setmodified
3729 return true;
3729} 3730}
3730void CalendarView::setSyncManager(KSyncManager* manager) 3731void CalendarView::setSyncManager(KSyncManager* manager)
3731{ 3732{
3732 mSyncManager = manager; 3733 mSyncManager = manager;
3733} 3734}