summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 6404410..fa80f5c 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2829,53 +2829,59 @@ bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
#endif
}
//this is a overwritten callbackmethods from the syncinterface
bool KABCore::syncExternal(KSyncManager* manager, QString resource)
{
QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
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 );
syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
if ( syncOK ) {
if ( syncManager->mWriteBackFile ) {
abLocal.saveAB();
abLocal.postExternSync( mAddressBook,mCurrentSyncDevice );
}
}
setModified();
}
if ( syncOK )
mViewManager->refreshView();
return syncOK;
}
void KABCore::getFile( bool success )
{
+ qDebug("KABCore::getFile ");
+ QTimer::singleShot( 15000, this , SLOT ( setCaptionBack()));
if ( ! success ) {
setCaption( i18n("Error receiving file. Nothing changed!") );
return;
}
mAddressBook->importFromFile( sentSyncFile() );
- setCaption( i18n("Pi-Sync successful!") );
+ topLevelWidget()->setCaption( i18n("Pi-Sync successful!") );
}
void KABCore::syncFileRequest()
{
mAddressBook->export2File( sentSyncFile() );
}
QString KABCore::sentSyncFile()
{
#ifdef _WIN32_
- return locateLocal( "tmp", "syncab.ics" );
+ return locateLocal( "tmp", "copysyncab.vcf" );
#else
- return QString( "/tmp/kapitempfile.vcf" );
+ return QString( "/tmp/copysyncab.vcf" );
#endif
}
+void KABCore::setCaptionBack()
+{
+ topLevelWidget()->setCaption( i18n("KAddressbook/Pi") );
+}