Bug 61380 - Recurence tab's list of days doesn't follow kcontrol configuration
Summary: Recurence tab's list of days doesn't follow kcontrol configuration
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: 3.1.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Cornelius Schumacher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-18 02:36 UTC by Pupeno
Modified: 2003-08-01 02:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pupeno 2003-07-18 02:36:51 UTC
Version:           3.1.1 (using KDE 3.1.2)
Compiler:          gcc version 3.3 (Ark Linux 1.0 3.3-2ark)
OS:          Linux (i686) release 2.4.21-3ark

When you're adding a new event, and you choose it to be recurrent, in the Recurrence tab, there's an option to make it weekly... When it is weekly, it allows you to choose the day with several checkboxes... the order of that checkboxes is Sun, Mon, Tue... and so on while I chosed the week to start on Monday so I supouse the KDE general configuration (for week) is simply ignored. It will be great if they were shown in the right order.
Thank you.
Comment 1 Reinhold Kainhofer 2003-08-01 02:20:27 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 );
   }