Diffstat (limited to 'korganizer/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koprefsdialog.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 7ba1392..ebcff33 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -1413,49 +1413,55 @@ void KOPrefsDialog::usrReadConfig() mPrioSpin->setValue(KOPrefs::instance()->mWhatsNextPrios); // mAMails->clear(); // for ( QStringList::Iterator it = KOPrefs::instance()->mAdditionalMails.begin(); // it != KOPrefs::instance()->mAdditionalMails.end(); ++it ) { // QListViewItem *item = new QListViewItem(mAMails); // item->setText(0,*it); // mAMails->insertItem(item); // } //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); updateCategories(); mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps ); mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime ); mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount ); mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); - + mCatDefaultColor = KOPrefs::instance()->mEventColor; } void KOPrefsDialog::usrWriteConfig() { - - KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); KOPrefs::instance()->setFullName(mNameEdit->text()); KOPrefs::instance()->setEmail(mEmailEdit->text()); KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value(); KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); - + if ( mCatDefaultColor != KOPrefs::instance()->mEventColor ) { + QStringList cat = KOPrefs::instance()->mCustomCategories; + int iii = 0; + while ( iii < cat.count() ) { + if ( *KOPrefs::instance()->categoryColor( cat[ iii ] ) == mCatDefaultColor ) + KOPrefs::instance()->setCategoryColor( cat[ iii ], KOPrefs::instance()->mEventColor ); + ++iii; + } + } QDictIterator<QColor> it(mCategoryDict); while (it.current()) { KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current()); ++it; } KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value(); KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value(); KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value(); KOPrefs::instance()->mAdditionalMails.clear(); // QListViewItem *item; // item = mAMails->firstChild(); // while (item) // { // KOPrefs::instance()->mAdditionalMails.append( item->text(0) ); |