author | zautrix <zautrix> | 2005-12-02 08:29:35 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-12-02 08:29:35 (UTC) |
commit | 2bd8aff44e90b6d58e2037771db8b38846addb3e (patch) (unidiff) | |
tree | 63b679b438f2ad0daa4789de5e70a9f0eb5a8c9f /libkdepim | |
parent | 467b2e451511d201bfe9bef946728e5488d38e0a (diff) | |
download | kdepimpi-2bd8aff44e90b6d58e2037771db8b38846addb3e.zip kdepimpi-2bd8aff44e90b6d58e2037771db8b38846addb3e.tar.gz kdepimpi-2bd8aff44e90b6d58e2037771db8b38846addb3e.tar.bz2 |
more sync
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 15 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 1 |
2 files changed, 10 insertions, 6 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 4d859ce..f80c2a6 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -313,22 +313,24 @@ void KSyncManager::slotSyncMenu( int action ) | |||
313 | if ( temp->getIsPhoneSync() ) { | 313 | if ( temp->getIsPhoneSync() ) { |
314 | mPhoneDevice = temp->getPhoneDevice( ) ; | 314 | mPhoneDevice = temp->getPhoneDevice( ) ; |
315 | mPhoneConnection = temp->getPhoneConnection( ); | 315 | mPhoneConnection = temp->getPhoneConnection( ); |
316 | mPhoneModel = temp->getPhoneModel( ); | 316 | mPhoneModel = temp->getPhoneModel( ); |
317 | syncPhone(); | 317 | syncPhone(); |
318 | } else if ( temp->getIsPiSync()|| temp->getIsPiSyncSpec()) { | 318 | } else if ( temp->getIsPiSync()|| temp->getIsPiSyncSpec()) { |
319 | mSpecificResources.clear(); | 319 | mSpecificResources.clear(); |
320 | if ( mTargetApp == KAPI ) { | 320 | if ( mTargetApp == KAPI ) { |
321 | if ( temp->getIsPiSyncSpec() ) | ||
322 | mSpecificResources = QStringList::split( ":", temp->getResSpecKapi(),true ); | ||
321 | mPassWordPiSync = temp->getRemotePwAB(); | 323 | mPassWordPiSync = temp->getRemotePwAB(); |
322 | mActiveSyncPort = temp->getRemotePortAB(); | 324 | mActiveSyncPort = temp->getRemotePortAB(); |
323 | mActiveSyncIP = temp->getRemoteIPAB(); | 325 | mActiveSyncIP = temp->getRemoteIPAB(); |
324 | } else if ( mTargetApp == KOPI ) { | 326 | } else if ( mTargetApp == KOPI ) { |
325 | if ( temp->getIsPiSyncSpec() ) | 327 | if ( temp->getIsPiSyncSpec() ) |
326 | mSpecificResources = QStringList::split( ":", temp->getResSpecKopi(),true ); | 328 | mSpecificResources = QStringList::split( ":", temp->getResSpecKopi(),true ); |
327 | mPassWordPiSync = temp->getRemotePw(); | 329 | mPassWordPiSync = temp->getRemotePw(); |
328 | mActiveSyncPort = temp->getRemotePort(); | 330 | mActiveSyncPort = temp->getRemotePort(); |
329 | mActiveSyncIP = temp->getRemoteIP(); | 331 | mActiveSyncIP = temp->getRemoteIP(); |
330 | } else { | 332 | } else { |
331 | mPassWordPiSync = temp->getRemotePwPWM(); | 333 | mPassWordPiSync = temp->getRemotePwPWM(); |
332 | mActiveSyncPort = temp->getRemotePortPWM(); | 334 | mActiveSyncPort = temp->getRemotePortPWM(); |
333 | mActiveSyncIP = temp->getRemoteIPPWM(); | 335 | mActiveSyncIP = temp->getRemoteIPPWM(); |
334 | } | 336 | } |
@@ -655,21 +657,24 @@ int KSyncManager::ringSync() | |||
655 | if ( temp->getIsPhoneSync() ) { | 657 | if ( temp->getIsPhoneSync() ) { |
656 | mPhoneDevice = temp->getPhoneDevice( ) ; | 658 | mPhoneDevice = temp->getPhoneDevice( ) ; |
657 | mPhoneConnection = temp->getPhoneConnection( ); | 659 | mPhoneConnection = temp->getPhoneConnection( ); |
658 | mPhoneModel = temp->getPhoneModel( ); | 660 | mPhoneModel = temp->getPhoneModel( ); |
659 | syncPhone(); | 661 | syncPhone(); |
660 | } else if ( temp->getIsPiSync() || temp->getIsPiSyncSpec()) { | 662 | } else if ( temp->getIsPiSync() || temp->getIsPiSyncSpec()) { |
661 | mSpecificResources.clear(); | 663 | mSpecificResources.clear(); |
662 | if ( mTargetApp == KAPI ) { | 664 | if ( mTargetApp == KAPI ) { |
665 | if ( temp->getIsPiSyncSpec() ) | ||
666 | mSpecificResources = QStringList::split( ":", temp->getResSpecKapi(),true ); | ||
663 | mPassWordPiSync = temp->getRemotePwAB(); | 667 | mPassWordPiSync = temp->getRemotePwAB(); |
664 | mActiveSyncPort = temp->getRemotePortAB(); | 668 | mActiveSyncPort = temp->getRemotePortAB(); |
665 | mActiveSyncIP = temp->getRemoteIPAB(); | 669 | mActiveSyncIP = temp->getRemoteIPAB(); |
666 | } else if ( mTargetApp == KOPI ) { | 670 | } else if ( mTargetApp == KOPI ) { |
667 | mSpecificResources = QStringList::split( ":", temp->getResSpecKopi(),true ); | 671 | if ( temp->getIsPiSyncSpec() ) |
672 | mSpecificResources = QStringList::split( ":", temp->getResSpecKopi(),true ); | ||
668 | mPassWordPiSync = temp->getRemotePw(); | 673 | mPassWordPiSync = temp->getRemotePw(); |
669 | mActiveSyncPort = temp->getRemotePort(); | 674 | mActiveSyncPort = temp->getRemotePort(); |
670 | mActiveSyncIP = temp->getRemoteIP(); | 675 | mActiveSyncIP = temp->getRemoteIP(); |
671 | } else { | 676 | } else { |
672 | mPassWordPiSync = temp->getRemotePwPWM(); | 677 | mPassWordPiSync = temp->getRemotePwPWM(); |
673 | mActiveSyncPort = temp->getRemotePortPWM(); | 678 | mActiveSyncPort = temp->getRemotePortPWM(); |
674 | mActiveSyncIP = temp->getRemoteIPPWM(); | 679 | mActiveSyncIP = temp->getRemoteIPPWM(); |
675 | } | 680 | } |
@@ -1163,20 +1168,20 @@ void KSyncManager::syncPi() | |||
1163 | connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) ); | 1168 | connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) ); |
1164 | commandSocket->readFile( syncFileName() ); | 1169 | commandSocket->readFile( syncFileName() ); |
1165 | mParent->topLevelWidget()->setCaption( i18n("Syncing %1 <-> %2").arg( mCurrentResourceLocal ).arg( mCurrentResourceRemote ) ); | 1170 | mParent->topLevelWidget()->setCaption( i18n("Syncing %1 <-> %2").arg( mCurrentResourceLocal ).arg( mCurrentResourceRemote ) ); |
1166 | while ( !mPisyncFinished ) { | 1171 | while ( !mPisyncFinished ) { |
1167 | //qDebug("waiting "); | 1172 | //qDebug("waiting "); |
1168 | qApp->processEvents(); | 1173 | qApp->processEvents(); |
1169 | } | 1174 | } |
1170 | if ( startLocal+1 < mSpecificResources.count()/2 ) { | 1175 | if ( startLocal+1 < mSpecificResources.count()/2 ) { |
1171 | mParent->topLevelWidget()->setCaption( i18n("Waiting 2 secs before syncing next resource...") ); | 1176 | mParent->topLevelWidget()->setCaption( i18n("Waiting a second before syncing next resource...") ); |
1172 | QTime timer; | 1177 | QTime timer; |
1173 | timer.start(); | 1178 | timer.start(); |
1174 | while ( timer.elapsed () < 2000 ) { | 1179 | while ( timer.elapsed () < 1000 ) { |
1175 | qApp->processEvents(); | 1180 | qApp->processEvents(); |
1176 | } | 1181 | } |
1177 | } | 1182 | } |
1178 | } | 1183 | } |
1179 | ++startRemote; | 1184 | ++startRemote; |
1180 | ++startLocal; | 1185 | ++startLocal; |
1181 | mAskForPreferences = false; | 1186 | mAskForPreferences = false; |
1182 | } | 1187 | } |
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 6f46d19..2b87298 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp | |||
@@ -498,17 +498,16 @@ void KSyncPrefsDialog::chooseFileAB() | |||
498 | if ( fn == "" ) | 498 | if ( fn == "" ) |
499 | return; | 499 | return; |
500 | mRemoteFileAB->setText( fn ); | 500 | mRemoteFileAB->setText( fn ); |
501 | } | 501 | } |
502 | 502 | ||
503 | void KSyncPrefsDialog::chooseFilePWM() | 503 | void KSyncPrefsDialog::chooseFilePWM() |
504 | { | 504 | { |
505 | QString fn = QDir::homeDirPath(); | 505 | QString fn = QDir::homeDirPath(); |
506 | |||
507 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this ); | 506 | fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this ); |
508 | if ( fn == "" ) | 507 | if ( fn == "" ) |
509 | return; | 508 | return; |
510 | mRemoteFilePWM->setText( fn ); | 509 | mRemoteFilePWM->setText( fn ); |
511 | } | 510 | } |
512 | void KSyncPrefsDialog::updateMyCaption() | 511 | void KSyncPrefsDialog::updateMyCaption() |
513 | { | 512 | { |
514 | setCaption( mProfileBox->currentText() + " : " +i18n("Synchronization Preferences")); | 513 | setCaption( mProfileBox->currentText() + " : " +i18n("Synchronization Preferences")); |