author | zautrix <zautrix> | 2005-06-15 18:23:08 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-15 18:23:08 (UTC) |
commit | ccfe3f97afd65c75ee6c7c931cb3694919a4e29b (patch) (unidiff) | |
tree | 117d3467ef1d9678f31dea1b506390707f88d94a /korganizer/koprefs.cpp | |
parent | cba0ac17d3d505805be6aa4b4fea6f63473a1e00 (diff) | |
download | kdepimpi-ccfe3f97afd65c75ee6c7c931cb3694919a4e29b.zip kdepimpi-ccfe3f97afd65c75ee6c7c931cb3694919a4e29b.tar.gz kdepimpi-ccfe3f97afd65c75ee6c7c931cb3694919a4e29b.tar.bz2 |
fixess
-rw-r--r-- | korganizer/koprefs.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 65f0342..a4ea3d3 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -474,48 +474,52 @@ KopiCalendarFile * KOPrefs::getNewCalendar() | |||
474 | { | 474 | { |
475 | KopiCalendarFile * kkf = new KopiCalendarFile(); | 475 | KopiCalendarFile * kkf = new KopiCalendarFile(); |
476 | kkf->mCalNumber = mNextAvailableCalendar; | 476 | kkf->mCalNumber = mNextAvailableCalendar; |
477 | mDefCalColors.resize( mNextAvailableCalendar ); | 477 | mDefCalColors.resize( mNextAvailableCalendar ); |
478 | mDefCalColors[mNextAvailableCalendar-1] = kkf; | 478 | mDefCalColors[mNextAvailableCalendar-1] = kkf; |
479 | ++mNextAvailableCalendar; | 479 | ++mNextAvailableCalendar; |
480 | kkf->mDefaultColor = mEventColor; | 480 | kkf->mDefaultColor = mEventColor; |
481 | kkf->mName = i18n("New Calendar"); | 481 | kkf->mName = i18n("New Calendar"); |
482 | mCalendars.append( kkf ); | 482 | mCalendars.append( kkf ); |
483 | return kkf; | 483 | return kkf; |
484 | } | 484 | } |
485 | void KOPrefs::deleteCalendar( int num ) | 485 | void KOPrefs::deleteCalendar( int num ) |
486 | { | 486 | { |
487 | KopiCalendarFile * kkf = mCalendars.first(); | 487 | KopiCalendarFile * kkf = mCalendars.first(); |
488 | while ( kkf ) { | 488 | while ( kkf ) { |
489 | if ( kkf->mCalNumber == num ) { | 489 | if ( kkf->mCalNumber == num ) { |
490 | qDebug("KOPrefs::deleteCalendar %d ", num ); | 490 | qDebug("KOPrefs::deleteCalendar %d ", num ); |
491 | mCalendars.remove( kkf ); | 491 | mCalendars.remove( kkf ); |
492 | delete kkf; | 492 | delete kkf; |
493 | return; | 493 | return; |
494 | } | 494 | } |
495 | kkf = mCalendars.next(); | 495 | kkf = mCalendars.next(); |
496 | } | 496 | } |
497 | } | 497 | } |
498 | QString KOPrefs::calName( int calNum) const | ||
499 | { | ||
500 | return (mDefCalColors[calNum-1])->mName; | ||
501 | } | ||
498 | QColor KOPrefs::defaultColor( int calNum ) const | 502 | QColor KOPrefs::defaultColor( int calNum ) const |
499 | { | 503 | { |
500 | if ( calNum == 1 ) return mEventColor; | 504 | if ( calNum == 1 ) return mEventColor; |
501 | return (mDefCalColors[calNum-1])->mDefaultColor; | 505 | return (mDefCalColors[calNum-1])->mDefaultColor; |
502 | } | 506 | } |
503 | void KOPrefs::usrWriteConfig() | 507 | void KOPrefs::usrWriteConfig() |
504 | { | 508 | { |
505 | config()->setGroup("General"); | 509 | config()->setGroup("General"); |
506 | config()->writeEntry("Custom Categories",mCustomCategories); | 510 | config()->writeEntry("Custom Categories",mCustomCategories); |
507 | 511 | ||
508 | config()->setGroup("Personal Settings"); | 512 | config()->setGroup("Personal Settings"); |
509 | config()->writeEntry("user_name",mName); | 513 | config()->writeEntry("user_name",mName); |
510 | config()->writeEntry("user_email",mEmail); | 514 | config()->writeEntry("user_email",mEmail); |
511 | 515 | ||
512 | config()->setGroup("Category Colors"); | 516 | config()->setGroup("Category Colors"); |
513 | QDictIterator<QColor> it(mCategoryColors); | 517 | QDictIterator<QColor> it(mCategoryColors); |
514 | while (it.current()) { | 518 | while (it.current()) { |
515 | config()->writeEntry(it.currentKey(),*(it.current())); | 519 | config()->writeEntry(it.currentKey(),*(it.current())); |
516 | ++it; | 520 | ++it; |
517 | } | 521 | } |
518 | KConfig fc (locateLocal("config","kopicalendarrc")); | 522 | KConfig fc (locateLocal("config","kopicalendarrc")); |
519 | fc.setGroup("CC"); | 523 | fc.setGroup("CC"); |
520 | fc.writeEntry("NumberCalendars",mCalendars.count()); | 524 | fc.writeEntry("NumberCalendars",mCalendars.count()); |
521 | int numCal = 1; | 525 | int numCal = 1; |