summaryrefslogtreecommitdiffabout
Unidiff
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
@@ -1310,13 +1310,26 @@ void KOAgendaView::setHolidayMasks()
1310 QDate date = mSelectedDates[i]; 1310 QDate date = mSelectedDates[i];
1311 bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6); 1311 bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6);
1312 bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7); 1312 bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7);
1313 bool showHoliday = false;
1314 if ( KOPrefs::instance()->mExcludeHolidays ) {
1315 QPtrList<Event> events = calendar()->events( date, true );
1316 Event *event;
1317 for( event = events.first(); event; event = events.next() ) {
1318 if ( event->categories().contains("Holiday") ||
1319 event->categories().contains(i18n("Holiday"))) {
1320 showHoliday = true;
1321 break;
1322 }
1323 }
1324
1325 }
1326
1313#ifndef KORG_NOPLUGINS 1327#ifndef KORG_NOPLUGINS
1314 bool showHoliday = KOPrefs::instance()->mExcludeHolidays && 1328 bool showHoliday = KOPrefs::instance()->mExcludeHolidays &&
1315 !KOCore::self()->holiday(date).isEmpty(); 1329 !KOCore::self()->holiday(date).isEmpty();
1316 bool showDay = showSaturday || showSunday || showHoliday;
1317#else
1318 bool showDay = showSaturday || showSunday;
1319#endif 1330#endif
1331 bool showDay = showSaturday || showSunday || showHoliday;
1332
1320 if (showDay) { 1333 if (showDay) {
1321 mHolidayMask.at(i) = true; 1334 mHolidayMask.at(i) = true;
1322 } else { 1335 } else {
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 688d9e1..7d1e82f 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -385,7 +385,7 @@ void MonthViewCell::updateCell()
385{ 385{
386 386
387 setPrimary( mDate.month()%2 ); 387 setPrimary( mDate.month()%2 );
388 setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() ); 388 setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays);
389 if ( mDate == QDate::currentDate() ) { 389 if ( mDate == QDate::currentDate() ) {
390 mItemList->setLineWidth( 3 ); 390 mItemList->setLineWidth( 3 );
391 } else { 391 } else {