author | zautrix <zautrix> | 2004-10-07 17:51:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-07 17:51:17 (UTC) |
commit | 1f1538e5707b59bfcff2014901f29a65589229e3 (patch) (unidiff) | |
tree | 0d91a303524e6ac9f7c954f01a0e1d09d0e305e7 /kaddressbook | |
parent | bb8293c794d82a57bc93af85ccd89b601356d577 (diff) | |
download | kdepimpi-1f1538e5707b59bfcff2014901f29a65589229e3.zip kdepimpi-1f1538e5707b59bfcff2014901f29a65589229e3.tar.gz kdepimpi-1f1538e5707b59bfcff2014901f29a65589229e3.tar.bz2 |
many cleanups
-rw-r--r-- | kaddressbook/kabcore.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 12502b0..c5406bf 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2839,49 +2839,48 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) | |||
2839 | bool syncOK = false; | 2839 | bool syncOK = false; |
2840 | if ( abLocal.load() ) { | 2840 | if ( abLocal.load() ) { |
2841 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 2841 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
2842 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2842 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2843 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice ); | 2843 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice ); |
2844 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 2844 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
2845 | if ( syncOK ) { | 2845 | if ( syncOK ) { |
2846 | if ( syncManager->mWriteBackFile ) { | 2846 | if ( syncManager->mWriteBackFile ) { |
2847 | abLocal.saveAB(); | 2847 | abLocal.saveAB(); |
2848 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); | 2848 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); |
2849 | } | 2849 | } |
2850 | } | 2850 | } |
2851 | setModified(); | 2851 | setModified(); |
2852 | } | 2852 | } |
2853 | if ( syncOK ) | 2853 | if ( syncOK ) |
2854 | mViewManager->refreshView(); | 2854 | mViewManager->refreshView(); |
2855 | return syncOK; | 2855 | return syncOK; |
2856 | 2856 | ||
2857 | } | 2857 | } |
2858 | 2858 | ||
2859 | void KABCore::getFile( bool success ) | 2859 | void KABCore::getFile( bool success ) |
2860 | { | 2860 | { |
2861 | QTimer::singleShot( 15000, this , SLOT ( setCaptionBack())); | 2861 | QTimer::singleShot( 15000, this , SLOT ( setCaptionBack())); |
2862 | if ( ! success ) { | 2862 | if ( ! success ) { |
2863 | setCaption( i18n("Error receiving file. Nothing changed!") ); | 2863 | setCaption( i18n("Error receiving file. Nothing changed!") ); |
2864 | return; | 2864 | return; |
2865 | } | 2865 | } |
2866 | mAddressBook->importFromFile( sentSyncFile() ); | 2866 | mAddressBook->importFromFile( sentSyncFile() ); |
2867 | topLevelWidget()->setCaption( i18n("Pi-Sync successful!") ); | 2867 | topLevelWidget()->setCaption( i18n("Pi-Sync successful!") ); |
2868 | mViewManager->refreshView(); | 2868 | mViewManager->refreshView(); |
2869 | } | 2869 | } |
2870 | void KABCore::syncFileRequest() | 2870 | void KABCore::syncFileRequest() |
2871 | { | 2871 | { |
2872 | mAddressBook->export2File( sentSyncFile() ); | 2872 | mAddressBook->export2File( sentSyncFile() ); |
2873 | } | 2873 | } |
2874 | QString KABCore::sentSyncFile() | 2874 | QString KABCore::sentSyncFile() |
2875 | { | 2875 | { |
2876 | #ifdef _WIN32_ | 2876 | #ifdef _WIN32_ |
2877 | return locateLocal( "tmp", "copysyncab.vcf" ); | 2877 | return locateLocal( "tmp", "copysyncab.vcf" ); |
2878 | #else | 2878 | #else |
2879 | return QString( "/tmp/copysyncab.vcf" ); | 2879 | return QString( "/tmp/copysyncab.vcf" ); |
2880 | #endif | 2880 | #endif |
2881 | } | 2881 | } |
2882 | 2882 | ||
2883 | void KABCore::setCaptionBack() | 2883 | void KABCore::setCaptionBack() |
2884 | { | 2884 | { |
2885 | topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); | 2885 | topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); |
2886 | } | 2886 | } |
2887 | |||