summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2004-10-06 20:51:01 (UTC)
committer zautrix <zautrix>2004-10-06 20:51:01 (UTC)
commit0afcfa29ace7bc5e42a11fae44301e1e8230a376 (patch) (side-by-side diff)
treeb54f85b19ace24219be1b845469444089cacc94f /kaddressbook
parented4675de07d947f55d2672c721599e3a0af1e24b (diff)
downloadkdepimpi-0afcfa29ace7bc5e42a11fae44301e1e8230a376.zip
kdepimpi-0afcfa29ace7bc5e42a11fae44301e1e8230a376.tar.gz
kdepimpi-0afcfa29ace7bc5e42a11fae44301e1e8230a376.tar.bz2
some prefs cleanups
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp14
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
@@ -2604,9 +2604,9 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
// pending checkExternSyncAddressee(addresseeLSyncSharp, inL);
local->removeAddressee( inL );
++deletedAddresseeL;
} else {
- if ( ! KABPrefs::instance()->mWriteBackExistingOnly ) {
+ if ( ! syncManager->mWriteBackExistingOnly ) {
inL.removeID(mCurrentSyncDevice );
++addedAddresseeR;
inL.setRevision( modifiedCalendar );
local->insertAddressee( inL, false );
@@ -2621,9 +2621,9 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
// pending checkExternSyncAddressee(addresseeLSyncSharp, inL);
local->removeAddressee( inL );
++deletedAddresseeL;
} else {
- if ( ! KABPrefs::instance()->mWriteBackExistingOnly ) {
+ if ( ! syncManager->mWriteBackExistingOnly ) {
++addedAddresseeR;
inL.setRevision( modifiedCalendar );
local->insertAddressee( inL, false );
inR = inL;
@@ -2657,9 +2657,9 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
remote->insertAddressee( addresseeRSync, false );
local->insertAddressee( addresseeLSync, false );
QString mes;
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 );
- if ( KABPrefs::instance()->mShowSyncSummary ) {
+ if ( syncManager->mShowSyncSummary ) {
KMessageBox::information(this, mes, i18n("KA/Pi Synchronization") );
}
qDebug( mes );
return syncOK;
@@ -2667,9 +2667,9 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
//this is a overwritten callbackmethods from the syncinterface
bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
-{
+{
//pending prepare addresseeview for output
//pending detect, if remote file has REV field. if not switch to external sync
mGlobalSyncMode = SYNC_MODE_NORMAL;
@@ -2718,9 +2718,9 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
// qDebug("Name %s ", (*it).familyName().latin1());
//}
syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode );
if ( syncOK ) {
- if ( KABPrefs::instance()->mWriteBackFile )
+ if ( syncManager->mWriteBackFile )
{
if ( external )
abLocal.removeSyncAddressees( !isXML);
qDebug("Saving remote AB ");
@@ -2768,11 +2768,11 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource)
qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1());
mGlobalSyncMode = SYNC_MODE_EXTERNAL;
abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice );
qDebug("KABCore::syncExternal: why do we acces here KABPrefs and not somehow KSyncProfile? ");
- syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, KABPrefs::instance()->mSyncAlgoPrefs );
+ syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
if ( syncOK ) {
- if ( KABPrefs::instance()->mWriteBackFile ) {
+ if ( syncManager->mWriteBackFile ) {
abLocal.saveAB();
abLocal.postExternSync( mAddressBook,mCurrentSyncDevice );
}
}