-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 @@ -117,6 +117,17 @@ void KDEPIMConfigWidget::showTimeZoneTab() } void KDEPIMConfigWidget::setupStoreTab() { + QVBox *colorPage = new QVBox( this ); + tabWidget->addTab( colorPage, i18n( "Colors" ) ); + QWidget* cw = new QWidget( colorPage ); + KPrefsWidColor *holidayColor = + addWidColor(i18n("Alternate background"), + &(KPimGlobalPrefs::instance()->mAlternateColor),cw); + QHBoxLayout *topLayout = new QHBoxLayout(cw); + topLayout->addWidget(holidayColor->label()); + topLayout->addWidget( (QWidget* )holidayColor->button()); + + QVBox *storePage = new QVBox( this ); 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 ); new QLabel( i18n("<b>New data storage dir:</b>"), storePage ); diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index a09b278..873f0eb 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp @@ -60,6 +60,10 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) addItemString("UserDateFormatLong", &mUserDateFormatLong, "%AK %d. %b %y"); addItemString("UserDateFormatShort", &mUserDateFormatShort, "%aK %d.%m.%y"); + KPrefs::setCurrentGroup("Colors"); + addItemColor("AlternateBGcolor",&mAlternateColor,KGlobalSettings::alternateBackgroundColor()); + + KPrefs::setCurrentGroup("Time & Date"); addItemString("TimeZoneName",&mTimeZoneId, ("+01:00 Europe/Oslo(CET)") ); @@ -188,6 +192,7 @@ void KPimGlobalPrefs::setGlobalConfig() mDaylightsavingStart, mDaylightsavingEnd ); KGlobal::locale()->setTimezone( mTimeZoneId, mTimeZoneAdd30min ); + KGlobalSettings::setAlternateBackgroundColor(mAlternateColor); } KPimGlobalPrefs::~KPimGlobalPrefs() diff --git a/libkdepim/kpimglobalprefs.h b/libkdepim/kpimglobalprefs.h index bf17338..36cc25a 100644 --- a/libkdepim/kpimglobalprefs.h +++ b/libkdepim/kpimglobalprefs.h @@ -102,6 +102,7 @@ class KPimGlobalPrefs : public KPrefs int mDaylightsavingEnd; bool mTimeZoneAdd30min; QFont mApplicationFont; + QColor mAlternateColor; int mEmailClient; QString mEmailOtherChannel; |