author | zautrix <zautrix> | 2005-07-06 09:52:24 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-06 09:52:24 (UTC) |
commit | 3b77a857e17e04e47d22ba6017dd723ed922e3fc (patch) (side-by-side diff) | |
tree | 0ce40d3e6480ae4016e3f2e464c3180be96bdd27 | |
parent | 4ac63cce98fabb59a47970baa2906b2fe8d0f2b0 (diff) | |
download | kdepimpi-3b77a857e17e04e47d22ba6017dd723ed922e3fc.zip kdepimpi-3b77a857e17e04e47d22ba6017dd723ed922e3fc.tar.gz kdepimpi-3b77a857e17e04e47d22ba6017dd723ed922e3fc.tar.bz2 |
fixx
-rw-r--r-- | korganizer/koprefs.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index f1f1442..138028d 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -496,96 +496,98 @@ void KOPrefs::deleteCalendar( int num ) { KopiCalendarFile * kkf = mCalendars.first(); while ( kkf ) { if ( kkf->mCalNumber == num ) { qDebug("KOPrefs::deleteCalendar %d ", num ); mCalendars.remove( kkf ); delete kkf; return; } kkf = mCalendars.next(); } } int KOPrefs::getCalendarID( const QString & name ) { KopiCalendarFile * kkf = mCalendars.first(); while ( kkf ) { if ( name == kkf->mName) return kkf->mCalNumber; kkf = mCalendars.next(); } return 1; } QString KOPrefs::calName( int calNum) const { return (mDefCalColors[calNum-1])->mName; } QColor KOPrefs::defaultColor( int calNum ) const { if ( calNum == 1 ) return mEventColor; return (mDefCalColors[calNum-1])->mDefaultColor; } void KOPrefs::usrWriteConfig() { config()->setGroup("General"); config()->writeEntry("Custom Categories",mCustomCategories); config()->setGroup("Personal Settings"); config()->writeEntry("user_name",mName); config()->writeEntry("user_email",mEmail); config()->setGroup("Category Colors"); QDictIterator<QColor> it(mCategoryColors); while (it.current()) { config()->writeEntry(it.currentKey(),*(it.current())); ++it; } KConfig fc (locateLocal("config","kopicalendarrc")); fc.setGroup("CC"); + fc.deleteGroup( "CC"); + fc.setGroup("CC"); fc.writeEntry("NumberCalendars",mCalendars.count()); int numCal = 1; int writeCal = 0; while ( numCal < mNextAvailableCalendar ) { KopiCalendarFile * kkf = mCalendars.first(); while ( kkf ) { //qDebug("cal num %d %d ", kkf->mCalNumber, numCal); if ( kkf->mCalNumber == numCal ) { ++writeCal; //qDebug("Write calendar %d %d ", numCal , writeCal); QString prefix = "Cal_" + QString::number( writeCal ); fc.writeEntry( prefix+"_isStandard", kkf->isStandard ); fc.writeEntry( prefix+"_isEnabled", kkf->isEnabled ); fc.writeEntry( prefix+"_isAlarmEnabled", kkf->isAlarmEnabled ); fc.writeEntry( prefix+"_isReadOnly", kkf->isReadOnly ); fc.writeEntry( prefix+"_isRelative", kkf->isRelative ); fc.writeEntry( prefix+"_Name", kkf->mName); fc.writeEntry( prefix+"_FileName", kkf->mFileName); fc.writeEntry( prefix+"_SavedFileName", kkf->mSavedFileName); fc.writeEntry( prefix+"_Color",kkf->mDefaultColor); } kkf = mCalendars.next(); } ++numCal; } fc.sync(); KPimPrefs::usrWriteConfig(); } void KOPrefs::setCategoryColor(QString cat,const QColor & color) { mCategoryColors.replace(cat,new QColor(color)); } QColor *KOPrefs::categoryColor(QString cat) { QColor *color = 0; if (!cat.isEmpty()) color = mCategoryColors[cat]; if (color) return color; else return &mDefaultCategoryColor; } void KOPrefs::setFullName(const QString &name) { mName = name; } |