author | zautrix <zautrix> | 2004-09-22 03:08:05 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-22 03:08:05 (UTC) |
commit | d63eac7a612a9724705bc58ad98c65c6ac052d07 (patch) (unidiff) | |
tree | dc584a0ddcbd5f828ea36b86b6af640e46e137f2 /libkdepim | |
parent | 633522024e48efc423155a04b71083a03696211d (diff) | |
download | kdepimpi-d63eac7a612a9724705bc58ad98c65c6ac052d07.zip kdepimpi-d63eac7a612a9724705bc58ad98c65c6ac052d07.tar.gz kdepimpi-d63eac7a612a9724705bc58ad98c65c6ac052d07.tar.bz2 |
connected global config
-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 | |||
@@ -743,9 +743,9 @@ void KDEPIMConfigWidget::usrWriteConfig() | |||
743 | prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; | 743 | prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; |
744 | 744 | ||
745 | //release the cache that other views can access the changed values instantanious | 745 | //release the cache that other views can access the changed values instantanious |
746 | ExternalAppHandler::instance()->loadConfig(); | 746 | ExternalAppHandler::instance()->loadConfig(); |
747 | 747 | KPimGlobalPrefs::instance()->setGlobalConfig(); | |
748 | } | 748 | } |
749 | 749 | ||
750 | 750 | ||
751 | void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, | 751 | void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, |
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index 12a503d..a896a0f 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp | |||
@@ -99,8 +99,25 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) | |||
99 | addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" ); | 99 | addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" ); |
100 | 100 | ||
101 | } | 101 | } |
102 | 102 | ||
103 | void KPimGlobalPrefs::setGlobalConfig() | ||
104 | { | ||
105 | |||
106 | KGlobal::locale()->setHore24Format( !mPreferredTime ); | ||
107 | KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); | ||
108 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); | ||
109 | KGlobal::locale()->setLanguage( mPreferredLanguage ); | ||
110 | QString dummy = mUserDateFormatLong; | ||
111 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | ||
112 | dummy = mUserDateFormatShort; | ||
113 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | ||
114 | KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, | ||
115 | mDaylightsavingStart, | ||
116 | mDaylightsavingEnd ); | ||
117 | KGlobal::locale()->setTimezone( mTimeZoneId ); | ||
118 | |||
119 | } | ||
103 | KPimGlobalPrefs::~KPimGlobalPrefs() | 120 | KPimGlobalPrefs::~KPimGlobalPrefs() |
104 | { | 121 | { |
105 | } | 122 | } |
106 | 123 | ||
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h index dad78e6..84ba689 100644 --- a/libkdepim/kpimglobalprefs.h +++ b/libkdepim/kpimglobalprefs.h | |||
@@ -36,8 +36,9 @@ $Id$ | |||
36 | class KPimGlobalPrefs : public KPrefs | 36 | class KPimGlobalPrefs : public KPrefs |
37 | { | 37 | { |
38 | public: | 38 | public: |
39 | 39 | ||
40 | void setGlobalConfig(); | ||
40 | static KPimGlobalPrefs *instance(); | 41 | static KPimGlobalPrefs *instance(); |
41 | 42 | ||
42 | 43 | ||
43 | virtual ~KPimGlobalPrefs(); | 44 | virtual ~KPimGlobalPrefs(); |
@@ -95,11 +96,8 @@ class KPimGlobalPrefs : public KPrefs | |||
95 | bool mUseDaylightsaving; | 96 | bool mUseDaylightsaving; |
96 | int mDaylightsavingStart; | 97 | int mDaylightsavingStart; |
97 | int mDaylightsavingEnd; | 98 | int mDaylightsavingEnd; |
98 | 99 | ||
99 | |||
100 | |||
101 | |||
102 | int mEmailClient; | 100 | int mEmailClient; |
103 | QString mEmailOtherChannel; | 101 | QString mEmailOtherChannel; |
104 | QString mEmailOtherMessage; | 102 | QString mEmailOtherMessage; |
105 | QString mEmailOtherMessageParameters; | 103 | QString mEmailOtherMessageParameters; |