summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/komonthview.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 9085775..d825493 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -1003,6 +1003,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
hb->addWidget( mWidStack );
- mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
mShowWeekView = KOPrefs::instance()->mMonthViewWeek;
- if ( mShowWeekView )
- mWeekStartsMonday = true;
updatePossible = false;
@@ -1219,5 +1216,5 @@ void KOMonthView::updateConfig()
- mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
+ int mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
- if ( mShowWeekView ) {
+ if ( mShowWeekView || KOPrefs::instance()->mMonthViewSatSunTog ) {
mWeekStartsMonday = true;
@@ -1261,3 +1258,3 @@ void KOMonthView::updateDayLabels()
for (int i = 0; i < 7; i++) {
- if (mWeekStartsMonday) {
+ {
bool show = mShortDayLabelsW;
@@ -1266,6 +1263,2 @@ void KOMonthView::updateDayLabels()
(*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show));
- } else {
- if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsW));
- else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsW));
-
}
@@ -1274,3 +1267,3 @@ void KOMonthView::updateDayLabels()
for (int i = 0; i < 7; i++) {
- if (mWeekStartsMonday) {
+ if (KGlobal::locale()->weekStartsMonday() || KOPrefs::instance()->mMonthViewSatSunTog ) {
bool show = mShortDayLabelsM;
@@ -1296,2 +1289,3 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
int weekNum = 6;
+ mStartDate = start;
if ( mShowWeekView ) {
@@ -1301,2 +1295,5 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
weekLabels = &mWeekLabelsW;
+ if ( !KGlobal::locale()->weekStartsMonday() ) {
+ mStartDate = mStartDate.addDays( 1 );
+ }
} else {
@@ -1307,4 +1304,7 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
- mStartDate = start;
+ int mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
+ if ( mShowWeekView || KOPrefs::instance()->mMonthViewSatSunTog ) {
+ mWeekStartsMonday = true;
+ }
int startWeekDay = mWeekStartsMonday ? 1 : 7;
@@ -1314,3 +1314,2 @@ void KOMonthView::showDates(const QDate &start, const QDate &)
}
-
bool primary = false;