summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp19
-rw-r--r--korganizer/komonthview.cpp2
2 files changed, 17 insertions, 4 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 749204b..c5acafd 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -1312,2 +1312,16 @@ void KOAgendaView::setHolidayMasks()
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
@@ -1315,6 +1329,5 @@ void KOAgendaView::setHolidayMasks()
!KOCore::self()->holiday(date).isEmpty();
- bool showDay = showSaturday || showSunday || showHoliday;
-#else
- bool showDay = showSaturday || showSunday;
#endif
+ bool showDay = showSaturday || showSunday || showHoliday;
+
if (showDay) {
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 688d9e1..7d1e82f 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -387,3 +387,3 @@ void MonthViewCell::updateCell()
setPrimary( mDate.month()%2 );
- setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() );
+ setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays);
if ( mDate == QDate::currentDate() ) {