author | zautrix <zautrix> | 2005-02-09 13:30:49 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-09 13:30:49 (UTC) |
commit | 22d5db839c9741cb2e988e84bbb367617934ebd9 (patch) (unidiff) | |
tree | 3baa20d09d274afa4c9849a9ec4213699f750cf4 /libkdepim | |
parent | c3dd5bfd446b893a8b39ddec425a6cf8deff2261 (diff) | |
download | kdepimpi-22d5db839c9741cb2e988e84bbb367617934ebd9.zip kdepimpi-22d5db839c9741cb2e988e84bbb367617934ebd9.tar.gz kdepimpi-22d5db839c9741cb2e988e84bbb367617934ebd9.tar.bz2 |
fifi
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 1f5f4c7..9177f63 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -340,70 +340,75 @@ void KSyncManager::enableQuick( bool ask ) | |||
340 | QVBoxLayout lay( &dia ); | 340 | QVBoxLayout lay( &dia ); |
341 | lab.setText( mPrefs->mPassiveSyncPort ); | 341 | lab.setText( mPrefs->mPassiveSyncPort ); |
342 | lay.setMargin(7); | 342 | lay.setMargin(7); |
343 | lay.setSpacing(7); | 343 | lay.setSpacing(7); |
344 | int po = 9197+mTargetApp; | 344 | int po = 9197+mTargetApp; |
345 | QLabel label ( i18n("Port number (Default: %1)").arg(po), &dia ); | 345 | QLabel label ( i18n("Port number (Default: %1)").arg(po), &dia ); |
346 | lay.addWidget( &label); | 346 | lay.addWidget( &label); |
347 | lay.addWidget( &lab); | 347 | lay.addWidget( &lab); |
348 | 348 | ||
349 | QLineEdit lepw ( &dia ); | 349 | QLineEdit lepw ( &dia ); |
350 | lepw.setText( mPrefs->mPassiveSyncPw ); | 350 | lepw.setText( mPrefs->mPassiveSyncPw ); |
351 | QLabel label2 ( i18n("Password to enable\naccess from remote:"), &dia ); | 351 | QLabel label2 ( i18n("Password to enable\naccess from remote:"), &dia ); |
352 | lay.addWidget( &label2); | 352 | lay.addWidget( &label2); |
353 | lay.addWidget( &lepw); | 353 | lay.addWidget( &lepw); |
354 | QCheckBox autostart(i18n("Automatically start\nat application startup"), &dia ); | 354 | QCheckBox autostart(i18n("Automatically start\nat application startup"), &dia ); |
355 | lay.addWidget( &autostart); | 355 | lay.addWidget( &autostart); |
356 | autostart.setChecked( mPrefs->mPassiveSyncAutoStart ); | 356 | autostart.setChecked( mPrefs->mPassiveSyncAutoStart ); |
357 | #ifdef DESKTOP_VERSION | 357 | #ifdef DESKTOP_VERSION |
358 | #ifdef _WIN32_ | 358 | #ifdef _WIN32_ |
359 | QCheckBox syncdesktop( i18n("Automatically sync with Outlook\nwhen receiving sync request"),&dia ); | 359 | QCheckBox syncdesktop( i18n("Automatically sync with Outlook\nwhen receiving sync request"),&dia ); |
360 | syncdesktop.hide();// not implemented! | 360 | syncdesktop.hide();// not implemented! |
361 | #else | 361 | #else |
362 | QCheckBox syncdesktop( i18n("Automatically sync with KDE-Desktop\nwhen receiving sync request"),&dia ); | 362 | QCheckBox syncdesktop( i18n("Automatically sync with KDE-Desktop\nwhen receiving sync request"),&dia ); |
363 | #endif | 363 | #endif |
364 | lay.addWidget( &syncdesktop); | 364 | lay.addWidget( &syncdesktop); |
365 | #else | 365 | #else |
366 | mPrefs->mPassiveSyncWithDesktop = false; | 366 | mPrefs->mPassiveSyncWithDesktop = false; |
367 | QCheckBox syncdesktop( i18n("Automatically sync\nwith KDE-Desktop"),&dia ); | 367 | QCheckBox syncdesktop( i18n("Automatically sync\nwith KDE-Desktop"),&dia ); |
368 | syncdesktop.hide(); | 368 | syncdesktop.hide(); |
369 | #endif | 369 | #endif |
370 | syncdesktop.setChecked( mPrefs->mPassiveSyncWithDesktop ); | 370 | syncdesktop.setChecked( mPrefs->mPassiveSyncWithDesktop ); |
371 | 371 | ||
372 | dia.setFixedSize( 230,120 ); | ||
373 | dia.setCaption( i18n("Enter port for Pi-Sync") ); | ||
374 | QPushButton pb ( "OK", &dia); | 372 | QPushButton pb ( "OK", &dia); |
375 | lay.addWidget( &pb ); | 373 | lay.addWidget( &pb ); |
376 | connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) ); | 374 | connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) ); |
375 | dia.resize( 230,120 ); | ||
376 | dia.setCaption( i18n("Enter port for Pi-Sync") ); | ||
377 | dia.show(); | 377 | dia.show(); |
378 | #ifndef DESKTOP_VERSION | ||
379 | int dw = QApplication::desktop()->width(); | ||
380 | int dh = QApplication::desktop()->height(); | ||
381 | dia.move( (dw-dia.width())/2, (dh - dia.height() )/2 ); | ||
382 | #endif | ||
378 | if ( ! dia.exec() ) | 383 | if ( ! dia.exec() ) |
379 | return; | 384 | return; |
380 | dia.hide(); | 385 | dia.hide(); |
381 | qApp->processEvents(); | 386 | qApp->processEvents(); |
382 | if ( mPrefs->mPassiveSyncPw != lepw.text() ) { | 387 | if ( mPrefs->mPassiveSyncPw != lepw.text() ) { |
383 | changed = true; | 388 | changed = true; |
384 | mPrefs->mPassiveSyncPw = lepw.text(); | 389 | mPrefs->mPassiveSyncPw = lepw.text(); |
385 | } | 390 | } |
386 | if ( mPrefs->mPassiveSyncPort != lab.text() ) { | 391 | if ( mPrefs->mPassiveSyncPort != lab.text() ) { |
387 | mPrefs->mPassiveSyncPort = lab.text(); | 392 | mPrefs->mPassiveSyncPort = lab.text(); |
388 | changed = true; | 393 | changed = true; |
389 | } | 394 | } |
390 | autoStart = autostart.isChecked(); | 395 | autoStart = autostart.isChecked(); |
391 | if (mPrefs->mPassiveSyncWithDesktop != syncdesktop.isChecked() ) { | 396 | if (mPrefs->mPassiveSyncWithDesktop != syncdesktop.isChecked() ) { |
392 | changed = true; | 397 | changed = true; |
393 | mPrefs->mPassiveSyncWithDesktop = syncdesktop.isChecked(); | 398 | mPrefs->mPassiveSyncWithDesktop = syncdesktop.isChecked(); |
394 | } | 399 | } |
395 | } | 400 | } |
396 | else | 401 | else |
397 | autoStart = mPrefs->mPassiveSyncAutoStart; | 402 | autoStart = mPrefs->mPassiveSyncAutoStart; |
398 | if ( autoStart != mPrefs->mPassiveSyncAutoStart ) | 403 | if ( autoStart != mPrefs->mPassiveSyncAutoStart ) |
399 | changed = true; | 404 | changed = true; |
400 | bool ok; | 405 | bool ok; |
401 | mPrefs->mPassiveSyncAutoStart = false; | 406 | mPrefs->mPassiveSyncAutoStart = false; |
402 | Q_UINT16 port = mPrefs->mPassiveSyncPort.toUInt(&ok); | 407 | Q_UINT16 port = mPrefs->mPassiveSyncPort.toUInt(&ok); |
403 | if ( ! ok ) { | 408 | if ( ! ok ) { |
404 | KMessageBox::information( 0, i18n("No valid port")); | 409 | KMessageBox::information( 0, i18n("No valid port")); |
405 | return; | 410 | return; |
406 | } | 411 | } |
407 | //qDebug("port %d ", port); | 412 | //qDebug("port %d ", port); |
408 | mServerSocket = new KServerSocket ( mPrefs->mPassiveSyncPw, port ,1 ); | 413 | mServerSocket = new KServerSocket ( mPrefs->mPassiveSyncPw, port ,1 ); |
409 | mServerSocket->setFileName( defaultFileName() );//bbb | 414 | mServerSocket->setFileName( defaultFileName() );//bbb |