author | zautrix <zautrix> | 2005-11-25 19:44:15 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-11-25 19:44:15 (UTC) |
commit | 7a439999b9fa2bd7ad76e195cdf95bf5211952cb (patch) (unidiff) | |
tree | 88c7e5771ed955004b6ef3b74c339e6b44b8a7ad /korganizer | |
parent | 231e6f8215bbc4f7e301965f8f3c650e44586ec9 (diff) | |
download | kdepimpi-7a439999b9fa2bd7ad76e195cdf95bf5211952cb.zip kdepimpi-7a439999b9fa2bd7ad76e195cdf95bf5211952cb.tar.gz kdepimpi-7a439999b9fa2bd7ad76e195cdf95bf5211952cb.tar.bz2 |
sync
-rw-r--r-- | korganizer/koprefs.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 31ef338..9147af3 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -515,48 +515,56 @@ void KOPrefs::deleteCalendar( int num ) | |||
515 | delete kkf; | 515 | delete kkf; |
516 | return; | 516 | return; |
517 | } | 517 | } |
518 | kkf = mCalendars.next(); | 518 | kkf = mCalendars.next(); |
519 | } | 519 | } |
520 | } | 520 | } |
521 | int KOPrefs::getCalendarID( const QString & name ) | 521 | int KOPrefs::getCalendarID( const QString & name ) |
522 | { | 522 | { |
523 | KopiCalendarFile * kkf = mCalendars.first(); | 523 | KopiCalendarFile * kkf = mCalendars.first(); |
524 | while ( kkf ) { | 524 | while ( kkf ) { |
525 | if ( name == kkf->mName) | 525 | if ( name == kkf->mName) |
526 | return kkf->mCalNumber; | 526 | return kkf->mCalNumber; |
527 | kkf = mCalendars.next(); | 527 | kkf = mCalendars.next(); |
528 | } | 528 | } |
529 | return 1; | 529 | return 1; |
530 | } | 530 | } |
531 | int KOPrefs::getFuzzyCalendarID( const QString & name ) | 531 | int KOPrefs::getFuzzyCalendarID( const QString & name ) |
532 | { | 532 | { |
533 | KopiCalendarFile * kkf = mCalendars.first(); | 533 | KopiCalendarFile * kkf = mCalendars.first(); |
534 | while ( kkf ) { | 534 | while ( kkf ) { |
535 | if ( name.lower() == kkf->mName.lower()) | 535 | if ( name.lower() == kkf->mName.lower()) |
536 | return kkf->mCalNumber; | 536 | return kkf->mCalNumber; |
537 | kkf = mCalendars.next(); | 537 | kkf = mCalendars.next(); |
538 | } | 538 | } |
539 | QString name2 = name; | ||
540 | name2.replace (QRegExp ("_")," " ); | ||
541 | kkf = mCalendars.first(); | ||
542 | while ( kkf ) { | ||
543 | if ( name2.lower() == kkf->mName.lower()) | ||
544 | return kkf->mCalNumber; | ||
545 | kkf = mCalendars.next(); | ||
546 | } | ||
539 | return 0; | 547 | return 0; |
540 | } | 548 | } |
541 | QString KOPrefs::calName( int calNum) const | 549 | QString KOPrefs::calName( int calNum) const |
542 | { | 550 | { |
543 | return (mDefCalColors[calNum-1])->mName; | 551 | return (mDefCalColors[calNum-1])->mName; |
544 | } | 552 | } |
545 | QColor KOPrefs::defaultColor( int calNum ) const | 553 | QColor KOPrefs::defaultColor( int calNum ) const |
546 | { | 554 | { |
547 | if ( calNum == 1 ) return mEventColor; | 555 | if ( calNum == 1 ) return mEventColor; |
548 | return (mDefCalColors[calNum-1])->mDefaultColor; | 556 | return (mDefCalColors[calNum-1])->mDefaultColor; |
549 | } | 557 | } |
550 | void KOPrefs::usrWriteConfig() | 558 | void KOPrefs::usrWriteConfig() |
551 | { | 559 | { |
552 | config()->setGroup("General"); | 560 | config()->setGroup("General"); |
553 | config()->writeEntry("Custom Categories",mCustomCategories); | 561 | config()->writeEntry("Custom Categories",mCustomCategories); |
554 | 562 | ||
555 | config()->setGroup("Personal Settings"); | 563 | config()->setGroup("Personal Settings"); |
556 | config()->writeEntry("user_name",mName); | 564 | config()->writeEntry("user_name",mName); |
557 | config()->writeEntry("user_email",mEmail); | 565 | config()->writeEntry("user_email",mEmail); |
558 | 566 | ||
559 | config()->setGroup("Category Colors"); | 567 | config()->setGroup("Category Colors"); |
560 | QDictIterator<QColor> it(mCategoryColors); | 568 | QDictIterator<QColor> it(mCategoryColors); |
561 | while (it.current()) { | 569 | while (it.current()) { |
562 | config()->writeEntry(it.currentKey(),*(it.current())); | 570 | config()->writeEntry(it.currentKey(),*(it.current())); |