Summary: | Adding address from KMail does not apply default name formatting | ||
---|---|---|---|
Product: | kab3 | Reporter: | S Bufton <kdebugs> |
Component: | general | Assignee: | Tobias Koenig <tokoe> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
S Bufton
2005-12-24 00:14:03 UTC
SVN commit 633308 by tokoe: Add the formatted name according to the kaddressbook settings BUG:118932 M +31 -0 kaddrbook.cpp --- branches/KDE/3.5/kdepim/libkdepim/kaddrbook.cpp #633307:633308 @@ -113,6 +113,37 @@ a.setNameFromString( name ); a.insertEmail( email, true ); + { + KConfig config( "kaddressbookrc" ); + config.setGroup( "General" ); + int type = config.readNumEntry( "FormattedNameType", 1 ); + + QString name; + switch ( type ) { + case 1: + name = a.givenName() + " " + a.familyName(); + break; + case 2: + name = a.assembledName(); + break; + case 3: + name = a.familyName() + ", " + a.givenName(); + break; + case 4: + name = a.familyName() + " " + a.givenName(); + break; + case 5: + name = a.organization(); + break; + default: + name = ""; + break; + } + name.simplifyWhiteSpace(); + + a.setFormattedName( name ); + } + if ( !KAddrBookExternal::addAddressee( a ) ) { KMessageBox::error( parent, i18n("Cannot save to addressbook.") ); } else { The development of the old KAddressBook will be discontinued for KDE 4.4. Since the new application has the same name, but a completly new code base we close all bug reports against the old version and ask the submitters to resend there reports against the new product. |