-rw-r--r-- | korganizer/calendarview.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 4b3f806..558fc55 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2646,48 +2646,57 @@ void CalendarView::changeEventDisplay(Event *which, int action) | |||
2646 | 2646 | ||
2647 | 2647 | ||
2648 | void CalendarView::updateTodoViews() | 2648 | void CalendarView::updateTodoViews() |
2649 | { | 2649 | { |
2650 | mTodoList->updateView(); | 2650 | mTodoList->updateView(); |
2651 | mViewManager->currentView()->updateView(); | 2651 | mViewManager->currentView()->updateView(); |
2652 | 2652 | ||
2653 | } | 2653 | } |
2654 | 2654 | ||
2655 | 2655 | ||
2656 | 2656 | ||
2657 | void CalendarView::clearAllViews() | 2657 | void CalendarView::clearAllViews() |
2658 | { | 2658 | { |
2659 | mTodoList->clearList(); | 2659 | mTodoList->clearList(); |
2660 | mViewManager->clearAllViews(); | 2660 | mViewManager->clearAllViews(); |
2661 | SearchDialog * sd = mDialogManager->getSearchDialog(); | 2661 | SearchDialog * sd = mDialogManager->getSearchDialog(); |
2662 | if ( sd ) { | 2662 | if ( sd ) { |
2663 | KOListView* kol = sd->listview(); | 2663 | KOListView* kol = sd->listview(); |
2664 | if ( kol ) | 2664 | if ( kol ) |
2665 | kol->clearList(); | 2665 | kol->clearList(); |
2666 | } | 2666 | } |
2667 | } | 2667 | } |
2668 | void CalendarView::updateView() | 2668 | void CalendarView::updateView() |
2669 | { | 2669 | { |
2670 | static bool clearallviews = false; | ||
2671 | if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { | ||
2672 | if ( clearallviews ) { | ||
2673 | clearAllViews(); | ||
2674 | clearallviews = false; | ||
2675 | } | ||
2676 | return; | ||
2677 | } | ||
2678 | clearallviews = true; | ||
2670 | DateList tmpList = mNavigator->selectedDates(); | 2679 | DateList tmpList = mNavigator->selectedDates(); |
2671 | 2680 | ||
2672 | if ( KOPrefs::instance()->mHideNonStartedTodos ) | 2681 | if ( KOPrefs::instance()->mHideNonStartedTodos ) |
2673 | mTodoList->updateView(); | 2682 | mTodoList->updateView(); |
2674 | // We assume that the navigator only selects consecutive days. | 2683 | // We assume that the navigator only selects consecutive days. |
2675 | updateView( tmpList.first(), tmpList.last() ); | 2684 | updateView( tmpList.first(), tmpList.last() ); |
2676 | } | 2685 | } |
2677 | 2686 | ||
2678 | void CalendarView::updateUnmanagedViews() | 2687 | void CalendarView::updateUnmanagedViews() |
2679 | { | 2688 | { |
2680 | mDateNavigator->updateDayMatrix(); | 2689 | mDateNavigator->updateDayMatrix(); |
2681 | } | 2690 | } |
2682 | 2691 | ||
2683 | int CalendarView::msgItemDelete(const QString name) | 2692 | int CalendarView::msgItemDelete(const QString name) |
2684 | { | 2693 | { |
2685 | return KMessageBox::warningContinueCancel(this,name +"\n\n"+ | 2694 | return KMessageBox::warningContinueCancel(this,name +"\n\n"+ |
2686 | i18n("This item will be\npermanently deleted."), | 2695 | i18n("This item will be\npermanently deleted."), |
2687 | i18n("KO/Pi Confirmation"),i18n("Delete")); | 2696 | i18n("KO/Pi Confirmation"),i18n("Delete")); |
2688 | } | 2697 | } |
2689 | 2698 | ||
2690 | 2699 | ||
2691 | void CalendarView::edit_cut() | 2700 | void CalendarView::edit_cut() |
2692 | { | 2701 | { |
2693 | Event *anEvent=0; | 2702 | Event *anEvent=0; |
@@ -4390,48 +4399,53 @@ void CalendarView::showIncidence(Incidence *incidence) | |||
4390 | if ( sender() && mDialogManager->getSearchDialog() ) { | 4399 | if ( sender() && mDialogManager->getSearchDialog() ) { |
4391 | if ( sender () == mDialogManager->getSearchDialog()->listview() ) { | 4400 | if ( sender () == mDialogManager->getSearchDialog()->listview() ) { |
4392 | mViewerCallerIsSearchDialog = true; | 4401 | mViewerCallerIsSearchDialog = true; |
4393 | } | 4402 | } |
4394 | } | 4403 | } |
4395 | if ( incidence ) { | 4404 | if ( incidence ) { |
4396 | ShowIncidenceVisitor v; | 4405 | ShowIncidenceVisitor v; |
4397 | v.act( incidence, this ); | 4406 | v.act( incidence, this ); |
4398 | } | 4407 | } |
4399 | } | 4408 | } |
4400 | 4409 | ||
4401 | void CalendarView::editIncidence(Incidence *incidence) | 4410 | void CalendarView::editIncidence(Incidence *incidence) |
4402 | { | 4411 | { |
4403 | if ( incidence ) { | 4412 | if ( incidence ) { |
4404 | 4413 | ||
4405 | EditIncidenceVisitor v; | 4414 | EditIncidenceVisitor v; |
4406 | v.act( incidence, this ); | 4415 | v.act( incidence, this ); |
4407 | 4416 | ||
4408 | } | 4417 | } |
4409 | } | 4418 | } |
4410 | 4419 | ||
4411 | void CalendarView::deleteIncidence(Incidence *incidence) | 4420 | void CalendarView::deleteIncidence(Incidence *incidence) |
4412 | { | 4421 | { |
4413 | //qDebug(" CalendarView::deleteIncidence "); | 4422 | //qDebug(" CalendarView::deleteIncidence "); |
4423 | if ( incidence == 0 ) { | ||
4424 | updateView(); | ||
4425 | emit updateSearchDialog(); | ||
4426 | return; | ||
4427 | } | ||
4414 | if ( incidence ) { | 4428 | if ( incidence ) { |
4415 | DeleteIncidenceVisitor v; | 4429 | DeleteIncidenceVisitor v; |
4416 | v.act( incidence, this ); | 4430 | v.act( incidence, this ); |
4417 | } | 4431 | } |
4418 | } | 4432 | } |
4419 | 4433 | ||
4420 | 4434 | ||
4421 | void CalendarView::lookForOutgoingMessages() | 4435 | void CalendarView::lookForOutgoingMessages() |
4422 | { | 4436 | { |
4423 | OutgoingDialog *ogd = mDialogManager->outgoingDialog(); | 4437 | OutgoingDialog *ogd = mDialogManager->outgoingDialog(); |
4424 | ogd->loadMessages(); | 4438 | ogd->loadMessages(); |
4425 | } | 4439 | } |
4426 | 4440 | ||
4427 | void CalendarView::lookForIncomingMessages() | 4441 | void CalendarView::lookForIncomingMessages() |
4428 | { | 4442 | { |
4429 | IncomingDialog *icd = mDialogManager->incomingDialog(); | 4443 | IncomingDialog *icd = mDialogManager->incomingDialog(); |
4430 | icd->retrieve(); | 4444 | icd->retrieve(); |
4431 | } | 4445 | } |
4432 | 4446 | ||
4433 | bool CalendarView::removeCompletedSubTodos( Todo* t ) | 4447 | bool CalendarView::removeCompletedSubTodos( Todo* t ) |
4434 | { | 4448 | { |
4435 | bool deleteTodo = true; | 4449 | bool deleteTodo = true; |
4436 | QPtrList<Incidence> subTodos; | 4450 | QPtrList<Incidence> subTodos; |
4437 | Incidence *aTodo; | 4451 | Incidence *aTodo; |