author | eilers <eilers> | 2003-08-01 14:19:44 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-08-01 14:19:44 (UTC) |
commit | 34991bac7d96b1c17601be6a5607819342571e0c (patch) (side-by-side diff) | |
tree | 65d0bc2db22bcc1dc1b5eafdafd53b9cb08a6395 /core/pim/datebook/datebookweeklst.cpp | |
parent | 5346424fc26bde232a15aa34fbb720f86218b26f (diff) | |
download | opie-34991bac7d96b1c17601be6a5607819342571e0c.zip opie-34991bac7d96b1c17601be6a5607819342571e0c.tar.gz opie-34991bac7d96b1c17601be6a5607819342571e0c.tar.bz2 |
Merging changes from BRANCH_1_0 to HEAD..
Diffstat (limited to 'core/pim/datebook/datebookweeklst.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookweeklst.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp index 7817042..aad1f3a 100644 --- a/core/pim/datebook/datebookweeklst.cpp +++ b/core/pim/datebook/datebookweeklst.cpp @@ -61,7 +61,12 @@ void DateBookWeekLstHeader::setDate(const QDate &d) { int year,week,dayofweek; date=d; dayofweek=d.dayOfWeek(); - if(bStartOnMonday) dayofweek--; + if(bStartOnMonday) + dayofweek--; + else if( dayofweek == 7 ) + /* we already have the right day -7 would lead to the same week */ + dayofweek = 0; + date=date.addDays(-dayofweek); calcWeek(date,week,year,bStartOnMonday); @@ -117,7 +122,7 @@ DateBookWeekLstDayHdr::DateBookWeekLstDayHdr(const QDate &d, bool /* onM */, date=d; - static const char *wdays={"MTWTFSSM"}; + static const QString wdays=tr("MTWTFSSM", "Week days"); char day=wdays[d.dayOfWeek()-1]; label->setText( QString(QObject::tr(QString(QChar(day)))) + " " +QString::number(d.day()) ); @@ -237,6 +242,7 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev, // Calculate offset to first day of week. int dayoffset=d.dayOfWeek(); if(bStartOnMonday) dayoffset--; + else if( dayoffset == 7 ) dayoffset = 0; for (int i=0; i<7; i++) { // Header |