From 23db4aa99cb7a5feb540b6be578efaee8ec6ef80 Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 04 Apr 2005 11:29:55 +0000 Subject: sync fixes --- diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt index 7879194..e54e140 100644 --- a/bin/kdepim/kaddressbook/germantranslation.txt +++ b/bin/kdepim/kaddressbook/germantranslation.txt @@ -751,6 +751,10 @@ { "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" }, { "Edit new contact","Bearbeite neuen Kontakt" }, { "Edit ","Bearbeite " }, +{ "No contact changed!","Kein Kontakt verändert" }, +{ "%1 contacts changed!","%1 Kontakte geändert!" }, +{ "","" }, +{ "","" }, { "","" }, { "","" }, { "","" }, diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index af76558..2bd9e71 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -201,7 +201,7 @@ bool ResourceFile::doOpen() if ( !file.open( IO_ReadWrite ) ) return false; - if ( file.size() == 0 ) { + if ( file.size() < 10 ) { file.close(); return true; } diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 20b107e..fa9f130 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -2439,8 +2439,12 @@ void KABCore::setFormattedName() dlg.tagSelected(); int count = 0; KABC::AddressBook::Iterator it; + bool modified = false; for ( it = mAddressBook->begin(); it != mAddressBook->end(); ++it ) { - if ( (*it).tagged() ) { + if ( (*it).tagged() ) { + if ( (*it).uid().left( 2 ) == "la" ) + if ( (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) + continue; ++count; if ( count %10 == 0 ) message(i18n("Changing contact #%1").arg( count ) ); @@ -2458,14 +2462,21 @@ void KABCore::setFormattedName() if ( fName.isEmpty() || fName =="," ) fName = (*it).organization(); (*it).setFormattedName( fName ); + (*it).setChanged( true ); + modified = true; + (*it).setRevision( QDateTime::currentDateTime() ); } } message(i18n("Refreshing view...") ); 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 ) ); } void KABCore::clipboardDataChanged() -- cgit v0.9.0.2