summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorzautrix <zautrix>2004-09-22 03:08:05 (UTC)
committer zautrix <zautrix>2004-09-22 03:08:05 (UTC)
commitd63eac7a612a9724705bc58ad98c65c6ac052d07 (patch) (side-by-side diff)
treedc584a0ddcbd5f828ea36b86b6af640e46e137f2 /libkdepim
parent633522024e48efc423155a04b71083a03696211d (diff)
downloadkdepimpi-d63eac7a612a9724705bc58ad98c65c6ac052d07.zip
kdepimpi-d63eac7a612a9724705bc58ad98c65c6ac052d07.tar.gz
kdepimpi-d63eac7a612a9724705bc58ad98c65c6ac052d07.tar.bz2
connected global config
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp2
-rw-r--r--libkdepim/kpimglobalprefs.cpp17
-rw-r--r--libkdepim/kpimglobalprefs.h4
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
@@ -735,25 +735,25 @@ void KDEPIMConfigWidget::usrWriteConfig()
prefs->mPagerOtherChannel = mPagerOtherChannel;
prefs->mPagerOtherMessage = mPagerOtherMessage;
prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters;
prefs->mSipClient = mSipClient;
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)
{
if (tags) {
int i = tags->findIndex(text);
if (i > 0) combo->setCurrentItem(i);
} else {
for(int i=0;i<combo->count();++i) {
if (combo->text(i) == text) {
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp
index 12a503d..a896a0f 100644
--- a/libkdepim/kpimglobalprefs.cpp
+++ b/libkdepim/kpimglobalprefs.cpp
@@ -91,24 +91,41 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name )
addItemInt( "PagerChannelType", &mPagerClient, NONE_PAC );
addItemString( "PagerChannel", &mPagerOtherChannel, "" );
addItemString( "PagerChannelMessage", &mPagerOtherMessage, "" );
addItemString( "PagerChannelParameters", &mPagerOtherMessageParameters, "" );
addItemInt( "SIPChannelType", &mSipClient, NONE_SIC );
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()
{
if ( !sInstance ) {
sInstance = staticDeleter.setObject( new KPimGlobalPrefs() );
sInstance->readConfig();
}
return sInstance;
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h
index dad78e6..84ba689 100644
--- a/libkdepim/kpimglobalprefs.h
+++ b/libkdepim/kpimglobalprefs.h
@@ -28,24 +28,25 @@ Copyright (c) 2004 Ulf Schenk
$Id$
*/
#ifndef KPIMGLOBALPREFS_H
#define KPIMGLOBALPREFS_H
#include "kprefs.h"
class KPimGlobalPrefs : public KPrefs
{
public:
+ void setGlobalConfig();
static KPimGlobalPrefs *instance();
virtual ~KPimGlobalPrefs();
enum EMailClients {
NONE_EMC = 0,
OTHER_EMC = 1,
OMPI_EMC = 2,
QTOPIA_EMC = 3,
OPIE_EMC = 4
@@ -87,27 +88,24 @@ class KPimGlobalPrefs : public KPrefs
//US I copied the following "locale" settings from KOPrefs
int mPreferredDate;
QString mUserDateFormatLong;
QString mUserDateFormatShort;
int mPreferredLanguage;
int mPreferredTime;
bool mWeekStartsOnSunday;
QString mTimeZoneId;
bool mUseDaylightsaving;
int mDaylightsavingStart;
int mDaylightsavingEnd;
-
-
-
int mEmailClient;
QString mEmailOtherChannel;
QString mEmailOtherMessage;
QString mEmailOtherMessageParameters;
QString mEmailOtherMessage2;
QString mEmailOtherMessageParameters2;
int mPhoneClient;
QString mPhoneOtherChannel;
QString mPhoneOtherMessage;
QString mPhoneOtherMessageParameters;