author | zautrix <zautrix> | 2004-10-29 22:27:13 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-29 22:27:13 (UTC) |
commit | aafa695508796e86e9f267633ea5e6965d876031 (patch) (side-by-side diff) | |
tree | 8ff03f51e99f7e90b85e8f94af157a883bcd48f8 /korganizer/koagendaview.cpp | |
parent | 8e08679a79398def54980c0e838b242d69ca6030 (diff) | |
download | kdepimpi-aafa695508796e86e9f267633ea5e6965d876031.zip kdepimpi-aafa695508796e86e9f267633ea5e6965d876031.tar.gz kdepimpi-aafa695508796e86e9f267633ea5e6965d876031.tar.bz2 |
monthview exclude sat fix
-rw-r--r-- | korganizer/koagendaview.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 749204b..c5acafd 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -1305,23 +1305,36 @@ void KOAgendaView::setHolidayMasks() { mHolidayMask.resize(mSelectedDates.count()); uint i; for(i=0;i<mSelectedDates.count();++i) { QDate date = mSelectedDates[i]; bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6); bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7); + bool showHoliday = false; + if ( KOPrefs::instance()->mExcludeHolidays ) { + QPtrList<Event> events = calendar()->events( date, true ); + Event *event; + for( event = events.first(); event; event = events.next() ) { + if ( event->categories().contains("Holiday") || + event->categories().contains(i18n("Holiday"))) { + showHoliday = true; + break; + } + } + + } + #ifndef KORG_NOPLUGINS bool showHoliday = KOPrefs::instance()->mExcludeHolidays && !KOCore::self()->holiday(date).isEmpty(); - bool showDay = showSaturday || showSunday || showHoliday; -#else - bool showDay = showSaturday || showSunday; #endif + bool showDay = showSaturday || showSunday || showHoliday; + if (showDay) { mHolidayMask.at(i) = true; } else { mHolidayMask.at(i) = false; } } mAgenda->setHolidayMask(&mHolidayMask); |