author | zautrix <zautrix> | 2005-08-17 22:49:32 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-17 22:49:32 (UTC) |
commit | a685e90ea183cba87e852d6f6272e54704034347 (patch) (unidiff) | |
tree | f773086786d564866c4d5b7ca08fb510ebf0eb0b | |
parent | ede1d2a3a3d772cabc54ec117006ec6f445485cc (diff) | |
download | kdepimpi-a685e90ea183cba87e852d6f6272e54704034347.zip kdepimpi-a685e90ea183cba87e852d6f6272e54704034347.tar.gz kdepimpi-a685e90ea183cba87e852d6f6272e54704034347.tar.bz2 |
oops
-rw-r--r-- | korganizer/calendarview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 898da6c..e3b62de 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2985,97 +2985,97 @@ void CalendarView::changeTodoDisplay(Todo *which, int action) | |||
2985 | { | 2985 | { |
2986 | changeIncidenceDisplay((Incidence *)which, action); | 2986 | changeIncidenceDisplay((Incidence *)which, action); |
2987 | mDateNavigator->updateView(); //LR | 2987 | mDateNavigator->updateView(); //LR |
2988 | //mDialogManager->updateSearchDialog(); | 2988 | //mDialogManager->updateSearchDialog(); |
2989 | 2989 | ||
2990 | if (which) { | 2990 | if (which) { |
2991 | mViewManager->updateWNview(); | 2991 | mViewManager->updateWNview(); |
2992 | //mTodoList->updateView(); | 2992 | //mTodoList->updateView(); |
2993 | } | 2993 | } |
2994 | 2994 | ||
2995 | } | 2995 | } |
2996 | 2996 | ||
2997 | void CalendarView::changeIncidenceDisplay(Incidence *which, int action) | 2997 | void CalendarView::changeIncidenceDisplay(Incidence *which, int action) |
2998 | { | 2998 | { |
2999 | updateUnmanagedViews(); | 2999 | updateUnmanagedViews(); |
3000 | //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); | 3000 | //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); |
3001 | if ( action == KOGlobals::EVENTDELETED ) { //delete | 3001 | if ( action == KOGlobals::EVENTDELETED ) { //delete |
3002 | mCalendar->checkAlarmForIncidence( 0, true ); | 3002 | mCalendar->checkAlarmForIncidence( 0, true ); |
3003 | if ( mEventViewerDialog ) | 3003 | if ( mEventViewerDialog ) |
3004 | mEventViewerDialog->hide(); | 3004 | mEventViewerDialog->hide(); |
3005 | } | 3005 | } |
3006 | else | 3006 | else |
3007 | mCalendar->checkAlarmForIncidence( which , false ); | 3007 | mCalendar->checkAlarmForIncidence( which , false ); |
3008 | } | 3008 | } |
3009 | 3009 | ||
3010 | // most of the changeEventDisplays() right now just call the view's | 3010 | // most of the changeEventDisplays() right now just call the view's |
3011 | // total update mode, but they SHOULD be recoded to be more refresh-efficient. | 3011 | // total update mode, but they SHOULD be recoded to be more refresh-efficient. |
3012 | void CalendarView::changeEventDisplay(Event *which, int action) | 3012 | void CalendarView::changeEventDisplay(Event *which, int action) |
3013 | { | 3013 | { |
3014 | // kdDebug() << "CalendarView::changeEventDisplay" << endl; | 3014 | // kdDebug() << "CalendarView::changeEventDisplay" << endl; |
3015 | changeIncidenceDisplay((Incidence *)which, action); | 3015 | changeIncidenceDisplay((Incidence *)which, action); |
3016 | static bool clearallviews = false; | 3016 | static bool clearallviews = false; |
3017 | if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { | 3017 | if ( KOPrefs::instance()->mGlobalUpdateDisabled ) { |
3018 | if ( clearallviews ) { | 3018 | if ( clearallviews ) { |
3019 | clearAllViews(); | 3019 | clearAllViews(); |
3020 | clearallviews = false; | 3020 | clearallviews = false; |
3021 | } | 3021 | } |
3022 | return; | 3022 | return; |
3023 | } | 3023 | } |
3024 | clearallviews = true; | 3024 | clearallviews = true; |
3025 | mDateNavigator->updateView(); | 3025 | mDateNavigator->updateView(); |
3026 | //mDialogManager->updateSearchDialog(); | 3026 | //mDialogManager->updateSearchDialog(); |
3027 | if (which) { | 3027 | if (which) { |
3028 | // If there is an event view visible update the display | 3028 | // If there is an event view visible update the display |
3029 | mViewManager->currentView()->changeEventDisplay(which,action); | 3029 | mViewManager->currentView()->changeEventDisplay(which,action); |
3030 | // TODO: check, if update needed | 3030 | // TODO: check, if update needed |
3031 | // if (which->getTodoStatus()) { | 3031 | // if (which->getTodoStatus()) { |
3032 | mTodoList->updateView(); | 3032 | mTodoList->updateView(); |
3033 | if ( action != KOGlobals::EVENTDELETED ) { | 3033 | if ( action != KOGlobals::EVENTDELETED && KOPrefs::instance()->mDetectConflicts ) { |
3034 | mConflictingEvent = which ; | 3034 | mConflictingEvent = which ; |
3035 | int time = 1000; | 3035 | int time = 1000; |
3036 | #ifdef DESKTOP_VERSION | 3036 | #ifdef DESKTOP_VERSION |
3037 | time = 500; | 3037 | time = 500; |
3038 | #endif | 3038 | #endif |
3039 | bool checkC = false; | 3039 | bool checkC = false; |
3040 | if ( mConflictingEvent->doesFloat() ) { | 3040 | if ( mConflictingEvent->doesFloat() ) { |
3041 | checkC = KOPrefs::instance()->mCheckConflictsAllDayAllDay | 3041 | checkC = KOPrefs::instance()->mCheckConflictsAllDayAllDay |
3042 | || KOPrefs::instance()->mCheckConflictsAllDayNonAD; | 3042 | || KOPrefs::instance()->mCheckConflictsAllDayNonAD; |
3043 | } else { | 3043 | } else { |
3044 | checkC = KOPrefs::instance()->mCheckConflictsNonADAllDay | 3044 | checkC = KOPrefs::instance()->mCheckConflictsNonADAllDay |
3045 | || KOPrefs::instance()->mCheckConflictsNonADNonAD; | 3045 | || KOPrefs::instance()->mCheckConflictsNonADNonAD; |
3046 | } | 3046 | } |
3047 | if ( checkC ) | 3047 | if ( checkC ) |
3048 | QTimer::singleShot( time, this, SLOT ( checkConflictForEvent() ) ); | 3048 | QTimer::singleShot( time, this, SLOT ( checkConflictForEvent() ) ); |
3049 | } | 3049 | } |
3050 | // } | 3050 | // } |
3051 | } else { | 3051 | } else { |
3052 | mViewManager->currentView()->updateView(); | 3052 | mViewManager->currentView()->updateView(); |
3053 | } | 3053 | } |
3054 | } | 3054 | } |
3055 | void CalendarView::checkConflictForEvent() | 3055 | void CalendarView::checkConflictForEvent() |
3056 | { | 3056 | { |
3057 | 3057 | ||
3058 | if (!KOPrefs::instance()->mConfirm) | 3058 | if (!KOPrefs::instance()->mConfirm) |
3059 | return; | 3059 | return; |
3060 | if ( ! mConflictingEvent ) return; | 3060 | if ( ! mConflictingEvent ) return; |
3061 | Event * conflictingEvent = mConflictingEvent; | 3061 | Event * conflictingEvent = mConflictingEvent; |
3062 | mConflictingEvent = 0; | 3062 | mConflictingEvent = 0; |
3063 | QDateTime current = QDateTime::currentDateTime(); | 3063 | QDateTime current = QDateTime::currentDateTime(); |
3064 | if ( ! conflictingEvent->matchTime( ¤t, 0 ) ) { | 3064 | if ( ! conflictingEvent->matchTime( ¤t, 0 ) ) { |
3065 | return; | 3065 | return; |
3066 | } | 3066 | } |
3067 | CalFilter *filterIN = 0; | 3067 | CalFilter *filterIN = 0; |
3068 | CalFilter *filterALL = 0; | 3068 | CalFilter *filterALL = 0; |
3069 | CalFilter *filter = mFilters.first(); | 3069 | CalFilter *filter = mFilters.first(); |
3070 | while(filter) { | 3070 | while(filter) { |
3071 | if ( filter->name() == KOPrefs::instance()->mFilterConflictEditItem) | 3071 | if ( filter->name() == KOPrefs::instance()->mFilterConflictEditItem) |
3072 | filterIN = filter; | 3072 | filterIN = filter; |
3073 | if ( filter->name() == KOPrefs::instance()->mFilterConflictAllItem ) | 3073 | if ( filter->name() == KOPrefs::instance()->mFilterConflictAllItem ) |
3074 | filterALL = filter; | 3074 | filterALL = filter; |
3075 | filter = mFilters.next(); | 3075 | filter = mFilters.next(); |
3076 | } | 3076 | } |
3077 | if ( filterIN ) { | 3077 | if ( filterIN ) { |
3078 | if ( !filterIN->filterCalendarItem( conflictingEvent ) ) { | 3078 | if ( !filterIN->filterCalendarItem( conflictingEvent ) ) { |
3079 | return; | 3079 | return; |
3080 | } | 3080 | } |
3081 | } | 3081 | } |