[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: [Kde-pim]
From: Reinhold Kainhofer <reinhold () kainhofer ! com>
Date: 2003-07-31 23:47:36
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The attached 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 and so appear in a different order.
Can I apply the patch and close bug #61380?
Reinhold
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/KaqgTqjEwhXvPN0RAuqSAJ0fOEjTA8ym81MoHah4/RiFsQFYywCfer/z
9MVePkODiF9OpkldPZ9Q9hY=
=Ekr5
-----END PGP SIGNATURE-----
["RecurrenceRespectWeekStart_Bug61380.patch" (text/x-diff)]
Index: koeditorrecurrence.cpp
===================================================================
RCS file: /home/kde/kdepim/korganizer/koeditorrecurrence.cpp,v
retrieving revision 1.46
diff -u -3 -p -b -r1.46 koeditorrecurrence.cpp
--- koeditorrecurrence.cpp 24 Jul 2003 22:11:19 -0000 1.46
+++ koeditorrecurrence.cpp 31 Jul 2003 23:41:49 -0000
@@ -115,13 +115,18 @@ 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 );
}
topLayout->addStretch( 1 );
_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic