author | zautrix <zautrix> | 2004-10-07 11:44:35 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-07 11:44:35 (UTC) |
commit | 43c82cc5393522d2c34f34a4339cb6a1d1c6c555 (patch) (unidiff) | |
tree | 49916cfb6f12c846fa52f9697f9b0285c2902772 /kaddressbook | |
parent | f0e8b8f36bccda952fa662e4faf2d58fcee67262 (diff) | |
download | kdepimpi-43c82cc5393522d2c34f34a4339cb6a1d1c6c555.zip kdepimpi-43c82cc5393522d2c34f34a4339cb6a1d1c6c555.tar.gz kdepimpi-43c82cc5393522d2c34f34a4339cb6a1d1c6c555.tar.bz2 |
sync fixes
-rw-r--r-- | kaddressbook/kabcore.cpp | 12 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 1 |
2 files changed, 10 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 | |||
@@ -2855,27 +2855,33 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) | |||
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 | qDebug("KABCore::getFile "); | ||
2862 | QTimer::singleShot( 15000, this , SLOT ( setCaptionBack())); | ||
2861 | if ( ! success ) { | 2863 | if ( ! success ) { |
2862 | setCaption( i18n("Error receiving file. Nothing changed!") ); | 2864 | setCaption( i18n("Error receiving file. Nothing changed!") ); |
2863 | return; | 2865 | return; |
2864 | } | 2866 | } |
2865 | mAddressBook->importFromFile( sentSyncFile() ); | 2867 | mAddressBook->importFromFile( sentSyncFile() ); |
2866 | setCaption( i18n("Pi-Sync successful!") ); | 2868 | topLevelWidget()->setCaption( i18n("Pi-Sync successful!") ); |
2867 | } | 2869 | } |
2868 | void KABCore::syncFileRequest() | 2870 | void KABCore::syncFileRequest() |
2869 | { | 2871 | { |
2870 | mAddressBook->export2File( sentSyncFile() ); | 2872 | mAddressBook->export2File( sentSyncFile() ); |
2871 | } | 2873 | } |
2872 | QString KABCore::sentSyncFile() | 2874 | QString KABCore::sentSyncFile() |
2873 | { | 2875 | { |
2874 | #ifdef _WIN32_ | 2876 | #ifdef _WIN32_ |
2875 | return locateLocal( "tmp", "syncab.ics" ); | 2877 | return locateLocal( "tmp", "copysyncab.vcf" ); |
2876 | #else | 2878 | #else |
2877 | return QString( "/tmp/kapitempfile.vcf" ); | 2879 | return QString( "/tmp/copysyncab.vcf" ); |
2878 | #endif | 2880 | #endif |
2879 | } | 2881 | } |
2880 | 2882 | ||
2883 | void KABCore::setCaptionBack() | ||
2884 | { | ||
2885 | topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); | ||
2886 | } | ||
2881 | 2887 | ||
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index 987369d..c628399 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -346,12 +346,13 @@ class KABCore : public QWidget, public KSyncInterface | |||
346 | void syncFileRequest(); | 346 | void syncFileRequest(); |
347 | void setDetailsVisible( bool visible ); | 347 | void setDetailsVisible( bool visible ); |
348 | void setDetailsToState(); | 348 | void setDetailsToState(); |
349 | // void slotSyncMenu( int ); | 349 | // void slotSyncMenu( int ); |
350 | private slots: | 350 | private slots: |
351 | void setJumpButtonBarVisible( bool visible ); | 351 | void setJumpButtonBarVisible( bool visible ); |
352 | void setCaptionBack(); | ||
352 | void importFromOL(); | 353 | void importFromOL(); |
353 | void extensionModified( const KABC::Addressee::List &list ); | 354 | void extensionModified( const KABC::Addressee::List &list ); |
354 | void extensionChanged( int id ); | 355 | void extensionChanged( int id ); |
355 | void clipboardDataChanged(); | 356 | void clipboardDataChanged(); |
356 | void updateActionMenu(); | 357 | void updateActionMenu(); |
357 | void configureKeyBindings(); | 358 | void configureKeyBindings(); |