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 | |||
@@ -2845,37 +2845,43 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) | |||
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 | 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 | |||
@@ -336,32 +336,33 @@ class KABCore : public QWidget, public KSyncInterface | |||
336 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid); | 336 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid); |
337 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); | 337 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); |
338 | void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid); | 338 | void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid); |
339 | 339 | ||
340 | 340 | ||
341 | signals: | 341 | signals: |
342 | void contactSelected( const QString &name ); | 342 | void contactSelected( const QString &name ); |
343 | void contactSelected( const QPixmap &pixmap ); | 343 | void contactSelected( const QPixmap &pixmap ); |
344 | public slots: | 344 | public slots: |
345 | void getFile( bool success ); | 345 | void getFile( bool success ); |
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(); |
358 | void removeVoice(); | 359 | void removeVoice(); |
359 | #ifdef KAB_EMBEDDED | 360 | #ifdef KAB_EMBEDDED |
360 | void configureResources(); | 361 | void configureResources(); |
361 | #endif //KAB_EMBEDDED | 362 | #endif //KAB_EMBEDDED |
362 | 363 | ||
363 | void slotEditorDestroyed( const QString &uid ); | 364 | void slotEditorDestroyed( const QString &uid ); |
364 | void configurationChanged(); | 365 | void configurationChanged(); |
365 | void addressBookChanged(); | 366 | void addressBookChanged(); |
366 | 367 | ||
367 | private: | 368 | private: |