Summary: | Recurence tab's list of days doesn't follow kcontrol configuration | ||
---|---|---|---|
Product: | [Applications] korganizer | Reporter: | Pupeno <pupeno> |
Component: | general | Assignee: | Cornelius Schumacher <schumacher> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 3.1.1 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Pupeno
2003-07-18 02:36:51 UTC
Subject: kdepim/korganizer CVS commit by kainhofe: This patch fixes the order of the checkboxes for the weekdays in the recurrence editor dialog. So far, the always were: Mon Tue Wed Thu Fri Sat Sun even if you set the start of the week to e.g. Thursday. Now, in that case the checkboxes are ordered like Thu Fri Sat Sun Mon Tue Wed Internally, monday still has index 0 in mDayBoxes, the only difference is that the checkboxes are created in a different order and so appear also in this different order. CCMAIL: 61380-done@bugs.kde.org M +8 -3 koeditorrecurrence.cpp 1.48 --- kdepim/korganizer/koeditorrecurrence.cpp #1.47:1.48 @@ -116,11 +116,16 @@ RecurWeekly::RecurWeekly( QWidget *paren QHBox *dayBox = new QHBox( this ); topLayout->addWidget( dayBox, 1, AlignVCenter ); - // TODO: Respect start of week setting + // Respect start of week setting + int weekStart=KGlobal::locale()->weekStartDay(); for ( int i = 0; i < 7; ++i ) { - QString weekDayName = KGlobal::locale()->weekDayName( i + 1, true ); + // i is the nr of the combobox, not the day of week! + // label=(i+weekStart+6)%7 + 1; + // index in CheckBox array(=day): label-1 + QString weekDayName = KGlobal::locale()->weekDayName( + (i + weekStart + 6)%7 + 1, true ); if ( KOPrefs::instance()->mCompactDialogs ) { weekDayName = weekDayName.left( 1 ); } - mDayBoxes[ i ] = new QCheckBox( weekDayName, dayBox ); + mDayBoxes[ (i + weekStart + 6)%7 ] = new QCheckBox( weekDayName, dayBox ); } |