-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 11 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.cpp | 5 | ||||
-rw-r--r-- | libkdepim/kpimglobalprefs.h | 1 |
3 files changed, 17 insertions, 0 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index d62d9f9..759b29d 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -108,24 +108,35 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, | |||
108 | setupLocaleDateTab(); | 108 | setupLocaleDateTab(); |
109 | setupTimeZoneTab(); | 109 | setupTimeZoneTab(); |
110 | setupExternalAppTab(); | 110 | setupExternalAppTab(); |
111 | setupStoreTab(); | 111 | setupStoreTab(); |
112 | 112 | ||
113 | } | 113 | } |
114 | void KDEPIMConfigWidget::showTimeZoneTab() | 114 | void KDEPIMConfigWidget::showTimeZoneTab() |
115 | { | 115 | { |
116 | tabWidget->setCurrentPage ( 3 ) ; | 116 | tabWidget->setCurrentPage ( 3 ) ; |
117 | } | 117 | } |
118 | void KDEPIMConfigWidget::setupStoreTab() | 118 | void KDEPIMConfigWidget::setupStoreTab() |
119 | { | 119 | { |
120 | QVBox *colorPage = new QVBox( this ); | ||
121 | tabWidget->addTab( colorPage, i18n( "Colors" ) ); | ||
122 | QWidget* cw = new QWidget( colorPage ); | ||
123 | KPrefsWidColor *holidayColor = | ||
124 | addWidColor(i18n("Alternate background"), | ||
125 | &(KPimGlobalPrefs::instance()->mAlternateColor),cw); | ||
126 | QHBoxLayout *topLayout = new QHBoxLayout(cw); | ||
127 | topLayout->addWidget(holidayColor->label()); | ||
128 | topLayout->addWidget( (QWidget* )holidayColor->button()); | ||
129 | |||
130 | |||
120 | QVBox *storePage = new QVBox( this ); | 131 | QVBox *storePage = new QVBox( this ); |
121 | new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage ); | 132 | new QLabel( i18n("Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail").arg(KGlobal::dirs()->localkdedir()), storePage ); |
122 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); | 133 | new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); |
123 | mStoreUrl = new KURLRequester( storePage ); | 134 | mStoreUrl = new KURLRequester( storePage ); |
124 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); | 135 | mStoreUrl->setURL( KGlobal::dirs()->localkdedir() ); |
125 | #ifdef DESKTOP_VERSION | 136 | #ifdef DESKTOP_VERSION |
126 | QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; | 137 | QString confFile = qApp->applicationDirPath ()+ "/.microkdehome" ; |
127 | QFileInfo fi ( confFile ); | 138 | QFileInfo fi ( confFile ); |
128 | if ( fi.exists() ) { | 139 | if ( fi.exists() ) { |
129 | KConfig cfg ( confFile ); | 140 | KConfig cfg ( confFile ); |
130 | cfg.setGroup("Global"); | 141 | cfg.setGroup("Global"); |
131 | QString localKdeDir = cfg.readEntry( "MICROKDEHOME", "x_x_x" ); | 142 | QString localKdeDir = cfg.readEntry( "MICROKDEHOME", "x_x_x" ); |
diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index a09b278..873f0eb 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp | |||
@@ -51,24 +51,28 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) | |||
51 | { | 51 | { |
52 | mLocaleDict = 0; | 52 | mLocaleDict = 0; |
53 | KPrefs::setCurrentGroup("Fonts"); | 53 | KPrefs::setCurrentGroup("Fonts"); |
54 | addItemFont("ApplicationFont",&mApplicationFont,KGlobalSettings::generalFont() ); | 54 | addItemFont("ApplicationFont",&mApplicationFont,KGlobalSettings::generalFont() ); |
55 | KPrefs::setCurrentGroup("Locale"); | 55 | KPrefs::setCurrentGroup("Locale"); |
56 | addItemInt("PreferredLanguage",&mPreferredLanguage,0); | 56 | addItemInt("PreferredLanguage",&mPreferredLanguage,0); |
57 | addItemInt("PreferredTime",&mPreferredTime,0); | 57 | addItemInt("PreferredTime",&mPreferredTime,0); |
58 | addItemInt("PreferredDate",&mPreferredDate,0); | 58 | addItemInt("PreferredDate",&mPreferredDate,0); |
59 | addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); | 59 | addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); |
60 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%AK %d. %b %y"); | 60 | addItemString("UserDateFormatLong", &mUserDateFormatLong, "%AK %d. %b %y"); |
61 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); | 61 | addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); |
62 | 62 | ||
63 | KPrefs::setCurrentGroup("Colors"); | ||
64 | addItemColor("AlternateBGcolor",&mAlternateColor,KGlobalSettings::alternateBackgroundColor()); | ||
65 | |||
66 | |||
63 | KPrefs::setCurrentGroup("Time & Date"); | 67 | KPrefs::setCurrentGroup("Time & Date"); |
64 | 68 | ||
65 | addItemString("TimeZoneName",&mTimeZoneId, ("+01:00 Europe/Oslo(CET)") ); | 69 | addItemString("TimeZoneName",&mTimeZoneId, ("+01:00 Europe/Oslo(CET)") ); |
66 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); | 70 | addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); |
67 | addItemBool("TimeZoneAdd30min",&mTimeZoneAdd30min,false); | 71 | addItemBool("TimeZoneAdd30min",&mTimeZoneAdd30min,false); |
68 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); | 72 | addItemInt("DaylightsavingStart",&mDaylightsavingStart,90); |
69 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); | 73 | addItemInt("DaylightsavingEnd",&mDaylightsavingEnd,304); |
70 | 74 | ||
71 | KPrefs::setCurrentGroup( "ExternalApplications" ); | 75 | KPrefs::setCurrentGroup( "ExternalApplications" ); |
72 | 76 | ||
73 | addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC ); | 77 | addItemInt( "EmailChannelType", &mEmailClient, OMPI_EMC ); |
74 | addItemString( "EmailChannel", &mEmailOtherChannel, "" ); | 78 | addItemString( "EmailChannel", &mEmailOtherChannel, "" ); |
@@ -179,24 +183,25 @@ void KPimGlobalPrefs::setGlobalConfig() | |||
179 | KGlobal::locale()->setHore24Format( !mPreferredTime ); | 183 | KGlobal::locale()->setHore24Format( !mPreferredTime ); |
180 | KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); | 184 | KGlobal::locale()->setWeekStartMonday( !mWeekStartsOnSunday ); |
181 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); | 185 | KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)mPreferredDate ); |
182 | KGlobal::locale()->setLanguage( mPreferredLanguage ); | 186 | KGlobal::locale()->setLanguage( mPreferredLanguage ); |
183 | QString dummy = mUserDateFormatLong; | 187 | QString dummy = mUserDateFormatLong; |
184 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); | 188 | KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") )); |
185 | dummy = mUserDateFormatShort; | 189 | dummy = mUserDateFormatShort; |
186 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); | 190 | KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") )); |
187 | KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, | 191 | KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, |
188 | mDaylightsavingStart, | 192 | mDaylightsavingStart, |
189 | mDaylightsavingEnd ); | 193 | mDaylightsavingEnd ); |
190 | KGlobal::locale()->setTimezone( mTimeZoneId, mTimeZoneAdd30min ); | 194 | KGlobal::locale()->setTimezone( mTimeZoneId, mTimeZoneAdd30min ); |
195 | KGlobalSettings::setAlternateBackgroundColor(mAlternateColor); | ||
191 | 196 | ||
192 | } | 197 | } |
193 | KPimGlobalPrefs::~KPimGlobalPrefs() | 198 | KPimGlobalPrefs::~KPimGlobalPrefs() |
194 | { | 199 | { |
195 | if (sInstance == this) | 200 | if (sInstance == this) |
196 | sInstance = staticDeleterGP.setObject(0); | 201 | sInstance = staticDeleterGP.setObject(0); |
197 | else | 202 | else |
198 | qDebug("Whats this? Error in KPimGlobalPrefs::~KPimGlobalPrefs() ?"); | 203 | qDebug("Whats this? Error in KPimGlobalPrefs::~KPimGlobalPrefs() ?"); |
199 | if ( mLocaleDict ) | 204 | if ( mLocaleDict ) |
200 | delete mLocaleDict; | 205 | delete mLocaleDict; |
201 | } | 206 | } |
202 | 207 | ||
diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h index bf17338..36cc25a 100644 --- a/libkdepim/kpimglobalprefs.h +++ b/libkdepim/kpimglobalprefs.h | |||
@@ -93,24 +93,25 @@ class KPimGlobalPrefs : public KPrefs | |||
93 | int mPreferredDate; | 93 | int mPreferredDate; |
94 | QString mUserDateFormatLong; | 94 | QString mUserDateFormatLong; |
95 | QString mUserDateFormatShort; | 95 | QString mUserDateFormatShort; |
96 | int mPreferredLanguage; | 96 | int mPreferredLanguage; |
97 | int mPreferredTime; | 97 | int mPreferredTime; |
98 | bool mWeekStartsOnSunday; | 98 | bool mWeekStartsOnSunday; |
99 | QString mTimeZoneId; | 99 | QString mTimeZoneId; |
100 | bool mUseDaylightsaving; | 100 | bool mUseDaylightsaving; |
101 | int mDaylightsavingStart; | 101 | int mDaylightsavingStart; |
102 | int mDaylightsavingEnd; | 102 | int mDaylightsavingEnd; |
103 | bool mTimeZoneAdd30min; | 103 | bool mTimeZoneAdd30min; |
104 | QFont mApplicationFont; | 104 | QFont mApplicationFont; |
105 | QColor mAlternateColor; | ||
105 | 106 | ||
106 | int mEmailClient; | 107 | int mEmailClient; |
107 | QString mEmailOtherChannel; | 108 | QString mEmailOtherChannel; |
108 | QString mEmailOtherMessage; | 109 | QString mEmailOtherMessage; |
109 | QString mEmailOtherMessageParameters; | 110 | QString mEmailOtherMessageParameters; |
110 | QString mEmailOtherMessage2; | 111 | QString mEmailOtherMessage2; |
111 | QString mEmailOtherMessageParameters2; | 112 | QString mEmailOtherMessageParameters2; |
112 | 113 | ||
113 | int mPhoneClient; | 114 | int mPhoneClient; |
114 | QString mPhoneOtherChannel; | 115 | QString mPhoneOtherChannel; |
115 | QString mPhoneOtherMessage; | 116 | QString mPhoneOtherMessage; |
116 | QString mPhoneOtherMessageParameters; | 117 | QString mPhoneOtherMessageParameters; |