summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-06 14:53:38 (UTC)
committer zautrix <zautrix>2005-07-06 14:53:38 (UTC)
commit2038f7363c31e1a0ab139a1184cbed10086e1862 (patch) (unidiff)
tree532bc409b7046938614417a8043455de0e86c8fe /korganizer
parent2e8199c8aa82c018d24d67c299a09b2aa6a786f1 (diff)
downloadkdepimpi-2038f7363c31e1a0ab139a1184cbed10086e1862.zip
kdepimpi-2038f7363c31e1a0ab139a1184cbed10086e1862.tar.gz
kdepimpi-2038f7363c31e1a0ab139a1184cbed10086e1862.tar.bz2
huhu
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 558fc55..98e0ac1 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2584,96 +2584,110 @@ void CalendarView::eventChanged(Event *event)
2584} 2584}
2585 2585
2586void CalendarView::eventAdded(Event *event) 2586void CalendarView::eventAdded(Event *event)
2587{ 2587{
2588 changeEventDisplay(event,KOGlobals::EVENTADDED); 2588 changeEventDisplay(event,KOGlobals::EVENTADDED);
2589} 2589}
2590 2590
2591void CalendarView::eventToBeDeleted(Event *) 2591void CalendarView::eventToBeDeleted(Event *)
2592{ 2592{
2593 kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl; 2593 kdDebug() << "CalendarView::eventToBeDeleted(): to be implemented" << endl;
2594} 2594}
2595 2595
2596void CalendarView::eventDeleted() 2596void CalendarView::eventDeleted()
2597{ 2597{
2598 changeEventDisplay(0,KOGlobals::EVENTDELETED); 2598 changeEventDisplay(0,KOGlobals::EVENTDELETED);
2599} 2599}
2600void CalendarView::changeTodoDisplay(Todo *which, int action) 2600void CalendarView::changeTodoDisplay(Todo *which, int action)
2601{ 2601{
2602 changeIncidenceDisplay((Incidence *)which, action); 2602 changeIncidenceDisplay((Incidence *)which, action);
2603 mDateNavigator->updateView(); //LR 2603 mDateNavigator->updateView(); //LR
2604 //mDialogManager->updateSearchDialog(); 2604 //mDialogManager->updateSearchDialog();
2605 2605
2606 if (which) { 2606 if (which) {
2607 mViewManager->updateWNview(); 2607 mViewManager->updateWNview();
2608 //mTodoList->updateView(); 2608 //mTodoList->updateView();
2609 } 2609 }
2610 2610
2611} 2611}
2612 2612
2613void CalendarView::changeIncidenceDisplay(Incidence *which, int action) 2613void CalendarView::changeIncidenceDisplay(Incidence *which, int action)
2614{ 2614{
2615 updateUnmanagedViews(); 2615 updateUnmanagedViews();
2616 //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); 2616 //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action );
2617 if ( action == KOGlobals::EVENTDELETED ) { //delete 2617 if ( action == KOGlobals::EVENTDELETED ) { //delete
2618 mCalendar->checkAlarmForIncidence( 0, true ); 2618 mCalendar->checkAlarmForIncidence( 0, true );
2619 if ( mEventViewerDialog ) 2619 if ( mEventViewerDialog )
2620 mEventViewerDialog->hide(); 2620 mEventViewerDialog->hide();
2621 } 2621 }
2622 else 2622 else
2623 mCalendar->checkAlarmForIncidence( which , false ); 2623 mCalendar->checkAlarmForIncidence( which , false );
2624} 2624}
2625 2625
2626// most of the changeEventDisplays() right now just call the view's 2626// most of the changeEventDisplays() right now just call the view's
2627// total update mode, but they SHOULD be recoded to be more refresh-efficient. 2627// total update mode, but they SHOULD be recoded to be more refresh-efficient.
2628void CalendarView::changeEventDisplay(Event *which, int action) 2628void CalendarView::changeEventDisplay(Event *which, int action)
2629{ 2629{
2630 // kdDebug() << "CalendarView::changeEventDisplay" << endl; 2630 // kdDebug() << "CalendarView::changeEventDisplay" << endl;
2631 changeIncidenceDisplay((Incidence *)which, action); 2631 changeIncidenceDisplay((Incidence *)which, action);
2632
2633
2634 static bool clearallviews = false;
2635 if ( KOPrefs::instance()->mGlobalUpdateDisabled ) {
2636 if ( clearallviews ) {
2637 clearAllViews();
2638 clearallviews = false;
2639 }
2640 return;
2641 }
2642 clearallviews = true;
2643
2644
2645
2632 mDateNavigator->updateView(); 2646 mDateNavigator->updateView();
2633 //mDialogManager->updateSearchDialog(); 2647 //mDialogManager->updateSearchDialog();
2634 2648
2635 if (which) { 2649 if (which) {
2636 // If there is an event view visible update the display 2650 // If there is an event view visible update the display
2637 mViewManager->currentView()->changeEventDisplay(which,action); 2651 mViewManager->currentView()->changeEventDisplay(which,action);
2638 // TODO: check, if update needed 2652 // TODO: check, if update needed
2639 // if (which->getTodoStatus()) { 2653 // if (which->getTodoStatus()) {
2640 mTodoList->updateView(); 2654 mTodoList->updateView();
2641 // } 2655 // }
2642 } else { 2656 } else {
2643 mViewManager->currentView()->updateView(); 2657 mViewManager->currentView()->updateView();
2644 } 2658 }
2645} 2659}
2646 2660
2647 2661
2648void CalendarView::updateTodoViews() 2662void CalendarView::updateTodoViews()
2649{ 2663{
2650 mTodoList->updateView(); 2664 mTodoList->updateView();
2651 mViewManager->currentView()->updateView(); 2665 mViewManager->currentView()->updateView();
2652 2666
2653} 2667}
2654 2668
2655 2669
2656 2670
2657void CalendarView::clearAllViews() 2671void CalendarView::clearAllViews()
2658{ 2672{
2659 mTodoList->clearList(); 2673 mTodoList->clearList();
2660 mViewManager->clearAllViews(); 2674 mViewManager->clearAllViews();
2661 SearchDialog * sd = mDialogManager->getSearchDialog(); 2675 SearchDialog * sd = mDialogManager->getSearchDialog();
2662 if ( sd ) { 2676 if ( sd ) {
2663 KOListView* kol = sd->listview(); 2677 KOListView* kol = sd->listview();
2664 if ( kol ) 2678 if ( kol )
2665 kol->clearList(); 2679 kol->clearList();
2666 } 2680 }
2667} 2681}
2668void CalendarView::updateView() 2682void CalendarView::updateView()
2669{ 2683{
2670 static bool clearallviews = false; 2684 static bool clearallviews = false;
2671 if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { 2685 if ( KOPrefs::instance()->mGlobalUpdateDisabled ) {
2672 if ( clearallviews ) { 2686 if ( clearallviews ) {
2673 clearAllViews(); 2687 clearAllViews();
2674 clearallviews = false; 2688 clearallviews = false;
2675 } 2689 }
2676 return; 2690 return;
2677 } 2691 }
2678 clearallviews = true; 2692 clearallviews = true;
2679 DateList tmpList = mNavigator->selectedDates(); 2693 DateList tmpList = mNavigator->selectedDates();