Version: (using KDE KDE 3.5.0) Installed from: SuSE RPMs OS: Linux Adding a contact to the address book by selecting an e-mail address in KMail (running in Kontakt) transfers the name correctly to the contact entry, but the formatted name is 'Simple name' instead of the default 'Reverse name with comma' from Configure Address Book -> General -> Contact.
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.