Index: korganizer/koglobals.cpp
===================================================================
--- korganizer/koglobals.cpp	(revision 635723)
+++ korganizer/koglobals.cpp	(working copy)
@@ -172,6 +172,11 @@
   return !nonWorkDay;
 }
 
+int KOGlobals::getWorkWeekMask()
+{
+  return KOPrefs::instance()->mWorkWeekMask;
+}
+
 void KOGlobals::setHolidays( KHolidays *h )
 {
   delete mHolidays;
Index: korganizer/datenavigator.cpp
===================================================================
--- korganizer/datenavigator.cpp	(revision 635723)
+++ korganizer/datenavigator.cpp	(working copy)
@@ -101,8 +101,7 @@
 {
   int dateCount = mSelectedDates.count();
   bool weekStart = ( weekDay == KGlobal::locale()->weekStartDay() );
-  if ( weekDay == 1 && dateCount == 5 ) selectWorkWeek( d );
-  else if ( weekStart && dateCount == 7 ) selectWeek( d );
+  if ( weekStart && dateCount == 7 ) selectWeek( d );
   else selectDates( d, dateCount );
 }
 
@@ -133,16 +132,26 @@
 
 void DateNavigator::selectWorkWeek( const QDate &d )
 {
+  int weekStart = KGlobal::locale()->weekStartDay();
+ 
   int dayOfWeek = KOGlobals::self()->calendarSystem()->dayOfWeek( d );
 
-  QDate firstDate = d.addDays( 1 - dayOfWeek );
+  QDate currentDate = d.addDays( weekStart - dayOfWeek );
 
-  int weekStart = KGlobal::locale()->weekStartDay();
-  if ( weekStart != 1 && dayOfWeek >= weekStart ) {
-    firstDate = firstDate.addDays( 7 );
+  if ( weekStart != 1 && dayOfWeek < weekStart ) {
+    currentDate = currentDate.addDays( -7 );
   }
 
-  selectDates( firstDate, 5 );
+  mSelectedDates.clear();
+  int mask = KOGlobals::self()->getWorkWeekMask();
+
+  for ( int i = 0; i < 7; ++i ) {
+    if( (1<< ((i + weekStart + 6) % 7)) & (mask) ) {
+	mSelectedDates.append(currentDate.addDays(i));
+    }
+  }
+  
+  emitSelected();
 }
 
 void DateNavigator::selectToday()
@@ -151,8 +160,7 @@
 
   int dateCount = mSelectedDates.count();
 
-  if ( dateCount == 5 ) selectWorkWeek( d );
-  else if ( dateCount == 7 ) selectWeek( d );
+  if ( dateCount == 7 ) selectWeek( d );
   else selectDates( d, dateCount );
 }
 
Index: korganizer/koglobals.h
===================================================================
--- korganizer/koglobals.h	(revision 635723)
+++ korganizer/koglobals.h	(working copy)
@@ -61,7 +61,7 @@
 
     QStringList holiday( const QDate & );
     bool isWorkDay( const QDate & );
-
+    int getWorkWeekMask();
     /**
        Set which holidays the user wants to use.
        @param h a KHolidays object initialized with the desired locale.
Index: korganizer/calendarview.cpp
===================================================================
--- korganizer/calendarview.cpp	(revision 635723)
+++ korganizer/calendarview.cpp	(working copy)
@@ -494,9 +494,8 @@
 
   config->setGroup( "Views" );
   int dateCount = config->readNumEntry( "ShownDatesCount", 7 );
-  if ( dateCount == 5 ) mNavigator->selectWorkWeek();
-  else if ( dateCount == 7 ) mNavigator->selectWeek();
-  else mNavigator->selectDates( dateCount );
+  if ( dateCount == 7 ) mNavigator->selectWeek();
+  else mNavigator->selectDates( mNavigator->selectedDates().first(), dateCount );
 }
 
 
