author | zautrix <zautrix> | 2004-09-18 17:25:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-18 17:25:46 (UTC) |
commit | 3f16c7aa0ab6badf304c537a6981ece743138821 (patch) (side-by-side diff) | |
tree | 1dda326a1025477c7dd1a284609fa108da4e2e1d | |
parent | a355a58898d0d08d797f872751254cfa958387c1 (diff) | |
download | kdepimpi-3f16c7aa0ab6badf304c537a6981ece743138821.zip kdepimpi-3f16c7aa0ab6badf304c537a6981ece743138821.tar.gz kdepimpi-3f16c7aa0ab6badf304c537a6981ece743138821.tar.bz2 |
sync fixes
-rw-r--r-- | kabc/addressbook.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 20 |
2 files changed, 17 insertions, 10 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index d03dea3..16e1653 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -452,2 +452,5 @@ void AddressBook::insertAddressee( const Addressee &a, bool setRev ) if ( a.uid() == (*it).uid() ) { + if ( setRev && (*it).uid().left( 19 ) == QString("last-syncAddressee-") ) { + return; + } bool changed = false; @@ -463,2 +466,3 @@ void AddressBook::insertAddressee( const Addressee &a, bool setRev ) if ( setRev ) { + // get rid of micro seconds @@ -527,3 +531,3 @@ Addressee::List AddressBook::getExternLastSyncAddressees() for ( it = begin(); it != end(); ++it ) { - if ( (*it).uid().left( 20 ) == "last-syncAddressee-" ) { + if ( (*it).uid().left( 19 ) == "last-syncAddressee-" ) { if ( (*it).familyName().left(3) == "E: " ) @@ -558,2 +562,3 @@ Addressee::List AddressBook::allAddressees() return d->mAddressees; + } diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 215ce83..74c10d2 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -2530,3 +2530,3 @@ KABC::Addressee KABCore::getLastSyncAddressee() sum = "E: "; - lse.setFamilyName(sum+mCurrentSyncDevice + i18n(" - sync event")); + lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event")); lse.setRevision( mLastAddressbookSync ); @@ -2765,3 +2765,3 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo bool skipIncidence = false; - if ( uid.left(20) == QString("last-syncAddressee-") ) + if ( uid.left(19) == QString("last-syncAddressee-") ) skipIncidence = true; @@ -2852,3 +2852,3 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo bool skipIncidence = false; - if ( uid.left(20) == QString("last-syncAddressee-") ) + if ( uid.left(19) == QString("last-syncAddressee-") ) skipIncidence = true; @@ -2899,5 +2899,2 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo el.clear(); - - - bar.hide(); @@ -2909,4 +2906,9 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo addresseeRSync.setRevision( mLastAddressbookSync ); - addresseeRSync.setGivenName( i18n("Remote from: ")+mCurrentSyncName ) ; - addresseeLSync.setGivenName(i18n("Local from: ") + mCurrentSyncName ); + addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; + addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); + addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; + addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); + addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; + addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); + if ( mGlobalSyncMode == SYNC_MODE_NORMAL) @@ -2917,3 +2919,3 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo if ( KABPrefs::instance()->mShowSyncSummary ) { - KMessageBox::information(this, mes, i18n("KO/Pi Synchronization") ); + KMessageBox::information(this, mes, i18n("KA/Pi Synchronization") ); } |