summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncmanager.cpp
Unidiff
Diffstat (limited to 'libkdepim/ksyncmanager.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 33b4a65..6c1f444 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -231,48 +231,52 @@ void KSyncManager::slotSyncMenu( int action )
231 mCurrentSyncName = mLocalMachineName ; 231 mCurrentSyncName = mLocalMachineName ;
232 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); 232 KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
233 KSyncProfile* temp = new KSyncProfile (); 233 KSyncProfile* temp = new KSyncProfile ();
234 temp->setName(mSyncProfileNames[mCurrentSyncProfile]); 234 temp->setName(mSyncProfileNames[mCurrentSyncProfile]);
235 temp->readConfig(&config); 235 temp->readConfig(&config);
236 if (silent) { 236 if (silent) {
237 mAskForPreferences = false; 237 mAskForPreferences = false;
238 mShowSyncSummary = false; 238 mShowSyncSummary = false;
239 mWriteBackFile = true; 239 mWriteBackFile = true;
240 mSyncAlgoPrefs = 2;// take newest 240 mSyncAlgoPrefs = 2;// take newest
241 } 241 }
242 else { 242 else {
243 mAskForPreferences = temp->getAskForPreferences(); 243 mAskForPreferences = temp->getAskForPreferences();
244 mShowSyncSummary = temp->getShowSummaryAfterSync(); 244 mShowSyncSummary = temp->getShowSummaryAfterSync();
245 mWriteBackFile = temp->getWriteBackFile(); 245 mWriteBackFile = temp->getWriteBackFile();
246 mSyncAlgoPrefs = temp->getSyncPrefs(); 246 mSyncAlgoPrefs = temp->getSyncPrefs();
247 } 247 }
248 mWriteBackExistingOnly = temp->getWriteBackExisting(); 248 mWriteBackExistingOnly = temp->getWriteBackExisting();
249 mIsKapiFile = temp->getIsKapiFile(); 249 mIsKapiFile = temp->getIsKapiFile();
250 mWriteBackInFuture = 0; 250 mWriteBackInFuture = 0;
251 if ( temp->getWriteBackFuture() ) { 251 if ( temp->getWriteBackFuture() ) {
252 mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); 252 mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
253 mWriteBackInPast = temp->getWriteBackPastWeeks( ); 253 mWriteBackInPast = temp->getWriteBackPastWeeks( );
254 } 254 }
255 mFilterInCal = temp->getFilterInCal();
256 mFilterOutCal = temp->getFilterOutCal();
257 mFilterInAB = temp->getFilterInAB();
258 mFilterOutAB = temp->getFilterOutAB();
255 259
256 if ( action == 1000 ) { 260 if ( action == 1000 ) {
257 mIsKapiFile = false; 261 mIsKapiFile = false;
258#ifdef DESKTOP_VERSION 262#ifdef DESKTOP_VERSION
259 syncKDE(); 263 syncKDE();
260#else 264#else
261 syncSharp(); 265 syncSharp();
262#endif 266#endif
263 267
264 } else if ( action == 1001 ) { 268 } else if ( action == 1001 ) {
265 syncLocalFile(); 269 syncLocalFile();
266 270
267 } else if ( action == 1002 ) { 271 } else if ( action == 1002 ) {
268 mWriteBackFile = false; 272 mWriteBackFile = false;
269 mAskForPreferences = false; 273 mAskForPreferences = false;
270 mShowSyncSummary = false; 274 mShowSyncSummary = false;
271 mSyncAlgoPrefs = 3; 275 mSyncAlgoPrefs = 3;
272 quickSyncLocalFile(); 276 quickSyncLocalFile();
273 277
274 } else if ( action >= 1003 ) { 278 } else if ( action >= 1003 ) {
275 if ( temp->getIsLocalFileSync() ) { 279 if ( temp->getIsLocalFileSync() ) {
276 switch(mTargetApp) 280 switch(mTargetApp)
277 { 281 {
278 case (KAPI): 282 case (KAPI):
@@ -563,48 +567,52 @@ int KSyncManager::ringSync()
563 break; 567 break;
564 case (PWMPI): 568 case (PWMPI):
565 includeInRingSync = temp->getIncludeInRingSyncPWM(); 569 includeInRingSync = temp->getIncludeInRingSyncPWM();
566 break; 570 break;
567 default: 571 default:
568 qDebug("KSyncManager::ringSync: invalid apptype selected"); 572 qDebug("KSyncManager::ringSync: invalid apptype selected");
569 break; 573 break;
570 574
571 } 575 }
572 576
573 577
574 if ( includeInRingSync && ( i < 1 || i > 2 )) { 578 if ( includeInRingSync && ( i < 1 || i > 2 )) {
575 mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... ")); 579 mParent->topLevelWidget()->setCaption(i18n("Profile ")+syncProfileNames[mCurrentSyncProfile]+ i18n(" is synced ... "));
576 ++syncedProfiles; 580 ++syncedProfiles;
577 mSyncWithDesktop = false; 581 mSyncWithDesktop = false;
578 // mAskForPreferences = temp->getAskForPreferences(); 582 // mAskForPreferences = temp->getAskForPreferences();
579 mWriteBackFile = temp->getWriteBackFile(); 583 mWriteBackFile = temp->getWriteBackFile();
580 mWriteBackExistingOnly = temp->getWriteBackExisting(); 584 mWriteBackExistingOnly = temp->getWriteBackExisting();
581 mIsKapiFile = temp->getIsKapiFile(); 585 mIsKapiFile = temp->getIsKapiFile();
582 mWriteBackInFuture = 0; 586 mWriteBackInFuture = 0;
583 if ( temp->getWriteBackFuture() ) { 587 if ( temp->getWriteBackFuture() ) {
584 mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); 588 mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
585 mWriteBackInPast = temp->getWriteBackPastWeeks( ); 589 mWriteBackInPast = temp->getWriteBackPastWeeks( );
586 } 590 }
591 mFilterInCal = temp->getFilterInCal();
592 mFilterOutCal = temp->getFilterOutCal();
593 mFilterInAB = temp->getFilterInAB();
594 mFilterOutAB = temp->getFilterOutAB();
587 mShowSyncSummary = false; 595 mShowSyncSummary = false;
588 mCurrentSyncDevice = syncProfileNames[i] ; 596 mCurrentSyncDevice = syncProfileNames[i] ;
589 mCurrentSyncName = mLocalMachineName; 597 mCurrentSyncName = mLocalMachineName;
590 if ( i == 0 ) { 598 if ( i == 0 ) {
591 mIsKapiFile = false; 599 mIsKapiFile = false;
592#ifdef DESKTOP_VERSION 600#ifdef DESKTOP_VERSION
593 syncKDE(); 601 syncKDE();
594#else 602#else
595 syncSharp(); 603 syncSharp();
596#endif 604#endif
597 } else { 605 } else {
598 if ( temp->getIsLocalFileSync() ) { 606 if ( temp->getIsLocalFileSync() ) {
599 switch(mTargetApp) 607 switch(mTargetApp)
600 { 608 {
601 case (KAPI): 609 case (KAPI):
602 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) ) 610 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) )
603 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB(); 611 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB();
604 break; 612 break;
605 case (KOPI): 613 case (KOPI):
606 if ( syncWithFile( temp->getRemoteFileName( ), false ) ) 614 if ( syncWithFile( temp->getRemoteFileName( ), false ) )
607 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName(); 615 mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName();
608 break; 616 break;
609 case (PWMPI): 617 case (PWMPI):
610 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) ) 618 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) )