author | zautrix <zautrix> | 2005-08-17 19:23:08 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-17 19:23:08 (UTC) |
commit | dfb9cdc7d39b988e23e5491e1c8f0e8c5713dae5 (patch) (side-by-side diff) | |
tree | f2c58bbb72294d1a7d1d3fac8c11e15087a01460 | |
parent | fefa169958abb9c487205d92b54c79532b6f924a (diff) | |
download | kdepimpi-dfb9cdc7d39b988e23e5491e1c8f0e8c5713dae5.zip kdepimpi-dfb9cdc7d39b988e23e5491e1c8f0e8c5713dae5.tar.gz kdepimpi-dfb9cdc7d39b988e23e5491e1c8f0e8c5713dae5.tar.bz2 |
import fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 1 | ||||
-rw-r--r-- | kaddressbook/xxportmanager.cpp | 13 |
2 files changed, 11 insertions, 3 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 15caf9e..fd5e4f9 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -11,2 +11,3 @@ Added a config option to turn on asking before a contact is deleted. Fixed a problem with the default view and view selection at startup. +Formatted name is now set on import, if formatted name is empty. diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp index 7cb67ed..405f7ec 100644 --- a/kaddressbook/xxportmanager.cpp +++ b/kaddressbook/xxportmanager.cpp @@ -61,2 +61,3 @@ extern "C" #include "xxportmanager.h" +#include "nameeditdialog.h" @@ -134,2 +135,8 @@ void XXPortManager::slotImport( const QString &identifier, const QString &data ) int count = 0; + + KConfig config( locateLocal("config", "kabcrc") ); + config.setGroup( "General" ); + int FormattedNameType = config.readNumEntry( "FormattedNameType", 1 ); + + for ( it = list.begin(); it != list.end(); ++it ) { @@ -143,5 +150,7 @@ void XXPortManager::slotImport( const QString &identifier, const QString &data ) } - (*it).setResource( resource ); + if ( (*it).formattedName().isEmpty() ) + (*it).setFormattedName( NameEditDialog::formattedName( (*it), FormattedNameType ) ); if ( useUndo ) { + ++count; // We use a PwNewCommand so the user can undo it. @@ -156,6 +165,4 @@ void XXPortManager::slotImport( const QString &identifier, const QString &data ) } - if ( imported ) { KMessageBox::information( mCore, i18n( "%1 contacts\nsuccessfully\nimported.").arg( count) ); - emit modified(); |