author | zautrix <zautrix> | 2004-10-06 20:51:01 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-06 20:51:01 (UTC) |
commit | 0afcfa29ace7bc5e42a11fae44301e1e8230a376 (patch) (unidiff) | |
tree | b54f85b19ace24219be1b845469444089cacc94f /kaddressbook | |
parent | ed4675de07d947f55d2672c721599e3a0af1e24b (diff) | |
download | kdepimpi-0afcfa29ace7bc5e42a11fae44301e1e8230a376.zip kdepimpi-0afcfa29ace7bc5e42a11fae44301e1e8230a376.tar.gz kdepimpi-0afcfa29ace7bc5e42a11fae44301e1e8230a376.tar.bz2 |
some prefs cleanups
-rw-r--r-- | kaddressbook/kabcore.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index b014cba..9041e45 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2602,13 +2602,13 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2602 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2602 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2603 | if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { | 2603 | if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { |
2604 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); | 2604 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); |
2605 | local->removeAddressee( inL ); | 2605 | local->removeAddressee( inL ); |
2606 | ++deletedAddresseeL; | 2606 | ++deletedAddresseeL; |
2607 | } else { | 2607 | } else { |
2608 | if ( ! KABPrefs::instance()->mWriteBackExistingOnly ) { | 2608 | if ( ! syncManager->mWriteBackExistingOnly ) { |
2609 | inL.removeID(mCurrentSyncDevice ); | 2609 | inL.removeID(mCurrentSyncDevice ); |
2610 | ++addedAddresseeR; | 2610 | ++addedAddresseeR; |
2611 | inL.setRevision( modifiedCalendar ); | 2611 | inL.setRevision( modifiedCalendar ); |
2612 | local->insertAddressee( inL, false ); | 2612 | local->insertAddressee( inL, false ); |
2613 | inR = inL; | 2613 | inR = inL; |
2614 | inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); | 2614 | inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); |
@@ -2619,13 +2619,13 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2619 | } else { | 2619 | } else { |
2620 | if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { | 2620 | if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { |
2621 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); | 2621 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); |
2622 | local->removeAddressee( inL ); | 2622 | local->removeAddressee( inL ); |
2623 | ++deletedAddresseeL; | 2623 | ++deletedAddresseeL; |
2624 | } else { | 2624 | } else { |
2625 | if ( ! KABPrefs::instance()->mWriteBackExistingOnly ) { | 2625 | if ( ! syncManager->mWriteBackExistingOnly ) { |
2626 | ++addedAddresseeR; | 2626 | ++addedAddresseeR; |
2627 | inL.setRevision( modifiedCalendar ); | 2627 | inL.setRevision( modifiedCalendar ); |
2628 | local->insertAddressee( inL, false ); | 2628 | local->insertAddressee( inL, false ); |
2629 | inR = inL; | 2629 | inR = inL; |
2630 | inR.setResource( 0 ); | 2630 | inR.setResource( 0 ); |
2631 | remote->insertAddressee( inR, false ); | 2631 | remote->insertAddressee( inR, false ); |
@@ -2655,23 +2655,23 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2655 | 2655 | ||
2656 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) | 2656 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) |
2657 | remote->insertAddressee( addresseeRSync, false ); | 2657 | remote->insertAddressee( addresseeRSync, false ); |
2658 | local->insertAddressee( addresseeLSync, false ); | 2658 | local->insertAddressee( addresseeLSync, false ); |
2659 | QString mes; | 2659 | QString mes; |
2660 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR ); | 2660 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR ); |
2661 | if ( KABPrefs::instance()->mShowSyncSummary ) { | 2661 | if ( syncManager->mShowSyncSummary ) { |
2662 | KMessageBox::information(this, mes, i18n("KA/Pi Synchronization") ); | 2662 | KMessageBox::information(this, mes, i18n("KA/Pi Synchronization") ); |
2663 | } | 2663 | } |
2664 | qDebug( mes ); | 2664 | qDebug( mes ); |
2665 | return syncOK; | 2665 | return syncOK; |
2666 | } | 2666 | } |
2667 | 2667 | ||
2668 | 2668 | ||
2669 | //this is a overwritten callbackmethods from the syncinterface | 2669 | //this is a overwritten callbackmethods from the syncinterface |
2670 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) | 2670 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) |
2671 | { | 2671 | { |
2672 | 2672 | ||
2673 | //pending prepare addresseeview for output | 2673 | //pending prepare addresseeview for output |
2674 | //pending detect, if remote file has REV field. if not switch to external sync | 2674 | //pending detect, if remote file has REV field. if not switch to external sync |
2675 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 2675 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
2676 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 2676 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
2677 | 2677 | ||
@@ -2716,13 +2716,13 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode) | |||
2716 | //QStringList vcards; | 2716 | //QStringList vcards; |
2717 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 2717 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
2718 | // qDebug("Name %s ", (*it).familyName().latin1()); | 2718 | // qDebug("Name %s ", (*it).familyName().latin1()); |
2719 | //} | 2719 | //} |
2720 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); | 2720 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); |
2721 | if ( syncOK ) { | 2721 | if ( syncOK ) { |
2722 | if ( KABPrefs::instance()->mWriteBackFile ) | 2722 | if ( syncManager->mWriteBackFile ) |
2723 | { | 2723 | { |
2724 | if ( external ) | 2724 | if ( external ) |
2725 | abLocal.removeSyncAddressees( !isXML); | 2725 | abLocal.removeSyncAddressees( !isXML); |
2726 | qDebug("Saving remote AB "); | 2726 | qDebug("Saving remote AB "); |
2727 | abLocal.saveAB(); | 2727 | abLocal.saveAB(); |
2728 | if ( isXML ) { | 2728 | if ( isXML ) { |
@@ -2766,15 +2766,15 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) | |||
2766 | bool syncOK = false; | 2766 | bool syncOK = false; |
2767 | if ( abLocal.load() ) { | 2767 | if ( abLocal.load() ) { |
2768 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 2768 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
2769 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2769 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2770 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice ); | 2770 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice ); |
2771 | qDebug("KABCore::syncExternal: why do we acces here KABPrefs and not somehow KSyncProfile? "); | 2771 | qDebug("KABCore::syncExternal: why do we acces here KABPrefs and not somehow KSyncProfile? "); |
2772 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, KABPrefs::instance()->mSyncAlgoPrefs ); | 2772 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
2773 | if ( syncOK ) { | 2773 | if ( syncOK ) { |
2774 | if ( KABPrefs::instance()->mWriteBackFile ) { | 2774 | if ( syncManager->mWriteBackFile ) { |
2775 | abLocal.saveAB(); | 2775 | abLocal.saveAB(); |
2776 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); | 2776 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); |
2777 | } | 2777 | } |
2778 | } | 2778 | } |
2779 | setModified(); | 2779 | setModified(); |
2780 | } | 2780 | } |