-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 5 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 3 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.h | 1 | ||||
-rw-r--r-- | microkde/kdecore/klocale.cpp | 4 | ||||
-rw-r--r-- | microkde/kdecore/klocale.h | 2 |
5 files changed, 12 insertions, 3 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 1eef150..332f975 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp @@ -323,6 +323,11 @@ void KDEPIMConfigWidget::setupTimeZoneTab() mTimeZoneCombo->setCurrentItem(nCurrentlySet); int iii = 1; KPrefsWidBool *sb = + addWidBool(i18n("Add 30 min (+00:30) to selected Timezone"), + &(KPimGlobalPrefs::instance()->mTimeZoneAdd30min),topFrame); + topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); + ++iii; + sb = addWidBool(i18n("Timezone has daylight saving"), &(KPimGlobalPrefs::instance()->mUseDaylightsaving),topFrame); topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 5081b26..04e2072 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp @@ -59,6 +59,7 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); + addItemBool("TimeZoneAdd30min",&mTimeZoneAdd30min,false); addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); @@ -118,7 +119,7 @@ void KPimGlobalPrefs::setGlobalConfig() KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, mDaylightsavingStart, mDaylightsavingEnd ); - KGlobal::locale()->setTimezone( mTimeZoneId ); + KGlobal::locale()->setTimezone( mTimeZoneId, mTimeZoneAdd30min ); } KPimGlobalPrefs::~KPimGlobalPrefs() diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h index f6b6628..7c55099 100644 --- a/libkdepim/kpimglobalprefs.h +++ b/libkdepim/kpimglobalprefs.h @@ -96,6 +96,7 @@ class KPimGlobalPrefs : public KPrefs bool mUseDaylightsaving; int mDaylightsavingStart; int mDaylightsavingEnd; + bool mTimeZoneAdd30min; int mEmailClient; QString mEmailOtherChannel; diff --git a/microkde/kdecore/klocale.cpp b/microkde/kdecore/klocale.cpp index 27acfec..673d845 100644 --- a/microkde/kdecore/klocale.cpp +++ b/microkde/kdecore/klocale.cpp @@ -819,9 +819,11 @@ QStringList KLocale::timeZoneList() const { return mTimeZoneList; } -void KLocale::setTimezone( const QString &timeZone ) +void KLocale::setTimezone( const QString &timeZone, bool oddTZ ) { mTimeZoneOffset = timezoneOffset( timeZone ); + if ( oddTZ ) + mTimeZoneOffset += 30; } void KLocale::setDaylightSaving( bool b, int start , int end ) diff --git a/microkde/kdecore/klocale.h b/microkde/kdecore/klocale.h index 5783530..be9442c 100644 --- a/microkde/kdecore/klocale.h +++ b/microkde/kdecore/klocale.h @@ -95,7 +95,7 @@ class KLocale QStringList timeZoneList() const; void setDaylightSaving( bool, int , int ); int localTimeOffset(const QDateTime &); - void setTimezone( const QString &timeZone ); + void setTimezone( const QString &timeZone , bool oddTZ); private: QTime readTime(const QString &str, bool seconds, bool *ok) const; QDate readDate(const QString &str, bool shortFormat, bool *ok) const; |