diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-01 00:37:02 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-01 00:37:02 +0000 |
commit | cc29364f06178f8f6b457384f2ec37a042bd9d43 (patch) | |
tree | 7c77a3184c698bbf9d98cef09fb1ba8124daceba /korganizer/koprefs.cpp | |
parent | 4f6c584bacc8c3c694228f36ada3de77a76614a6 (diff) | |
download | tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.tar.gz tdepim-cc29364f06178f8f6b457384f2ec37a042bd9d43.zip |
* Massive set of changes to bring in all fixes and enhancements from the Enterprise PIM branch
* Ensured that the Trinity changes were applied on top of those enhancements, and any redundancy removed
* Added journal read support to the CalDAV resource
* Fixed CalDAV resource to use events URL for tasks and journals when separate URL checkbox unchecked
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1170461 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/koprefs.cpp')
-rw-r--r-- | korganizer/koprefs.cpp | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 3532b1cc1..535fe1045 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -88,12 +88,9 @@ KOPrefs::KOPrefs() : timeBarFontItem()->setDefaultValue( mDefaultTimeBarFont ); monthViewFontItem()->setDefaultValue( mDefaultMonthViewFont ); - eventColorItem()->setDefaultValue( mDefaultCategoryColor ); // Load it now, not deep within some painting code mMyAddrBookMails = KABC::StdAddressBook::self()->whoAmI().emails(); - - mAlarmsEnabledByDefault = false; } @@ -202,8 +199,8 @@ void KOPrefs::usrReadConfig() TQMapIterator<TQString, TQString> it3; for( it3 = map.begin(); it3 != map.end(); ++it3 ) { - kdDebug(5850)<< "KOPrefs::usrReadConfig: key: " << it3.key() << " value: " - << it3.data()<<endl; + // kdDebug(5850)<< "KOPrefs::usrReadConfig: key: " << it3.key() << " value: " + // << it3.data()<<endl; setResourceColor( it3.key(), config()->readColorEntry( it3.key(), &mDefaultResourceColor ) ); } @@ -213,9 +210,6 @@ void KOPrefs::usrReadConfig() setTimeZoneIdDefault(); } - config()->setGroup("Event Dialogs"); - mAlarmsEnabledByDefault = config()->readBoolEntry( "Alarm Enabled By Default" ); - #if 0 config()->setGroup("FreeBusy"); if( mRememberRetrievePw ) @@ -256,9 +250,6 @@ void KOPrefs::usrWriteConfig() i->writeConfig( config() ); } - config()->setGroup("Event Dialogs"); - config()->writeEntry( "Alarm Enabled By Default", mAlarmsEnabledByDefault ); - #if 0 if( mRememberRetrievePw ) config()->writeEntry( "Retrieve Server Password", KStringHandler::obscure( mRetrievePassword ) ); @@ -292,8 +283,8 @@ bool KOPrefs::hasCategoryColor( const TQString& cat ) const void KOPrefs::setResourceColor ( const TQString &cal, const TQColor &color ) { - kdDebug(5850)<<"KOPrefs::setResourceColor: " << cal << " color: "<< - color.name()<<endl; + // kdDebug(5850)<<"KOPrefs::setResourceColor: " << cal << " color: "<< + // color.name()<<endl; mResourceColors.replace( cal, new TQColor( color ) ); } @@ -327,12 +318,21 @@ TQColor* KOPrefs::resourceColor( const TQString &cal ) TQString KOPrefs::fullName() { + TQString tusername; if ( mEmailControlCenter ) { KEMailSettings settings; - return settings.getSetting( KEMailSettings::RealName ); + tusername = settings.getSetting( KEMailSettings::RealName ); } else { - return userName(); + tusername = userName(); } + + // Quote the username as it might contain commas and other quotable chars. + tusername = KPIM::quoteNameIfNecessary( tusername ); + + TQString tname, temail; + KPIM::getNameAndMail( tusername, tname, temail ); // ignore return value + // which is always false + return tname; } TQString KOPrefs::email() @@ -415,8 +415,11 @@ bool KOPrefs::thatIsMe( const TQString& _email ) for ( KPIM::IdentityManager::ConstIterator it = KOCore::self()->identityManager()->begin(); it != KOCore::self()->identityManager()->end(); ++it ) { - if ( email == (*it).emailAddr() ) + if ( email == (*it).primaryEmailAddress() ) return true; + const TQStringList & aliases = (*it).emailAliases(); + if ( aliases.find( email ) != aliases.end() ) + return true; } if ( mAdditionalMails.find( email ) != mAdditionalMails.end() ) |