-rw-r--r-- | kaddressbook/kabcore.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 20b107e..fa9f130 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -2441,4 +2441,8 @@ void KABCore::setFormattedName() KABC::AddressBook::Iterator it; + bool modified = false; for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { if ( (*it).tagged() ) { + if ( (*it).uid().left( 2 ) == "la" ) + if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) + continue; ++count; @@ -2460,2 +2464,5 @@ void KABCore::setFormattedName() (*it).setFormattedName( fName ); + (*it).setChanged( true ); + modified = true; + (*it).setRevision( QDateTime::currentDateTime() ); } @@ -2464,6 +2471,10 @@ void KABCore::setFormattedName() qApp->processEvents(); - mViewManager->refreshView( "" ); + if ( modified ) + setModified( true ); Addressee add; mDetails->setAddressee( add ); - message(i18n("Setting formatted name completed!") ); + if ( count == 0 ) + message(i18n("No contact changed!") ); + else + message(i18n("%1 contacts changed!").arg( count ) ); } |