author | zautrix <zautrix> | 2004-10-08 23:38:07 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-08 23:38:07 (UTC) |
commit | 07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861 (patch) (unidiff) | |
tree | 03d0e5d20e607e035e17fcdabd6bce789069f41e /libkdepim | |
parent | 44169895703beb3e8b1551a313d2d341bf742905 (diff) | |
download | kdepimpi-07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861.zip kdepimpi-07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861.tar.gz kdepimpi-07fdef2c2ea1153d39d7114b3d5bd4abc4f4c861.tar.bz2 |
some bugfixes
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index b71e18d..5081b26 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp | |||
@@ -53,27 +53,24 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) | |||
53 | //addItemBool("QuickSavingWOUnicode",&mUseQuicksave,false); | 53 | //addItemBool("QuickSavingWOUnicode",&mUseQuicksave,false); |
54 | // addItemBool("ShortDateInViewer",&mShortDateInViewer,false); | 54 | // addItemBool("ShortDateInViewer",&mShortDateInViewer,false); |
55 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); | 55 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%A %d %b %y"); |
56 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); | 56 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); |
57 | 57 | ||
58 | KPrefs::setCurrentGroup("Time & Date"); | 58 | KPrefs::setCurrentGroup("Time & Date"); |
59 | 59 | ||
60 | addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); | 60 | addItemString("TimeZoneName",&mTimeZoneId,i18n ("+01:00 Europe/Oslo(CET)") ); |
61 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); | 61 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); |
62 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); | 62 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); |
63 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); | 63 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); |
64 | 64 | ||
65 | |||
66 | |||
67 | |||
68 | KPrefs::setCurrentGroup( "ExternalApplications" ); | 65 | KPrefs::setCurrentGroup( "ExternalApplications" ); |
69 | 66 | ||
70 | addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC ); | 67 | addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC ); |
71 | addItemString( "EmailChannel", &mEmailOtherChannel, "" ); | 68 | addItemString( "EmailChannel", &mEmailOtherChannel, "" ); |
72 | addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" ); | 69 | addItemString( "EmailChannelMessage", &mEmailOtherMessage, "" ); |
73 | addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" ); | 70 | addItemString( "EmailChannelParameters", &mEmailOtherMessageParameters, "" ); |
74 | addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" ); | 71 | addItemString( "EmailChannelMessage2", &mEmailOtherMessage2, "" ); |
75 | addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" ); | 72 | addItemString( "EmailChannelParameters2", &mEmailOtherMessageParameters2, "" ); |
76 | 73 | ||
77 | addItemInt( "PhoneChannelType", &mPhoneClient, KPPI_PHC ); | 74 | addItemInt( "PhoneChannelType", &mPhoneClient, KPPI_PHC ); |
78 | addItemString( "PhoneChannel", &mPhoneOtherChannel, "" ); | 75 | addItemString( "PhoneChannel", &mPhoneOtherChannel, "" ); |
79 | addItemString( "PhoneChannelMessage", &mPhoneOtherMessage, "" ); | 76 | addItemString( "PhoneChannelMessage", &mPhoneOtherMessage, "" ); |
@@ -90,51 +87,52 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) | |||
90 | addItemString( "SMSChannelParameters", &mSMSOtherMessageParameters, "" ); | 87 | addItemString( "SMSChannelParameters", &mSMSOtherMessageParameters, "" ); |
91 | 88 | ||
92 | addItemInt( "PagerChannelType", &mPagerClient, NONE_PAC ); | 89 | addItemInt( "PagerChannelType", &mPagerClient, NONE_PAC ); |
93 | addItemString( "PagerChannel", &mPagerOtherChannel, "" ); | 90 | addItemString( "PagerChannel", &mPagerOtherChannel, "" ); |
94 | addItemString( "PagerChannelMessage", &mPagerOtherMessage, "" ); | 91 | addItemString( "PagerChannelMessage", &mPagerOtherMessage, "" ); |
95 | addItemString( "PagerChannelParameters", &mPagerOtherMessageParameters, "" ); | 92 | addItemString( "PagerChannelParameters", &mPagerOtherMessageParameters, "" ); |
96 | 93 | ||
97 | addItemInt( "SIPChannelType", &mSipClient, NONE_SIC ); | 94 | addItemInt( "SIPChannelType", &mSipClient, NONE_SIC ); |
98 | addItemString( "SIPChannel", &mSipOtherChannel, "" ); | 95 | addItemString( "SIPChannel", &mSipOtherChannel, "" ); |
99 | addItemString( "SIPChannelMessage", &mSipOtherMessage, "" ); | 96 | addItemString( "SIPChannelMessage", &mSipOtherMessage, "" ); |
100 | addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" ); | 97 | addItemString( "SIPChannelParameters", &mSipOtherMessageParameters, "" ); |
101 | 98 | ||
102 | |||
103 | KPrefs::setCurrentGroup( "PhoneAccess" ); | 99 | KPrefs::setCurrentGroup( "PhoneAccess" ); |
104 | addItemString("Ex2PhoneDevice",&mEx2PhoneDevice,"/dev/ircomm"); | 100 | addItemString("Ex2PhoneDevice",&mEx2PhoneDevice,"/dev/ircomm"); |
105 | addItemString("Ex2PhoneConnection",&mEx2PhoneConnection,"irda"); | 101 | addItemString("Ex2PhoneConnection",&mEx2PhoneConnection,"irda"); |
106 | addItemString("Ex2PhoneModel",&mEx2PhoneModel,"6310i"); | 102 | addItemString("Ex2PhoneModel",&mEx2PhoneModel,"6310i"); |
107 | 103 | ||
108 | |||
109 | } | 104 | } |
110 | 105 | ||
106 | |||
111 | void KPimGlobalPrefs::setGlobalConfig() | 107 | void KPimGlobalPrefs::setGlobalConfig() |
112 | { | 108 | { |
113 | 109 | ||
114 | KGlobal::locale()->setHore24Format( !mPreferredTime ); | 110 | KGlobal::locale()->setHore24Format( !mPreferredTime ); |
115 | KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); | 111 | KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); |
116 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); | 112 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); |
117 | KGlobal::locale()->setLanguage( mPreferredLanguage ); | 113 | KGlobal::locale()->setLanguage( mPreferredLanguage ); |
118 | QString dummy = mUserDateFormatLong; | 114 | QString dummy = mUserDateFormatLong; |
119 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | 115 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); |
120 | dummy = mUserDateFormatShort; | 116 | dummy = mUserDateFormatShort; |
121 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | 117 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); |
122 | KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, | 118 | KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, |
123 | mDaylightsavingStart, | 119 | mDaylightsavingStart, |
124 | mDaylightsavingEnd ); | 120 | mDaylightsavingEnd ); |
125 | KGlobal::locale()->setTimezone( mTimeZoneId ); | 121 | KGlobal::locale()->setTimezone( mTimeZoneId ); |
126 | 122 | ||
127 | } | 123 | } |
128 | KPimGlobalPrefs::~KPimGlobalPrefs() | 124 | KPimGlobalPrefs::~KPimGlobalPrefs() |
129 | { | 125 | { |
126 | //qDebug("KPimGlobalPrefs::~KPimGlobalPrefs() "); | ||
127 | writeConfig(); | ||
130 | } | 128 | } |
131 | 129 | ||
132 | KPimGlobalPrefs *KPimGlobalPrefs::instance() | 130 | KPimGlobalPrefs *KPimGlobalPrefs::instance() |
133 | { | 131 | { |
134 | if ( !sInstance ) { | 132 | if ( !sInstance ) { |
135 | sInstance = staticDeleter.setObject( new KPimGlobalPrefs() ); | 133 | sInstance = staticDeleter.setObject( new KPimGlobalPrefs() ); |
136 | sInstance->readConfig(); | 134 | sInstance->readConfig(); |
137 | } | 135 | } |
138 | 136 | ||
139 | return sInstance; | 137 | return sInstance; |
140 | } | 138 | } |