summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 1074a62..c4382d6 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -379,24 +379,26 @@ void KABCore::disableBR(bool b)
379 if ( mBRdisabled ) { 379 if ( mBRdisabled ) {
380 mBRdisabled = false; 380 mBRdisabled = false;
381 //toggleBeamReceive( ); 381 //toggleBeamReceive( );
382 } 382 }
383 } 383 }
384#endif 384#endif
385 385
386} 386}
387void KABCore::recieve( QString fn ) 387void KABCore::recieve( QString fn )
388{ 388{
389 //qDebug("KABCore::recieve "); 389 //qDebug("KABCore::recieve ");
390 int count = mAddressBook->importFromFile( fn, true ); 390 int count = mAddressBook->importFromFile( fn, true );
391 if ( count )
392 setModified( true );
391 mViewManager->refreshView(); 393 mViewManager->refreshView();
392 message(i18n("%1 contact(s) received!").arg( count )); 394 message(i18n("%1 contact(s) received!").arg( count ));
393 topLevelWidget()->showMaximized(); 395 topLevelWidget()->showMaximized();
394 topLevelWidget()->raise(); 396 topLevelWidget()->raise();
395} 397}
396void KABCore::restoreSettings() 398void KABCore::restoreSettings()
397{ 399{
398 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; 400 mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce;
399 401
400 bool state; 402 bool state;
401 403
402 if (mMultipleViewsAtOnce) 404 if (mMultipleViewsAtOnce)
@@ -2870,25 +2872,27 @@ bool KABCore::syncPhone()
2870 setModified(); 2872 setModified();
2871 } 2873 }
2872 if ( syncOK ) 2874 if ( syncOK )
2873 mViewManager->refreshView(); 2875 mViewManager->refreshView();
2874 return syncOK; 2876 return syncOK;
2875} 2877}
2876void KABCore::getFile( bool success ) 2878void KABCore::getFile( bool success )
2877{ 2879{
2878 if ( ! success ) { 2880 if ( ! success ) {
2879 message( i18n("Error receiving file. Nothing changed!") ); 2881 message( i18n("Error receiving file. Nothing changed!") );
2880 return; 2882 return;
2881 } 2883 }
2882 mAddressBook->importFromFile( sentSyncFile() , false, true ); 2884 int count = mAddressBook->importFromFile( sentSyncFile() , false, true );
2885 if ( count )
2886 setModified( true );
2883 message( i18n("Pi-Sync successful!") ); 2887 message( i18n("Pi-Sync successful!") );
2884 mViewManager->refreshView(); 2888 mViewManager->refreshView();
2885} 2889}
2886void KABCore::syncFileRequest() 2890void KABCore::syncFileRequest()
2887{ 2891{
2888 mAddressBook->export2File( sentSyncFile() ); 2892 mAddressBook->export2File( sentSyncFile() );
2889} 2893}
2890QString KABCore::sentSyncFile() 2894QString KABCore::sentSyncFile()
2891{ 2895{
2892#ifdef DESKTOP_VERSION 2896#ifdef DESKTOP_VERSION
2893 return locateLocal( "tmp", "copysyncab.vcf" ); 2897 return locateLocal( "tmp", "copysyncab.vcf" );
2894#else 2898#else