From 2cde25d8061acd536bccd698722952ce8555f5db Mon Sep 17 00:00:00 2001 From: zautrix Date: Wed, 24 Aug 2005 18:38:31 +0000 Subject: conflict res fix --- (limited to 'korganizer') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 9928b48..14094bb 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -3044,6 +3044,8 @@ void CalendarView::changeEventDisplay(Event *which, int action) checkC = KOPrefs::instance()->mCheckConflictsNonADAllDay || KOPrefs::instance()->mCheckConflictsNonADNonAD; } + if ( !KOPrefs::instance()->mIncludeFree && mConflictingEvent->transparency() == KCal::Event::Transparent ) + checkC = false; if ( checkC ) QTimer::singleShot( time, this, SLOT ( checkConflictForEvent() ) ); } @@ -3095,6 +3097,11 @@ void CalendarView::checkConflictForEvent() while ( test ) { qApp->processEvents(); bool skip = ( test->doesFloat() && !chAD ) || ( !test->doesFloat() && !chNad ); + + if ( !skip ) { + if ( !KOPrefs::instance()->mIncludeFree && test->transparency() == KCal::Event::Transparent ) + skip = true; + } if ( !skip ) { if ( filterALL ) { if ( !filterALL->filterCalendarItem( test ) ) { diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 057df0d..7076e05 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp @@ -458,6 +458,9 @@ void KODayMatrix::updateViewTimed() (recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) { continue; } + if ( !KOPrefs::instance()->mLongAllday && event->doesFloat()&& event->isMultiDay() ) { + continue; + } if ( event->doesRecur() ) { bool last; QDateTime incidenceStart = event->recurrence()->getPreviousDateTime( QDateTime( mStartDate ) , &last ); @@ -684,6 +687,9 @@ void KODayMatrix::updateEvents() !KOPrefs::instance()->mWeeklyRecur ) ) { numEvents--; } + if ( !KOPrefs::instance()->mLongAllday && event->doesFloat()&& event->isMultiDay() ) { + numEvents--; + } } if ( numEvents ) eDays.setBit(i); diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 571ca11..1b0e5f4 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -232,6 +232,7 @@ KOPrefs::KOPrefs() : KPrefs::setCurrentGroup("Conflicts"); addItemBool("EnableAutoDetect",&mDetectConflicts,true); + addItemBool("CheckConflictsFree",&mIncludeFree,true); addItemBool("CheckConflictsAllDayAllDay",&mCheckConflictsAllDayAllDay,false); addItemBool("CheckConflictsAllDayNonAD",&mCheckConflictsAllDayNonAD,false); addItemBool("CheckConflictsNonADAllDay",&mCheckConflictsNonADAllDay,false); @@ -244,6 +245,7 @@ KOPrefs::KOPrefs() : addItemBool("Show Date Navigator",&mShowDateNavigator,true); addItemInt("Hour Size",&mHourSize,8); addItemBool("Show Daily Recurrences",&mDailyRecur,true); + addItemBool("ShowLongAllday",&mLongAllday,true); addItemBool("Show Weekly Recurrences",&mWeeklyRecur,true); addItemBool("Show Month Daily Recurrences",&mMonthDailyRecur,true); addItemBool("Show Month Weekly Recurrences",&mMonthWeeklyRecur,true); diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 576edf9..bac8010 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -194,6 +194,7 @@ class KOPrefs : public KPimPrefs bool mShowFullMenu; bool mDailyRecur; bool mWeeklyRecur; + bool mLongAllday; bool mMonthDailyRecur; bool mMonthWeeklyRecur; bool mMonthShowIcons; @@ -351,6 +352,7 @@ class KOPrefs : public KPimPrefs bool mDetectConflicts; + bool mIncludeFree; bool mCheckConflictsAllDayAllDay; bool mCheckConflictsAllDayNonAD; bool mCheckConflictsNonADAllDay; diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index bbdf508..f1a6c3d 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -578,6 +578,11 @@ void KOPrefsDialog::setupViewsTab() &(KOPrefs::instance()->mWeeklyRecur),topFrame); topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); + weeklyRecur = + addWidBool(i18n("Show multiday allday ev. in date nav."), + &(KOPrefs::instance()->mLongAllday),topFrame); + topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); + #ifdef DESKTOP_VERSION KPrefsDialogWidBool *enableToolTips = addWidBool(i18n("Enable tooltips displaying summary of ev."), @@ -933,13 +938,17 @@ dummy = topLayout->addWidget(dummy->checkBox(), ii++,0); topFrame = new QFrame( topFrame ); topLayout->addWidget(topFrame ,ii++,0); - topLayout = new QGridLayout(topFrame,4,1); + topLayout = new QGridLayout(topFrame,4,1); connect ( dummy->checkBox(), SIGNAL( toggled( bool ) ), topFrame, SLOT ( setEnabled( bool ) ) ); - topLayout->addWidget( new QLabel ( i18n("Conflict detection checks an edited event with other existing events for overlapping. You can define which events are checked:"), topFrame ) , ii++,0); + dummy = addWidBool(i18n("Include events which \"show as free\""), + &(KOPrefs::instance()->mIncludeFree),topFrame); + topLayout->addWidget(dummy->checkBox(), ii++,0); + topLayout->addWidget( new QLabel ( i18n("Conflict detection checks an edited event with other events for overlapping."), topFrame ) , ii++,0); + topLayout->addWidget( new QLabel ( i18n("Filter for the edited event"), topFrame ) , ii++,0); mFilterEditItem = new QComboBox( topFrame ); topLayout->addWidget(mFilterEditItem,ii++,0); - topLayout->addWidget( new QLabel ( i18n("Filter for other existing events"), topFrame ) , ii++,0); + topLayout->addWidget( new QLabel ( i18n("Filter for other events"), topFrame ) , ii++,0); mFilterAllItem = new QComboBox( topFrame ); topLayout->addWidget(mFilterAllItem,ii++,0); dummy = addWidBool(i18n("Check Allday with Allday"), -- cgit v0.9.0.2