-rw-r--r-- | korganizer/koagendaview.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index e029fdb..eb3a6cd 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -1405,34 +1405,33 @@ void KOAgendaView::writeSettings(KConfig *config) | |||
1405 | } | 1405 | } |
1406 | 1406 | ||
1407 | void KOAgendaView::setHolidayMasks() | 1407 | void KOAgendaView::setHolidayMasks() |
1408 | { | 1408 | { |
1409 | mHolidayMask.resize(mSelectedDates.count()); | 1409 | mHolidayMask.resize(mSelectedDates.count()); |
1410 | 1410 | ||
1411 | uint i; | 1411 | uint i; |
1412 | for(i=0;i<mSelectedDates.count();++i) { | 1412 | for(i=0;i<mSelectedDates.count();++i) { |
1413 | QDate date = mSelectedDates[i]; | 1413 | QDate date = mSelectedDates[i]; |
1414 | bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6); | 1414 | bool showSaturday = KOPrefs::instance()->mExcludeSaturdays && (date.dayOfWeek() == 6); |
1415 | bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7); | 1415 | bool showSunday = KOPrefs::instance()->mExcludeHolidays && (date.dayOfWeek() == 7); |
1416 | bool showHoliday = false; | 1416 | bool showHoliday = false; |
1417 | if ( KOPrefs::instance()->mExcludeHolidays ) { | 1417 | if ( KOPrefs::instance()->mExcludeHolidays ) { |
1418 | QPtrList<Event> events = calendar()->events( date, true ); | 1418 | QPtrList<Event> events = calendar()->events( date, true ); |
1419 | Event *event; | 1419 | Event *event; |
1420 | for( event = events.first(); event; event = events.next() ) { | 1420 | for( event = events.first(); event; event = events.next() ) { |
1421 | if ( event->categories().contains("Holiday") || | 1421 | if ( event->isHoliday()) { |
1422 | event->categories().contains(i18n("Holiday"))) { | ||
1423 | showHoliday = true; | 1422 | showHoliday = true; |
1424 | break; | 1423 | break; |
1425 | } | 1424 | } |
1426 | } | 1425 | } |
1427 | 1426 | ||
1428 | } | 1427 | } |
1429 | 1428 | ||
1430 | #ifndef KORG_NOPLUGINS | 1429 | #ifndef KORG_NOPLUGINS |
1431 | bool showHoliday = KOPrefs::instance()->mExcludeHolidays && | 1430 | bool showHoliday = KOPrefs::instance()->mExcludeHolidays && |
1432 | !KOCore::self()->holiday(date).isEmpty(); | 1431 | !KOCore::self()->holiday(date).isEmpty(); |
1433 | #endif | 1432 | #endif |
1434 | bool showDay = showSaturday || showSunday || showHoliday; | 1433 | bool showDay = showSaturday || showSunday || showHoliday; |
1435 | 1434 | ||
1436 | if (showDay) { | 1435 | if (showDay) { |
1437 | mHolidayMask.at(i) = true; | 1436 | mHolidayMask.at(i) = true; |
1438 | } else { | 1437 | } else { |