summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index d6918d3..6eaac1c 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -3421,391 +3421,395 @@ bool CalendarView::exportVCalendar( QString filename )
3421 if (filename.right(4) != ".vcs") filename += ".vcs"; 3421 if (filename.right(4) != ".vcs") filename += ".vcs";
3422 3422
3423 FileStorage storage( mCalendar, filename, new VCalFormat ); 3423 FileStorage storage( mCalendar, filename, new VCalFormat );
3424 return storage.save(); 3424 return storage.save();
3425 3425
3426} 3426}
3427 3427
3428void CalendarView::eventUpdated(Incidence *) 3428void CalendarView::eventUpdated(Incidence *)
3429{ 3429{
3430 setModified(); 3430 setModified();
3431 // Don't call updateView here. The code, which has caused the update of the 3431 // Don't call updateView here. The code, which has caused the update of the
3432 // event is responsible for updating the view. 3432 // event is responsible for updating the view.
3433 // updateView(); 3433 // updateView();
3434} 3434}
3435 3435
3436void CalendarView::adaptNavigationUnits() 3436void CalendarView::adaptNavigationUnits()
3437{ 3437{
3438 if (mViewManager->currentView()->isEventView()) { 3438 if (mViewManager->currentView()->isEventView()) {
3439 int days = mViewManager->currentView()->currentDateCount(); 3439 int days = mViewManager->currentView()->currentDateCount();
3440 if (days == 1) { 3440 if (days == 1) {
3441 emit changeNavStringPrev(i18n("&Previous Day")); 3441 emit changeNavStringPrev(i18n("&Previous Day"));
3442 emit changeNavStringNext(i18n("&Next Day")); 3442 emit changeNavStringNext(i18n("&Next Day"));
3443 } else { 3443 } else {
3444 emit changeNavStringPrev(i18n("&Previous Week")); 3444 emit changeNavStringPrev(i18n("&Previous Week"));
3445 emit changeNavStringNext(i18n("&Next Week")); 3445 emit changeNavStringNext(i18n("&Next Week"));
3446 } 3446 }
3447 } 3447 }
3448} 3448}
3449 3449
3450void CalendarView::processMainViewSelection( Incidence *incidence ) 3450void CalendarView::processMainViewSelection( Incidence *incidence )
3451{ 3451{
3452 if ( incidence ) mTodoList->clearSelection(); 3452 if ( incidence ) mTodoList->clearSelection();
3453 processIncidenceSelection( incidence ); 3453 processIncidenceSelection( incidence );
3454} 3454}
3455 3455
3456void CalendarView::processTodoListSelection( Incidence *incidence ) 3456void CalendarView::processTodoListSelection( Incidence *incidence )
3457{ 3457{
3458 if ( incidence && mViewManager->currentView() ) { 3458 if ( incidence && mViewManager->currentView() ) {
3459 mViewManager->currentView()->clearSelection(); 3459 mViewManager->currentView()->clearSelection();
3460 } 3460 }
3461 processIncidenceSelection( incidence ); 3461 processIncidenceSelection( incidence );
3462} 3462}
3463 3463
3464void CalendarView::processIncidenceSelection( Incidence *incidence ) 3464void CalendarView::processIncidenceSelection( Incidence *incidence )
3465{ 3465{
3466 if ( incidence == mSelectedIncidence ) return; 3466 if ( incidence == mSelectedIncidence ) return;
3467 3467
3468 mSelectedIncidence = incidence; 3468 mSelectedIncidence = incidence;
3469 3469
3470 emit incidenceSelected( mSelectedIncidence ); 3470 emit incidenceSelected( mSelectedIncidence );
3471 3471
3472 if ( incidence && incidence->type() == "Event" ) { 3472 if ( incidence && incidence->type() == "Event" ) {
3473 Event *event = static_cast<Event *>( incidence ); 3473 Event *event = static_cast<Event *>( incidence );
3474 if ( event->organizer() == KOPrefs::instance()->email() ) { 3474 if ( event->organizer() == KOPrefs::instance()->email() ) {
3475 emit organizerEventsSelected( true ); 3475 emit organizerEventsSelected( true );
3476 } else { 3476 } else {
3477 emit organizerEventsSelected(false); 3477 emit organizerEventsSelected(false);
3478 } 3478 }
3479 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, 3479 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails,
3480 KOPrefs::instance()->email() ) ) { 3480 KOPrefs::instance()->email() ) ) {
3481 emit groupEventsSelected( true ); 3481 emit groupEventsSelected( true );
3482 } else { 3482 } else {
3483 emit groupEventsSelected(false); 3483 emit groupEventsSelected(false);
3484 } 3484 }
3485 return; 3485 return;
3486 } else { 3486 } else {
3487 if ( incidence && incidence->type() == "Todo" ) { 3487 if ( incidence && incidence->type() == "Todo" ) {
3488 emit todoSelected( true ); 3488 emit todoSelected( true );
3489 Todo *event = static_cast<Todo *>( incidence ); 3489 Todo *event = static_cast<Todo *>( incidence );
3490 if ( event->organizer() == KOPrefs::instance()->email() ) { 3490 if ( event->organizer() == KOPrefs::instance()->email() ) {
3491 emit organizerEventsSelected( true ); 3491 emit organizerEventsSelected( true );
3492 } else { 3492 } else {
3493 emit organizerEventsSelected(false); 3493 emit organizerEventsSelected(false);
3494 } 3494 }
3495 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails, 3495 if (event->attendeeByMails( KOPrefs::instance()->mAdditionalMails,
3496 KOPrefs::instance()->email() ) ) { 3496 KOPrefs::instance()->email() ) ) {
3497 emit groupEventsSelected( true ); 3497 emit groupEventsSelected( true );
3498 } else { 3498 } else {
3499 emit groupEventsSelected(false); 3499 emit groupEventsSelected(false);
3500 } 3500 }
3501 return; 3501 return;
3502 } else { 3502 } else {
3503 emit todoSelected( false ); 3503 emit todoSelected( false );
3504 emit organizerEventsSelected(false); 3504 emit organizerEventsSelected(false);
3505 emit groupEventsSelected(false); 3505 emit groupEventsSelected(false);
3506 } 3506 }
3507 return; 3507 return;
3508 } 3508 }
3509 3509
3510 /* if ( incidence && incidence->type() == "Todo" ) { 3510 /* if ( incidence && incidence->type() == "Todo" ) {
3511 emit todoSelected( true ); 3511 emit todoSelected( true );
3512 } else { 3512 } else {
3513 emit todoSelected( false ); 3513 emit todoSelected( false );
3514 }*/ 3514 }*/
3515} 3515}
3516 3516
3517 3517
3518void CalendarView::checkClipboard() 3518void CalendarView::checkClipboard()
3519{ 3519{
3520#ifndef KORG_NODND 3520#ifndef KORG_NODND
3521 if (ICalDrag::canDecode(QApplication::clipboard()->data())) { 3521 if (ICalDrag::canDecode(QApplication::clipboard()->data())) {
3522 emit pasteEnabled(true); 3522 emit pasteEnabled(true);
3523 } else { 3523 } else {
3524 emit pasteEnabled(false); 3524 emit pasteEnabled(false);
3525 } 3525 }
3526#endif 3526#endif
3527} 3527}
3528 3528
3529void CalendarView::showDates(const DateList &selectedDates) 3529void CalendarView::showDates(const DateList &selectedDates)
3530{ 3530{
3531 // kdDebug() << "CalendarView::selectDates()" << endl; 3531 // kdDebug() << "CalendarView::selectDates()" << endl;
3532 3532
3533 3533
3534 if ( !mBlockShowDates ) { 3534 if ( !mBlockShowDates ) {
3535 if ( mViewManager->currentView() ) { 3535 if ( mViewManager->currentView() ) {
3536 updateView( selectedDates.first(), selectedDates.last() ); 3536 updateView( selectedDates.first(), selectedDates.last() );
3537 } else { 3537 } else {
3538 mViewManager->showAgendaView(); 3538 mViewManager->showAgendaView();
3539 } 3539 }
3540 } 3540 }
3541 3541
3542 QString selDates; 3542 QString selDates;
3543 selDates = KGlobal::locale()->formatDate( selectedDates.first(), true); 3543 selDates = KGlobal::locale()->formatDate( selectedDates.first(), true);
3544 if (selectedDates.first() < selectedDates.last() ) 3544 if (selectedDates.first() < selectedDates.last() )
3545 selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true); 3545 selDates += " - " + KGlobal::locale()->formatDate( selectedDates.last(),true);
3546 else { 3546 else {
3547 QString addString; 3547 QString addString;
3548 if ( selectedDates.first() == QDateTime::currentDateTime().date() ) 3548 if ( selectedDates.first() == QDateTime::currentDateTime().date() )
3549 addString = i18n("Today"); 3549 addString = i18n("Today");
3550 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(1) ) 3550 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(1) )
3551 addString = i18n("Tomorrow"); 3551 addString = i18n("Tomorrow");
3552 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) ) 3552 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) )
3553 addString = i18n("Yesterday"); 3553 addString = i18n("Yesterday");
3554 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) ) 3554 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) )
3555 addString = i18n("Day before yesterday"); 3555 addString = i18n("Day before yesterday");
3556 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(2) ) 3556 else if ( selectedDates.first() == QDateTime::currentDateTime().date().addDays(2) )
3557 addString = i18n("Day after tomorrow"); 3557 addString = i18n("Day after tomorrow");
3558 if ( !addString.isEmpty() ) { 3558 if ( !addString.isEmpty() ) {
3559 topLevelWidget()->setCaption( addString+", " + selDates ); 3559 topLevelWidget()->setCaption( addString+", " + selDates );
3560 return; 3560 return;
3561 } 3561 }
3562 } 3562 }
3563 topLevelWidget()->setCaption( i18n("Dates: ") + selDates ); 3563 topLevelWidget()->setCaption( i18n("Dates: ") + selDates );
3564 3564
3565} 3565}
3566 3566
3567QPtrList<CalFilter> CalendarView::filters() 3567QPtrList<CalFilter> CalendarView::filters()
3568{ 3568{
3569 return mFilters; 3569 return mFilters;
3570 3570
3571} 3571}
3572void CalendarView::editFilters() 3572void CalendarView::editFilters()
3573{ 3573{
3574 // kdDebug() << "CalendarView::editFilters()" << endl; 3574 // kdDebug() << "CalendarView::editFilters()" << endl;
3575 3575
3576 CalFilter *filter = mFilters.first(); 3576 CalFilter *filter = mFilters.first();
3577 while(filter) { 3577 while(filter) {
3578 kdDebug() << " Filter: " << filter->name() << endl; 3578 kdDebug() << " Filter: " << filter->name() << endl;
3579 filter = mFilters.next(); 3579 filter = mFilters.next();
3580 } 3580 }
3581 3581
3582 mDialogManager->showFilterEditDialog(&mFilters); 3582 mDialogManager->showFilterEditDialog(&mFilters);
3583} 3583}
3584void CalendarView::toggleFilter() 3584void CalendarView::toggleFilter()
3585{ 3585{
3586 showFilter(! mFilterView->isVisible()); 3586 showFilter(! mFilterView->isVisible());
3587} 3587}
3588 3588
3589KOFilterView *CalendarView::filterView() 3589KOFilterView *CalendarView::filterView()
3590{ 3590{
3591 return mFilterView; 3591 return mFilterView;
3592} 3592}
3593void CalendarView::selectFilter( int fil ) 3593void CalendarView::selectFilter( int fil )
3594{ 3594{
3595 mFilterView->setSelectedFilter( fil ); 3595 mFilterView->setSelectedFilter( fil );
3596} 3596}
3597void CalendarView::showFilter(bool visible) 3597void CalendarView::showFilter(bool visible)
3598{ 3598{
3599 if (visible) mFilterView->show(); 3599 if (visible) mFilterView->show();
3600 else mFilterView->hide(); 3600 else mFilterView->hide();
3601} 3601}
3602void CalendarView::toggleFilerEnabled( ) 3602void CalendarView::toggleFilerEnabled( )
3603{ 3603{
3604 mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() ); 3604 mFilterView->setFiltersEnabled ( !mFilterView->filtersEnabled() );
3605 if ( !mFilterView->filtersEnabled() ) 3605 if ( !mFilterView->filtersEnabled() )
3606 topLevelWidget()->setCaption( i18n("Filter disabled ") ); 3606 topLevelWidget()->setCaption( i18n("Filter disabled ") );
3607 3607
3608} 3608}
3609void CalendarView::updateFilter() 3609void CalendarView::updateFilter()
3610{ 3610{
3611 CalFilter *filter = mFilterView->selectedFilter(); 3611 CalFilter *filter = mFilterView->selectedFilter();
3612 if (filter) { 3612 if (filter) {
3613 QString mess;
3613 if (mFilterView->filtersEnabled()) { 3614 if (mFilterView->filtersEnabled()) {
3614 topLevelWidget()->setCaption( i18n("Filter selected: ")+filter->name() ); 3615 mess = i18n("Filter selected: ")+filter->name();
3615 filter->setEnabled(true); 3616 filter->setEnabled(true);
3616 } 3617 }
3617 else filter->setEnabled(false); 3618 else filter->setEnabled(false);
3618 mCalendar->setFilter(filter); 3619 mCalendar->setFilter(filter);
3619 updateView(); 3620 updateView();
3621 if ( !mess.isEmpty() )
3622 topLevelWidget()->setCaption( mess );
3623
3620 } 3624 }
3621} 3625}
3622 3626
3623void CalendarView::filterEdited() 3627void CalendarView::filterEdited()
3624{ 3628{
3625 mFilterView->updateFilters(); 3629 mFilterView->updateFilters();
3626 updateFilter(); 3630 updateFilter();
3627 writeSettings(); 3631 writeSettings();
3628} 3632}
3629 3633
3630 3634
3631void CalendarView::takeOverEvent() 3635void CalendarView::takeOverEvent()
3632{ 3636{
3633 Incidence *incidence = currentSelection(); 3637 Incidence *incidence = currentSelection();
3634 3638
3635 if (!incidence) return; 3639 if (!incidence) return;
3636 3640
3637 incidence->setOrganizer(KOPrefs::instance()->email()); 3641 incidence->setOrganizer(KOPrefs::instance()->email());
3638 incidence->recreate(); 3642 incidence->recreate();
3639 incidence->setReadOnly(false); 3643 incidence->setReadOnly(false);
3640 3644
3641 updateView(); 3645 updateView();
3642} 3646}
3643 3647
3644void CalendarView::takeOverCalendar() 3648void CalendarView::takeOverCalendar()
3645{ 3649{
3646 // TODO: Create Calendar::allIncidences() function and use it here 3650 // TODO: Create Calendar::allIncidences() function and use it here
3647 3651
3648 QPtrList<Event> events = mCalendar->events(); 3652 QPtrList<Event> events = mCalendar->events();
3649 for(uint i=0; i<events.count(); ++i) { 3653 for(uint i=0; i<events.count(); ++i) {
3650 events.at(i)->setOrganizer(KOPrefs::instance()->email()); 3654 events.at(i)->setOrganizer(KOPrefs::instance()->email());
3651 events.at(i)->recreate(); 3655 events.at(i)->recreate();
3652 events.at(i)->setReadOnly(false); 3656 events.at(i)->setReadOnly(false);
3653 } 3657 }
3654 3658
3655 QPtrList<Todo> todos = mCalendar->todos(); 3659 QPtrList<Todo> todos = mCalendar->todos();
3656 for(uint i=0; i<todos.count(); ++i) { 3660 for(uint i=0; i<todos.count(); ++i) {
3657 todos.at(i)->setOrganizer(KOPrefs::instance()->email()); 3661 todos.at(i)->setOrganizer(KOPrefs::instance()->email());
3658 todos.at(i)->recreate(); 3662 todos.at(i)->recreate();
3659 todos.at(i)->setReadOnly(false); 3663 todos.at(i)->setReadOnly(false);
3660 } 3664 }
3661 3665
3662 QPtrList<Journal> journals = mCalendar->journals(); 3666 QPtrList<Journal> journals = mCalendar->journals();
3663 for(uint i=0; i<journals.count(); ++i) { 3667 for(uint i=0; i<journals.count(); ++i) {
3664 journals.at(i)->setOrganizer(KOPrefs::instance()->email()); 3668 journals.at(i)->setOrganizer(KOPrefs::instance()->email());
3665 journals.at(i)->recreate(); 3669 journals.at(i)->recreate();
3666 journals.at(i)->setReadOnly(false); 3670 journals.at(i)->setReadOnly(false);
3667 } 3671 }
3668 3672
3669 updateView(); 3673 updateView();
3670} 3674}
3671 3675
3672void CalendarView::showIntro() 3676void CalendarView::showIntro()
3673{ 3677{
3674 kdDebug() << "To be implemented." << endl; 3678 kdDebug() << "To be implemented." << endl;
3675} 3679}
3676 3680
3677QWidgetStack *CalendarView::viewStack() 3681QWidgetStack *CalendarView::viewStack()
3678{ 3682{
3679 return mRightFrame; 3683 return mRightFrame;
3680} 3684}
3681 3685
3682QWidget *CalendarView::leftFrame() 3686QWidget *CalendarView::leftFrame()
3683{ 3687{
3684 return mLeftFrame; 3688 return mLeftFrame;
3685} 3689}
3686 3690
3687DateNavigator *CalendarView::dateNavigator() 3691DateNavigator *CalendarView::dateNavigator()
3688{ 3692{
3689 return mNavigator; 3693 return mNavigator;
3690} 3694}
3691 3695
3692KDateNavigator* CalendarView::dateNavigatorWidget() 3696KDateNavigator* CalendarView::dateNavigatorWidget()
3693{ 3697{
3694 return mDateNavigator; 3698 return mDateNavigator;
3695} 3699}
3696void CalendarView::toggleDateNavigatorWidget() 3700void CalendarView::toggleDateNavigatorWidget()
3697{ 3701{
3698 KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ; 3702 KOPrefs::instance()->mShowDateNavigator = !KOPrefs::instance()->mShowDateNavigator ;
3699 if (!KOPrefs::instance()->mShowDateNavigator ) 3703 if (!KOPrefs::instance()->mShowDateNavigator )
3700 mDateNavigator->hide(); 3704 mDateNavigator->hide();
3701 else 3705 else
3702 mDateNavigator->show(); 3706 mDateNavigator->show();
3703} 3707}
3704void CalendarView::addView(KOrg::BaseView *view) 3708void CalendarView::addView(KOrg::BaseView *view)
3705{ 3709{
3706 mViewManager->addView(view); 3710 mViewManager->addView(view);
3707} 3711}
3708 3712
3709void CalendarView::showView(KOrg::BaseView *view) 3713void CalendarView::showView(KOrg::BaseView *view)
3710{ 3714{
3711 mViewManager->showView(view, mLeftFrame->isVisible()); 3715 mViewManager->showView(view, mLeftFrame->isVisible());
3712} 3716}
3713 3717
3714Incidence *CalendarView::currentSelection() 3718Incidence *CalendarView::currentSelection()
3715{ 3719{
3716 return mViewManager->currentSelection(); 3720 return mViewManager->currentSelection();
3717} 3721}
3718void CalendarView::toggleAllDaySize() 3722void CalendarView::toggleAllDaySize()
3719{ 3723{
3720 /* 3724 /*
3721 if ( KOPrefs::instance()->mAllDaySize > 47 ) 3725 if ( KOPrefs::instance()->mAllDaySize > 47 )
3722 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2; 3726 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize /2;
3723 else 3727 else
3724 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2; 3728 KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize *2;
3725 */ 3729 */
3726 viewManager()->agendaView()->toggleAllDay(); 3730 viewManager()->agendaView()->toggleAllDay();
3727} 3731}
3728void CalendarView::toggleExpand() 3732void CalendarView::toggleExpand()
3729{ 3733{
3730 // if ( mLeftFrame->isHidden() ) { 3734 // if ( mLeftFrame->isHidden() ) {
3731 // mLeftFrame->show(); 3735 // mLeftFrame->show();
3732 // emit calendarViewExpanded( false ); 3736 // emit calendarViewExpanded( false );
3733 // } else { 3737 // } else {
3734 // mLeftFrame->hide(); 3738 // mLeftFrame->hide();
3735 // emit calendarViewExpanded( true ); 3739 // emit calendarViewExpanded( true );
3736 // } 3740 // }
3737 //qDebug(" CalendarView::toggleExpand()"); 3741 //qDebug(" CalendarView::toggleExpand()");
3738 globalFlagBlockAgenda = 1; 3742 globalFlagBlockAgenda = 1;
3739 emit calendarViewExpanded( !mLeftFrame->isHidden() ); 3743 emit calendarViewExpanded( !mLeftFrame->isHidden() );
3740 globalFlagBlockAgenda = 5; 3744 globalFlagBlockAgenda = 5;
3741 mViewManager->raiseCurrentView( !mLeftFrame->isHidden() ); 3745 mViewManager->raiseCurrentView( !mLeftFrame->isHidden() );
3742 //mViewManager->showView( 0, true ); 3746 //mViewManager->showView( 0, true );
3743} 3747}
3744 3748
3745void CalendarView::calendarModified( bool modified, Calendar * ) 3749void CalendarView::calendarModified( bool modified, Calendar * )
3746{ 3750{
3747 setModified( modified ); 3751 setModified( modified );
3748} 3752}
3749 3753
3750Todo *CalendarView::selectedTodo() 3754Todo *CalendarView::selectedTodo()
3751{ 3755{
3752 Incidence *incidence = currentSelection(); 3756 Incidence *incidence = currentSelection();
3753 if ( incidence && incidence->type() == "Todo" ) { 3757 if ( incidence && incidence->type() == "Todo" ) {
3754 return static_cast<Todo *>( incidence ); 3758 return static_cast<Todo *>( incidence );
3755 } 3759 }
3756 3760
3757 incidence = mTodoList->selectedIncidences().first(); 3761 incidence = mTodoList->selectedIncidences().first();
3758 if ( incidence && incidence->type() == "Todo" ) { 3762 if ( incidence && incidence->type() == "Todo" ) {
3759 return static_cast<Todo *>( incidence ); 3763 return static_cast<Todo *>( incidence );
3760 } 3764 }
3761 3765
3762 return 0; 3766 return 0;
3763} 3767}
3764 3768
3765void CalendarView::dialogClosing(Incidence *in) 3769void CalendarView::dialogClosing(Incidence *in)
3766{ 3770{
3767 // mDialogList.remove(in); 3771 // mDialogList.remove(in);
3768} 3772}
3769 3773
3770void CalendarView::showIncidence() 3774void CalendarView::showIncidence()
3771{ 3775{
3772 mViewerCallerIsSearchDialog = false; 3776 mViewerCallerIsSearchDialog = false;
3773 Incidence *incidence = currentSelection(); 3777 Incidence *incidence = currentSelection();
3774 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3778 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3775 if ( incidence ) { 3779 if ( incidence ) {
3776 ShowIncidenceVisitor v; 3780 ShowIncidenceVisitor v;
3777 v.act( incidence, this ); 3781 v.act( incidence, this );
3778 } 3782 }
3779} 3783}
3780void CalendarView::editIncidenceDescription() 3784void CalendarView::editIncidenceDescription()
3781{ 3785{
3782 mFlagEditDescription = true; 3786 mFlagEditDescription = true;
3783 editIncidence(); 3787 editIncidence();
3784 mFlagEditDescription = false; 3788 mFlagEditDescription = false;
3785} 3789}
3786void CalendarView::editIncidence() 3790void CalendarView::editIncidence()
3787{ 3791{
3788 // qDebug("editIncidence() "); 3792 // qDebug("editIncidence() ");
3789 Incidence *incidence = currentSelection(); 3793 Incidence *incidence = currentSelection();
3790 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3794 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3791 if ( incidence ) { 3795 if ( incidence ) {
3792 EditIncidenceVisitor v; 3796 EditIncidenceVisitor v;
3793 v.act( incidence, this ); 3797 v.act( incidence, this );
3794 } 3798 }
3795} 3799}
3796 3800
3797void CalendarView::deleteIncidence() 3801void CalendarView::deleteIncidence()
3798{ 3802{
3799 Incidence *incidence = currentSelection(); 3803 Incidence *incidence = currentSelection();
3800 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 3804 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
3801 if ( incidence ) { 3805 if ( incidence ) {
3802 deleteIncidence(incidence); 3806 deleteIncidence(incidence);
3803 } 3807 }
3804} 3808}
3805 3809
3806void CalendarView::showIncidence(Incidence *incidence) 3810void CalendarView::showIncidence(Incidence *incidence)
3807{ 3811{
3808 mViewerCallerIsSearchDialog = false; 3812 mViewerCallerIsSearchDialog = false;
3809 //qDebug("%x %x ",sender (), mDialogManager->getSearchDialog() ); 3813 //qDebug("%x %x ",sender (), mDialogManager->getSearchDialog() );
3810 if ( sender() && mDialogManager->getSearchDialog() ) { 3814 if ( sender() && mDialogManager->getSearchDialog() ) {
3811 if ( sender () == mDialogManager->getSearchDialog()->listview() ) { 3815 if ( sender () == mDialogManager->getSearchDialog()->listview() ) {