author | zautrix <zautrix> | 2004-10-22 22:10:16 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-22 22:10:16 (UTC) |
commit | b8da6435b8e5941eb1824873e68d8a6a728fae5e (patch) (side-by-side diff) | |
tree | bc5ed11961e89bcd606f6fbca32185dbf8afab7a | |
parent | a5274f27dc71e1a0ffae73f32f84f4dd013b4b76 (diff) | |
download | kdepimpi-b8da6435b8e5941eb1824873e68d8a6a728fae5e.zip kdepimpi-b8da6435b8e5941eb1824873e68d8a6a728fae5e.tar.gz kdepimpi-b8da6435b8e5941eb1824873e68d8a6a728fae5e.tar.bz2 |
fixed an ugly timezone bug
-rw-r--r-- | kaddressbook/views/contactlistview.cpp | 4 | ||||
-rw-r--r-- | kmicromail/koprefs.cpp | 12 | ||||
-rw-r--r-- | kmicromail/koprefs.h | 2 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 12 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 5 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 13 | ||||
-rw-r--r-- | korganizer/koprefs.h | 9 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 2 | ||||
-rw-r--r-- | microkde/kdecore/klocale.cpp | 50 |
9 files changed, 41 insertions, 68 deletions
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp index 5fb4163..ad43970 100644 --- a/kaddressbook/views/contactlistview.cpp +++ b/kaddressbook/views/contactlistview.cpp @@ -172,7 +172,7 @@ QString ContactListViewItem::key(int column, bool ascending) const int lan = KGlobal::locale()->language(); //qDebug("language %d ", lan); if ( lan == 1 ) { //GERMAN - QString ret = QListViewItem::key(column, ascending).utf8(); + QString ret = QListViewItem::key(column, ascending).lower().utf8(); int start = -1; while ( (start = ret.find( 'ä', start+1)) > 0 ) { ret.at(start-1) = 'a'; @@ -189,7 +189,7 @@ QString ContactListViewItem::key(int column, bool ascending) const while ( (start = ret.find( 'ß', start+1)) > 0 ) { ret.at(start-1) = 's'; } - //qDebug("conv string %s ", ret.latin1()); + qDebug("conv string %s ", ret.latin1()); return ret; diff --git a/kmicromail/koprefs.cpp b/kmicromail/koprefs.cpp index c0200ff..8143b6f 100644 --- a/kmicromail/koprefs.cpp +++ b/kmicromail/koprefs.cpp @@ -67,7 +67,7 @@ KOPrefs::KOPrefs() : addItemFont("Application Font",&mAppFont); addItemFont("Compose Font",&mComposeFont); addItemFont("Read Font",&mReadFont); - + fillMailDefaults(); } @@ -97,16 +97,10 @@ void KOPrefs::usrSetDefaults() void KOPrefs::fillMailDefaults() { - if (mName.isEmpty()) mName = i18n("Anonymous"); - if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); + if (mName.isEmpty()) mName = i18n ("Please set at"); + if (mEmail.isEmpty()) mEmail = i18n ("Settings@General TAB"); } -void KOPrefs::setTimeZoneIdDefault() -{ - mTimeZoneId = i18n("+01:00 Europe/Oslo(CET)"); -} - - void KOPrefs::usrReadConfig() { diff --git a/kmicromail/koprefs.h b/kmicromail/koprefs.h index c42d787..a47642b 100644 --- a/kmicromail/koprefs.h +++ b/kmicromail/koprefs.h @@ -52,7 +52,6 @@ class KOPrefs : public KPimPrefs void setCategoryDefaults(){;}; protected: - void setTimeZoneIdDefault(); /** Fill empty mail fields with default values. */ void fillMailDefaults(); @@ -70,7 +69,6 @@ class KOPrefs : public KPimPrefs QFont mAppFont; QFont mComposeFont; QFont mReadFont; - QFont mTimeZoneId; QString mName; QString mEmail; bool mSendLater, mViewAsHtml, mUseKapi; diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 0306e07..e64d83a 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1199,7 +1199,7 @@ bool CalendarView::syncCalendar(QString filename, int mode) //qDebug("syncCalendar %s ", filename.latin1()); mGlobalSyncMode = SYNC_MODE_NORMAL; CalendarLocal* calendar = new CalendarLocal(); - calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); + calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); FileStorage* storage = new FileStorage( calendar ); bool syncOK = false; storage->setFileName( filename ); @@ -1230,7 +1230,7 @@ void CalendarView::syncExternal( int mode ) qApp->processEvents(); CalendarLocal* calendar = new CalendarLocal(); - calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); + calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); bool syncOK = false; bool loadSuccess = false; PhoneFormat* phoneFormat = 0; @@ -1498,7 +1498,7 @@ bool CalendarView::importQtopia( const QString &categories, edit_sync_options(); qApp->processEvents(); CalendarLocal* calendar = new CalendarLocal(); - calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); + calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); bool syncOK = false; QtopiaFormat qtopiaFormat; qtopiaFormat.setCategoriesList ( &(KOPrefs::instance()->mCustomCategories)); @@ -2001,7 +2001,7 @@ void CalendarView::writeLocale() KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving, KOPrefs::instance()->mDaylightsavingStart, KOPrefs::instance()->mDaylightsavingEnd ); - KGlobal::locale()->setTimezone( KOPrefs::instance()->mTimeZoneId ); + KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId ); #endif } void CalendarView::updateConfig() @@ -2012,7 +2012,7 @@ void CalendarView::updateConfig() emit configChanged(); mTodoList->updateConfig(); // mDateNavigator->setFont ( KOPrefs::instance()->mDateNavigatorFont); - mCalendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); + mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); // To make the "fill window" configurations work //mViewManager->raiseCurrentView(); } @@ -2320,7 +2320,7 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel ) if ( beamDialog->beamLocal() ) cal->setLocalTime(); else - cal->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); + cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); Incidence *incidence = delSel.first(); bool addText = false; if ( delSel.count() < 10 ) diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index bafd349..d3aa650 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp @@ -39,6 +39,7 @@ #include <kiconloader.h> #include <kglobal.h> +#include <libkdepim/kpimglobalprefs.h> #include <libkcal/calendar.h> #include <libkcal/calendarlocal.h> #include <libkcal/icalformat.h> @@ -377,7 +378,7 @@ void KOListView::beamSelected() if ( createbup ) { QString description = "\n"; CalendarLocal* cal = new CalendarLocal(); - cal->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); + cal->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); Incidence *incidence = delSel.first(); while ( incidence ) { Incidence *in = incidence->clone(); @@ -528,7 +529,7 @@ void KOListView::saveToFile() } if ( createbup ) { CalendarLocal cal; - cal.setTimeZoneId(KOPrefs::instance()->mTimeZoneId); + cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); Incidence *incidence = delSel.first(); while ( incidence ) { cal.addIncidence( incidence->clone() ); diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 258f738..ba1c6d1 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -143,18 +143,10 @@ KOPrefs::KOPrefs() : KPrefs::setCurrentGroup("Time & Date"); - // addItemString("Time Zone",&mTimeZone,"+0100"); - addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); - // addItemInt("TimeZoneOffset",&mTimeZoneOffset,60); - addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); - addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); - addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); - addItemInt("Default Start Time",&mStartTime,10); addItemInt("Default Duration",&mDefaultDuration,2); addItemInt("Default Alarm Time",&mAlarmTime,3); - addItemInt("Daylight Savings",&mDaylightSavings,0); KPrefs::setCurrentGroup("AlarmSettings"); addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); @@ -354,7 +346,7 @@ void KOPrefs::fillMailDefaults() void KOPrefs::setTimeZoneIdDefault() { - mTimeZoneId = i18n("+01:00 Europe/Oslo(CET)"); + ; } void KOPrefs::setCategoryDefaults() @@ -488,9 +480,6 @@ void KOPrefs::usrReadConfig() } - if (mTimeZoneId.isEmpty()) { - setTimeZoneIdDefault(); - } KPimPrefs::usrReadConfig(); } diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index 03df59b..c74b0ef 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -95,13 +95,9 @@ class KOPrefs : public KPimPrefs int mDefaultFormat; int mMailClient; - QString mTimeZone; - //QString mTimeZoneName; // e.g. +00:04:00 Indian/Mauritius - //int mTimeZoneOffset; // e.g. -240 min int mStartTime; int mDefaultDuration; int mAlarmTime; - int mDaylightSavings; int mWorkingHoursStart; int mWorkingHoursEnd; @@ -271,11 +267,6 @@ class KOPrefs : public KPimPrefs int mPreferredLanguage; int mPreferredTime; bool mWeekStartsOnSunday; - QString mTimeZoneId; - bool mUseDaylightsaving; - int mDaylightsavingStart; - int mDaylightsavingEnd; - private: QDict<QColor> mCategoryColors; diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 7cd6038..0a580ca 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp @@ -57,7 +57,7 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) KPrefs::setCurrentGroup("Time & Date"); - addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); + addItemString("TimeZoneName",&mTimeZoneId, ("+01:00 Europe/Oslo(CET)") ); addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); addItemBool("TimeZoneAdd30min",&mTimeZoneAdd30min,false); addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp index 21e6937..d3b04dc 100644 --- a/microkde/kdecore/klocale.cpp +++ b/microkde/kdecore/klocale.cpp @@ -131,31 +131,31 @@ KLocale::KLocale() : mCalendarSystem( 0 ) mLanguage = 0; mDateFormat = "%a %Y %b %d"; mDateFormatShort = "%Y-%m-%d"; - mTimeZoneList << i18n ("-11:00 US/Samoa") - << i18n ("-10:00 US/Hawaii") - << i18n ("-09:00 US/Alaska") - << i18n ("-08:00 US/Pacific") - << i18n ("-07:00 US/Mountain") - << i18n ("-06:00 US/Central") - << i18n ("-05:00 US/Eastern") - << i18n ("-04:00 Brazil/West") - << i18n ("-03:00 Brazil/East") - << i18n ("-02:00 Brazil/DeNoronha") - << i18n ("-01:00 Atlantic/Azores") - << i18n (" 00:00 Europe/London(UTC)") - << i18n ("+01:00 Europe/Oslo(CET)") - << i18n ("+02:00 Europe/Helsinki") - << i18n ("+03:00 Europe/Moscow") - << i18n ("+04:00 Indian/Mauritius") - << i18n ("+05:00 Indian/Maldives") - << i18n ("+06:00 Indian/Chagos") - << i18n ("+07:00 Asia/Bangkok") - << i18n ("+08:00 Asia/Hongkong") - << i18n ("+09:00 Asia/Tokyo") - << i18n ("+10:00 Asia/Vladivostok") - << i18n ("+11:00 Asia/Magadan") - << i18n ("+12:00 Asia/Kamchatka") - // << i18n (" xx:xx User defined offset") + mTimeZoneList << ("-11:00 US/Samoa") + << ("-10:00 US/Hawaii") + << ("-09:00 US/Alaska") + << ("-08:00 US/Pacific") + << ("-07:00 US/Mountain") + << ("-06:00 US/Central") + << ("-05:00 US/Eastern") + << ("-04:00 Brazil/West") + << ("-03:00 Brazil/East") + << ("-02:00 Brazil/DeNoronha") + << ("-01:00 Atlantic/Azores") + << (" 00:00 Europe/London(UTC)") + << ("+01:00 Europe/Oslo(CET)") + << ("+02:00 Europe/Helsinki") + << ("+03:00 Europe/Moscow") + << ("+04:00 Indian/Mauritius") + << ("+05:00 Indian/Maldives") + << ("+06:00 Indian/Chagos") + << ("+07:00 Asia/Bangkok") + << ("+08:00 Asia/Hongkong") + << ("+09:00 Asia/Tokyo") + << ("+10:00 Asia/Vladivostok") + << ("+11:00 Asia/Magadan") + << ("+12:00 Asia/Kamchatka") + // << (" xx:xx User defined offset") << i18n (" Local Time"); mSouthDaylight = false; mTimeZoneOffset = 0; |