summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp31
1 files changed, 13 insertions, 18 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index d9eb391..83fede4 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1680,12 +1680,16 @@ void KABCore::initGUI()
#endif //KAB_NOSPLITTER
*/
syncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)this, KSyncManager::KAPI, KABPrefs::instance(), syncMenu);
syncManager->setBlockSave(false);
+ connect(syncManager , SIGNAL( save() ), this, SLOT( save() ) );
+ connect(syncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
+ syncManager->setDefaultFileName(locateLocal( "apps","kabc/std.vcf") );
+ //connect(syncManager , SIGNAL( ), this, SLOT( ) );
#endif //KAB_EMBEDDED
initActions();
#ifdef KAB_EMBEDDED
addActionsManually();
@@ -2834,13 +2838,12 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource)
AddressBook abLocal( resource,"syncContact");
bool syncOK = false;
if ( abLocal.load() ) {
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, syncManager->mSyncAlgoPrefs );
if ( syncOK ) {
if ( syncManager->mWriteBackFile ) {
abLocal.saveAB();
abLocal.postExternSync( mAddressBook,mCurrentSyncDevice );
}
@@ -2850,27 +2853,19 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource)
if ( syncOK )
mViewManager->refreshView();
return syncOK;
}
-//called by the syncmanager to indicate that the work has to marked as dirty.
-void KABCore::sync_setModified()
+void KABCore::getFile( bool success )
{
- setModified();
-}
-
-//called by the syncmanager to ask if the dirty flag is set.
-bool KABCore::sync_isModified()
-{
- return mModified;
-}
-
-
-//called by the syncmanager to indicate that the work has to be saved.
-void KABCore::sync_save()
-{
- save();
+ if ( ! success ) {
+ setCaption( i18n("Error receiving file. Nothing changed!") );
+ return;
+ }
+ //mView->watchSavedFile();
+ //mView->openCalendar( defaultFileName() );
+ // pending: reload received file!
+ setCaption( i18n("Pi-Sync successful!") );
}
-