summaryrefslogtreecommitdiffabout
path: root/korganizer/koprefs.cpp
Unidiff
Diffstat (limited to 'korganizer/koprefs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koprefs.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 1b0e5f4..31ef338 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -515,32 +515,42 @@ 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}
521int KOPrefs::getCalendarID( const QString & name ) 521int 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}
531int KOPrefs::getFuzzyCalendarID( const QString & name )
532{
533 KopiCalendarFile * kkf = mCalendars.first();
534 while ( kkf ) {
535 if ( name.lower() == kkf->mName.lower())
536 return kkf->mCalNumber;
537 kkf = mCalendars.next();
538 }
539 return 0;
540}
531QString KOPrefs::calName( int calNum) const 541QString KOPrefs::calName( int calNum) const
532{ 542{
533 return (mDefCalColors[calNum-1])->mName; 543 return (mDefCalColors[calNum-1])->mName;
534} 544}
535QColor KOPrefs::defaultColor( int calNum ) const 545QColor KOPrefs::defaultColor( int calNum ) const
536{ 546{
537 if ( calNum == 1 ) return mEventColor; 547 if ( calNum == 1 ) return mEventColor;
538 return (mDefCalColors[calNum-1])->mDefaultColor; 548 return (mDefCalColors[calNum-1])->mDefaultColor;
539} 549}
540void KOPrefs::usrWriteConfig() 550void KOPrefs::usrWriteConfig()
541{ 551{
542 config()->setGroup("General"); 552 config()->setGroup("General");
543 config()->writeEntry("Custom Categories",mCustomCategories); 553 config()->writeEntry("Custom Categories",mCustomCategories);
544 554
545 config()->setGroup("Personal Settings"); 555 config()->setGroup("Personal Settings");
546 config()->writeEntry("user_name",mName); 556 config()->writeEntry("user_name",mName);