-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 @@ -116,8 +116,19 @@ void KDEPIMConfigWidget::showTimeZoneTab() tabWidget->setCurrentPage ( 3 ) ; } 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 ); mStoreUrl = new KURLRequester( storePage ); diff --git a/libkdepim/kpimglobalprefs.cpp b/libkdepim/kpimglobalprefs.cpp index a09b278..873f0eb 100644 --- a/libkdepim/kpimglobalprefs.cpp +++ b/libkdepim/kpimglobalprefs.cpp @@ -59,8 +59,12 @@ KPimGlobalPrefs::KPimGlobalPrefs( const QString &name ) addItemBool("WeekStartsOnSunday",&mWeekStartsOnSunday,false); 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)") ); addItemBool("UseDaylightsaving",&mUseDaylightsaving,true); @@ -187,8 +191,9 @@ void KPimGlobalPrefs::setGlobalConfig() KGlobal::locale()->setDaylightSaving( mUseDaylightsaving, 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 @@ -101,8 +101,9 @@ class KPimGlobalPrefs : public KPrefs int mDaylightsavingStart; int mDaylightsavingEnd; bool mTimeZoneAdd30min; QFont mApplicationFont; + QColor mAlternateColor; int mEmailClient; QString mEmailOtherChannel; QString mEmailOtherMessage; |