summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorzautrix <zautrix>2004-10-07 10:37:59 (UTC)
committer zautrix <zautrix>2004-10-07 10:37:59 (UTC)
commitf0e8b8f36bccda952fa662e4faf2d58fcee67262 (patch) (unidiff)
treef1d26c6d9e8bdba9b15464682b8a64b1d3e04d8b /libkdepim
parent95508093d45aaf062813b7824884f964ee2d4d9a (diff)
downloadkdepimpi-f0e8b8f36bccda952fa662e4faf2d58fcee67262.zip
kdepimpi-f0e8b8f36bccda952fa662e4faf2d58fcee67262.tar.gz
kdepimpi-f0e8b8f36bccda952fa662e4faf2d58fcee67262.tar.bz2
fix for different targets
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index ea543dd..b360644 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -196,51 +196,61 @@ void KSyncManager::slotSyncMenu( int action )
196 case (KAPI): 196 case (KAPI):
197 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) ) 197 if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) )
198 mLastSyncedLocalFile = temp->getRemoteFileNameAB(); 198 mLastSyncedLocalFile = temp->getRemoteFileNameAB();
199 break; 199 break;
200 case (KOPI): 200 case (KOPI):
201 if ( syncWithFile( temp->getRemoteFileName( ), false ) ) 201 if ( syncWithFile( temp->getRemoteFileName( ), false ) )
202 mLastSyncedLocalFile = temp->getRemoteFileName(); 202 mLastSyncedLocalFile = temp->getRemoteFileName();
203 break; 203 break;
204 case (PWMPI): 204 case (PWMPI):
205 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) ) 205 if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) )
206 mLastSyncedLocalFile = temp->getRemoteFileNamePWM(); 206 mLastSyncedLocalFile = temp->getRemoteFileNamePWM();
207 break; 207 break;
208 default: 208 default:
209 qDebug("KSyncManager::slotSyncMenu: invalid apptype selected"); 209 qDebug("KSyncManager::slotSyncMenu: invalid apptype selected");
210 break; 210 break;
211 211
212 } 212 }
213 } else { 213 } else {
214 if ( temp->getIsPhoneSync() ) { 214 if ( temp->getIsPhoneSync() ) {
215 mPhoneDevice = temp->getPhoneDevice( ) ; 215 mPhoneDevice = temp->getPhoneDevice( ) ;
216 mPhoneConnection = temp->getPhoneConnection( ); 216 mPhoneConnection = temp->getPhoneConnection( );
217 mPhoneModel = temp->getPhoneModel( ); 217 mPhoneModel = temp->getPhoneModel( );
218 syncPhone(); 218 syncPhone();
219 } else if ( temp->getIsPiSync() ) { 219 } else if ( temp->getIsPiSync() ) {
220 mPassWordPiSync = temp->getRemotePw(); 220 if ( mTargetApp == KAPI ) {
221 mActiveSyncPort = temp->getRemotePort(); 221 mPassWordPiSync = temp->getRemotePwAB();
222 mActiveSyncIP = temp->getRemoteIP(); 222 mActiveSyncPort = temp->getRemotePortAB();
223 mActiveSyncIP = temp->getRemoteIPAB();
224 } else if ( mTargetApp == KOPI ) {
225 mPassWordPiSync = temp->getRemotePw();
226 mActiveSyncPort = temp->getRemotePort();
227 mActiveSyncIP = temp->getRemoteIP();
228 } else {
229 mPassWordPiSync = temp->getRemotePwPWM();
230 mActiveSyncPort = temp->getRemotePortPWM();
231 mActiveSyncIP = temp->getRemoteIPPWM();
232 }
223 syncPi(); 233 syncPi();
224 } 234 }
225 syncRemote( temp ); 235 syncRemote( temp );
226 236
227 } 237 }
228 } 238 }
229 delete temp; 239 delete temp;
230 setBlockSave(false); 240 setBlockSave(false);
231} 241}
232void KSyncManager::enableQuick() 242void KSyncManager::enableQuick()
233{ 243{
234 QDialog dia ( 0, "input-dialog", true ); 244 QDialog dia ( 0, "input-dialog", true );
235 QLineEdit lab ( &dia ); 245 QLineEdit lab ( &dia );
236 QVBoxLayout lay( &dia ); 246 QVBoxLayout lay( &dia );
237 lab.setText( mPrefs->mPassiveSyncPort ); 247 lab.setText( mPrefs->mPassiveSyncPort );
238 lay.setMargin(7); 248 lay.setMargin(7);
239 lay.setSpacing(7); 249 lay.setSpacing(7);
240 int po = 9197+mTargetApp; 250 int po = 9197+mTargetApp;
241 QLabel label ( i18n("Port number (Default: %1)").arg(po), &dia ); 251 QLabel label ( i18n("Port number (Default: %1)").arg(po), &dia );
242 lay.addWidget( &label); 252 lay.addWidget( &label);
243 lay.addWidget( &lab); 253 lay.addWidget( &lab);
244 254
245 QLineEdit lepw ( &dia ); 255 QLineEdit lepw ( &dia );
246 lepw.setText( mPrefs->mPassiveSyncPw ); 256 lepw.setText( mPrefs->mPassiveSyncPw );