author | zautrix <zautrix> | 2004-10-29 09:03:54 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-29 09:03:54 (UTC) |
commit | 6500d6ebb080f1de58fe676aa0a730d47fcf64f5 (patch) (unidiff) | |
tree | 41841e05bf1e6b88e6e55f42011dce5f6bed85b4 /libkdepim | |
parent | 41e3625b8c38ff45e70b59416a519d59a5f4d937 (diff) | |
download | kdepimpi-6500d6ebb080f1de58fe676aa0a730d47fcf64f5.zip kdepimpi-6500d6ebb080f1de58fe676aa0a730d47fcf64f5.tar.gz kdepimpi-6500d6ebb080f1de58fe676aa0a730d47fcf64f5.tar.bz2 |
sync fixes
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 21af295..c12ba1c 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -524,32 +524,33 @@ void KSyncManager::multiSync( bool askforPrefs ) | |||
524 | qApp->processEvents(); | 524 | qApp->processEvents(); |
525 | int num = ringSync() ; | 525 | int num = ringSync() ; |
526 | if ( num > 1 ) | 526 | if ( num > 1 ) |
527 | ringSync(); | 527 | ringSync(); |
528 | setBlockSave(false); | 528 | setBlockSave(false); |
529 | if ( num ) | 529 | if ( num ) |
530 | emit save(); | 530 | emit save(); |
531 | if ( num ) | 531 | if ( num ) |
532 | mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) ); | 532 | mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) ); |
533 | else | 533 | else |
534 | mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!")); | 534 | mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!")); |
535 | return; | 535 | return; |
536 | } | 536 | } |
537 | 537 | ||
538 | int KSyncManager::ringSync() | 538 | int KSyncManager::ringSync() |
539 | { | 539 | { |
540 | |||
540 | int syncedProfiles = 0; | 541 | int syncedProfiles = 0; |
541 | unsigned int i; | 542 | unsigned int i; |
542 | QTime timer; | 543 | QTime timer; |
543 | KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); | 544 | KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); |
544 | QStringList syncProfileNames = mSyncProfileNames; | 545 | QStringList syncProfileNames = mSyncProfileNames; |
545 | KSyncProfile* temp = new KSyncProfile (); | 546 | KSyncProfile* temp = new KSyncProfile (); |
546 | mAskForPreferences = false; | 547 | mAskForPreferences = false; |
547 | for ( i = 0; i < syncProfileNames.count(); ++i ) { | 548 | for ( i = 0; i < syncProfileNames.count(); ++i ) { |
548 | mCurrentSyncProfile = i; | 549 | mCurrentSyncProfile = i; |
549 | temp->setName(syncProfileNames[mCurrentSyncProfile]); | 550 | temp->setName(syncProfileNames[mCurrentSyncProfile]); |
550 | temp->readConfig(&config); | 551 | temp->readConfig(&config); |
551 | 552 | ||
552 | bool includeInRingSync; | 553 | bool includeInRingSync; |
553 | switch(mTargetApp) | 554 | switch(mTargetApp) |
554 | { | 555 | { |
555 | case (KAPI): | 556 | case (KAPI): |
@@ -557,33 +558,34 @@ int KSyncManager::ringSync() | |||
557 | break; | 558 | break; |
558 | case (KOPI): | 559 | case (KOPI): |
559 | includeInRingSync = temp->getIncludeInRingSync(); | 560 | includeInRingSync = temp->getIncludeInRingSync(); |
560 | break; | 561 | break; |
561 | case (PWMPI): | 562 | case (PWMPI): |
562 | includeInRingSync = temp->getIncludeInRingSyncPWM(); | 563 | includeInRingSync = temp->getIncludeInRingSyncPWM(); |
563 | break; | 564 | break; |
564 | default: | 565 | default: |
565 | qDebug("KSyncManager::ringSync: invalid apptype selected"); | 566 | qDebug("KSyncManager::ringSync: invalid apptype selected"); |
566 | break; | 567 | break; |
567 | 568 | ||
568 | } | 569 | } |
569 | 570 | ||
570 | 571 | ||
571 | if ( includeInRingSync && ( i < 1 || i > 2 )) { | 572 | if ( includeInRingSync && ( i < 1 || i > 2 )) { |
572 | mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); | 573 | mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); |
573 | ++syncedProfiles; | 574 | ++syncedProfiles; |
575 | mSyncWithDesktop = false; | ||
574 | // mAskForPreferences = temp->getAskForPreferences(); | 576 | // mAskForPreferences = temp->getAskForPreferences(); |
575 | mWriteBackFile = temp->getWriteBackFile(); | 577 | mWriteBackFile = temp->getWriteBackFile(); |
576 | mWriteBackExistingOnly = temp->getWriteBackExisting(); | 578 | mWriteBackExistingOnly = temp->getWriteBackExisting(); |
577 | mIsKapiFile = temp->getIsKapiFile(); | 579 | mIsKapiFile = temp->getIsKapiFile(); |
578 | mWriteBackInFuture = 0; | 580 | mWriteBackInFuture = 0; |
579 | if ( temp->getWriteBackFuture() ) | 581 | if ( temp->getWriteBackFuture() ) |
580 | mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); | 582 | mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); |
581 | mShowSyncSummary = false; | 583 | mShowSyncSummary = false; |
582 | mCurrentSyncDevice = syncProfileNames[i] ; | 584 | mCurrentSyncDevice = syncProfileNames[i] ; |
583 | mCurrentSyncName = mLocalMachineName; | 585 | mCurrentSyncName = mLocalMachineName; |
584 | if ( i == 0 ) { | 586 | if ( i == 0 ) { |
585 | mIsKapiFile = false; | 587 | mIsKapiFile = false; |
586 | #ifdef DESKTOP_VERSION | 588 | #ifdef DESKTOP_VERSION |
587 | syncKDE(); | 589 | syncKDE(); |
588 | #else | 590 | #else |
589 | syncSharp(); | 591 | syncSharp(); |