-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 2 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 17 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.h | 4 |
3 files changed, 19 insertions, 4 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 00a07d9..2819ab1 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp @@ -741,13 +741,13 @@ void KDEPIMConfigWidget::usrWriteConfig() prefs->mSipOtherChannel = mSipOtherChannel; prefs->mSipOtherMessage = mSipOtherMessage; prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; //release the cache that other views can access the changed values instantanious ExternalAppHandler::instance()->loadConfig(); - + KPimGlobalPrefs::instance()->setGlobalConfig(); } void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, const QStringList *tags) { diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 12a503d..a896a0f 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp @@ -97,12 +97,29 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) addItemString( "SIPChannel", &mSipOtherChannel, "" ); addItemString( "SIPChannelMessage", &mSipOtherMessage, "" ); addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" ); } +void KPimGlobalPrefs::setGlobalConfig() +{ + + KGlobal::locale()->setHore24Format( !mPreferredTime ); + KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); + KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); + KGlobal::locale()->setLanguage( mPreferredLanguage ); + QString dummy = mUserDateFormatLong; + KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); + dummy = mUserDateFormatShort; + KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); + KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, + mDaylightsavingStart, + mDaylightsavingEnd ); + KGlobal::locale()->setTimezone( mTimeZoneId ); + +} KPimGlobalPrefs::~KPimGlobalPrefs() { } KPimGlobalPrefs *KPimGlobalPrefs::instance() { diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h index dad78e6..84ba689 100644 --- a/libkdepim/kpimglobalprefs.h +++ b/libkdepim/kpimglobalprefs.h @@ -34,12 +34,13 @@ $Id$ #include "kprefs.h" class KPimGlobalPrefs : public KPrefs { public: + void setGlobalConfig(); static KPimGlobalPrefs *instance(); virtual ~KPimGlobalPrefs(); @@ -93,15 +94,12 @@ class KPimGlobalPrefs : public KPrefs bool mWeekStartsOnSunday; QString mTimeZoneId; bool mUseDaylightsaving; int mDaylightsavingStart; int mDaylightsavingEnd; - - - int mEmailClient; QString mEmailOtherChannel; QString mEmailOtherMessage; QString mEmailOtherMessageParameters; QString mEmailOtherMessage2; QString mEmailOtherMessageParameters2; |