summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-11-25 19:44:15 (UTC)
committer zautrix <zautrix>2005-11-25 19:44:15 (UTC)
commit7a439999b9fa2bd7ad76e195cdf95bf5211952cb (patch) (side-by-side diff)
tree88c7e5771ed955004b6ef3b74c339e6b44b8a7ad /korganizer
parent231e6f8215bbc4f7e301965f8f3c650e44586ec9 (diff)
downloadkdepimpi-7a439999b9fa2bd7ad76e195cdf95bf5211952cb.zip
kdepimpi-7a439999b9fa2bd7ad76e195cdf95bf5211952cb.tar.gz
kdepimpi-7a439999b9fa2bd7ad76e195cdf95bf5211952cb.tar.bz2
sync
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koprefs.cpp8
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 )
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;
}
int KOPrefs::getFuzzyCalendarID( const QString & name )
{
KopiCalendarFile * kkf = mCalendars.first();
while ( kkf ) {
if ( name.lower() == kkf->mName.lower())
return kkf->mCalNumber;
kkf = mCalendars.next();
}
+ QString name2 = name;
+ name2.replace (QRegExp ("_")," " );
+ kkf = mCalendars.first();
+ while ( kkf ) {
+ if ( name2.lower() == kkf->mName.lower())
+ return kkf->mCalNumber;
+ kkf = mCalendars.next();
+ }
return 0;
}
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()));