summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorzautrix <zautrix>2004-10-10 16:00:04 (UTC)
committer zautrix <zautrix>2004-10-10 16:00:04 (UTC)
commitee6e29a5092d32165b7bf6b39069bd8a1dcd5b0a (patch) (unidiff)
tree1d908bfc23b8a49d43a58bbeadd82c4e08faeff6 /libkdepim
parent213a9d993e5a4751b64e18320cfbebb000681d13 (diff)
downloadkdepimpi-ee6e29a5092d32165b7bf6b39069bd8a1dcd5b0a.zip
kdepimpi-ee6e29a5092d32165b7bf6b39069bd8a1dcd5b0a.tar.gz
kdepimpi-ee6e29a5092d32165b7bf6b39069bd8a1dcd5b0a.tar.bz2
many phone AB sync fixes
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprefsdialog.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 84cc448..cf8f996 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -191,25 +191,25 @@ void KSyncPrefsDialog::setupSyncAlgTab()
191 mIsLocal = new QRadioButton ( i18n("Local file"), gr ); 191 mIsLocal = new QRadioButton ( i18n("Local file"), gr );
192 mIsPi = new QRadioButton ( i18n("Pi-Sync ( direct Kx/Pi to Kx/Pi sync )"), gr ); 192 mIsPi = new QRadioButton ( i18n("Pi-Sync ( direct Kx/Pi to Kx/Pi sync )"), gr );
193 connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 193 connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
194 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr ); 194 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr );
195 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 195 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
196 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr ); 196 mIsPhone = new QRadioButton ( i18n("Mobile device (cell phone)"), gr );
197 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 197 connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
198 198
199 199
200 phoneWidget = new QVBox( topFrame); 200 phoneWidget = new QVBox( topFrame);
201 topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); 201 topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1);
202 ++iii; 202 ++iii;
203 mWriteContactToSIM= new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); 203 mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget );
204 QHBox* temphb = new QHBox( phoneWidget ); 204 QHBox* temphb = new QHBox( phoneWidget );
205 new QLabel( i18n("I/O device: "), temphb ); 205 new QLabel( i18n("I/O device: "), temphb );
206 mPhoneDevice = new QLineEdit( temphb); 206 mPhoneDevice = new QLineEdit( temphb);
207 button = new QPushButton( i18n("Help..."), temphb ); 207 button = new QPushButton( i18n("Help..."), temphb );
208 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) ); 208 connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) );
209 209
210 210
211 temphb = new QHBox( phoneWidget ); 211 temphb = new QHBox( phoneWidget );
212 new QLabel( i18n("Connection: "), temphb ); 212 new QLabel( i18n("Connection: "), temphb );
213 mPhoneConnection = new QLineEdit( temphb); 213 mPhoneConnection = new QLineEdit( temphb);
214 button = new QPushButton( i18n("Help..."), temphb ); 214 button = new QPushButton( i18n("Help..."), temphb );
215 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); 215 connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) );
@@ -404,25 +404,26 @@ void KSyncPrefsDialog::profileChanged( int item )
404 mRemoteFile->setText(prof->getRemoteFileName()) ; 404 mRemoteFile->setText(prof->getRemoteFileName()) ;
405 405
406 mRemotePrecommandAB->setText(prof->getPreSyncCommandAB()); 406 mRemotePrecommandAB->setText(prof->getPreSyncCommandAB());
407 mRemotePostcommandAB->setText(prof->getPostSyncCommandAB()); 407 mRemotePostcommandAB->setText(prof->getPostSyncCommandAB());
408 mLocalTempFileAB->setText(prof->getLocalTempFileAB()); 408 mLocalTempFileAB->setText(prof->getLocalTempFileAB());
409 mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ; 409 mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ;
410 410
411 mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM()); 411 mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM());
412 mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM()); 412 mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM());
413 mLocalTempFilePWM->setText(prof->getLocalTempFilePWM()); 413 mLocalTempFilePWM->setText(prof->getLocalTempFilePWM());
414 mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ; 414 mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ;
415 415
416 mWriteContactToSIM->setChecked( prof->getWriteContactToSIM()); 416 if ( mWriteContactToSIM )
417 mWriteContactToSIM->setChecked( prof->getWriteContactToSIM());
417 mPhoneDevice->setText(prof->getPhoneDevice()); 418 mPhoneDevice->setText(prof->getPhoneDevice());
418 mPhoneConnection->setText(prof->getPhoneConnection()); 419 mPhoneConnection->setText(prof->getPhoneConnection());
419 mPhoneModel->setText(prof->getPhoneModel()); 420 mPhoneModel->setText(prof->getPhoneModel());
420 421
421 mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); 422 mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync());
422 mAskForPreferences->setChecked( prof->getAskForPreferences()); 423 mAskForPreferences->setChecked( prof->getAskForPreferences());
423 mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); 424 mWriteBackExisting->setChecked( prof->getWriteBackExisting() );
424 mWriteBackFile->setChecked( prof->getWriteBackFile()); 425 mWriteBackFile->setChecked( prof->getWriteBackFile());
425 mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); 426 mIncludeInRing->setChecked( prof->getIncludeInRingSync() );
426 mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); 427 mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() );
427 mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() ); 428 mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() );
428 mWriteBackFuture->setChecked( prof->getWriteBackFuture()); 429 mWriteBackFuture->setChecked( prof->getWriteBackFuture());
@@ -571,26 +572,26 @@ void KSyncPrefsDialog::saveProfile()
571 prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); 572 prof->setWriteBackExisting(mWriteBackExisting->isChecked() );
572 prof->setWriteBackFile( mWriteBackFile->isChecked()); 573 prof->setWriteBackFile( mWriteBackFile->isChecked());
573 prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); 574 prof->setIncludeInRingSync( mIncludeInRing->isChecked() );
574 prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); 575 prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() );
575 prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() ); 576 prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() );
576 int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; 577 int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ;
577 prof->setSyncPrefs( syncprefs); 578 prof->setSyncPrefs( syncprefs);
578 prof->setIsLocalFileSync( mIsLocal->isChecked() ); 579 prof->setIsLocalFileSync( mIsLocal->isChecked() );
579 prof->setIsPhoneSync( mIsPhone->isChecked() ); 580 prof->setIsPhoneSync( mIsPhone->isChecked() );
580 prof->setIsPiSync( mIsPi->isChecked() ); 581 prof->setIsPiSync( mIsPi->isChecked() );
581 prof->setWriteBackFuture(mWriteBackFuture->isChecked()); 582 prof->setWriteBackFuture(mWriteBackFuture->isChecked());
582 prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); 583 prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value());
583 584 if ( mWriteContactToSIM )
584 prof->setWriteContactToSIM(mWriteContactToSIM->isChecked()); 585 prof->setWriteContactToSIM(mWriteContactToSIM->isChecked());
585 prof->setPhoneDevice( mPhoneDevice->text() ); 586 prof->setPhoneDevice( mPhoneDevice->text() );
586 prof->setPhoneConnection( mPhoneConnection->text() ); 587 prof->setPhoneConnection( mPhoneConnection->text() );
587 prof->setPhoneModel( mPhoneModel->text() ); 588 prof->setPhoneModel( mPhoneModel->text() );
588 589
589 } 590 }
590 591
591} 592}
592 593
593void KSyncPrefsDialog::insertProfiles() 594void KSyncPrefsDialog::insertProfiles()
594{ 595{
595 int curItem = mProfileBox->currentItem(); 596 int curItem = mProfileBox->currentItem();
596 mProfileBox->blockSignals( true ); 597 mProfileBox->blockSignals( true );
@@ -706,25 +707,25 @@ void KSyncPrefsDialog::helpDevice()
706 "???\n(bluetooth device address)\n"; 707 "???\n(bluetooth device address)\n";
707 708
708#else 709#else
709 hint += "/dev/ircomm\n(Irda)\n" 710 hint += "/dev/ircomm\n(Irda)\n"
710 "/dev/ttyS0\n(first serial port)\n" 711 "/dev/ttyS0\n(first serial port)\n"
711 "/dev/ttyUSB0\n(first device usb port)\n" 712 "/dev/ttyUSB0\n(first device usb port)\n"
712 "???\n(bluetooth device address)\n"; 713 "???\n(bluetooth device address)\n";
713#endif 714#endif
714 KMessageBox::information(this,hint,i18n("KDE-Pim sync config")); 715 KMessageBox::information(this,hint,i18n("KDE-Pim sync config"));
715} 716}
716void KSyncPrefsDialog::helpModel() 717void KSyncPrefsDialog::helpModel()
717{ 718{
718 QString hint = i18n("Leave empty or\ninsert name of phone model:\n"); 719 QString hint = i18n("Recommended: Leave empty!\n(Such that model can\nbe auto detected)\nOr insert name of model:\n");
719 hint += "E.g. for Nokia 6310i:\n6310i\nAlso possible:\nobex\nfor Obex connection"; 720 hint += "E.g. for Nokia 6310i:\n6310i\nAlso possible:\nobex\nfor Obex connection";
720 KMessageBox::information(this,hint,i18n("KDE-Pim sync config")); 721 KMessageBox::information(this,hint,i18n("KDE-Pim sync config"));
721 722
722} 723}
723void KSyncPrefsDialog::helpConnection() 724void KSyncPrefsDialog::helpConnection()
724{ 725{
725 QString hint = i18n("Insert kind of connection,e.g.:\n"); 726 QString hint = i18n("Insert kind of connection,e.g.:\n");
726 hint += "irda | Nokia FBUS over infrared\n" 727 hint += "irda | Nokia FBUS over infrared\n"
727 "irdaat | AT commands infrared\n(for Siemens/Sony-Erricsson)\n" 728 "irdaat | AT commands infrared\n(for Siemens/Sony-Erricsson)\n"
728 "irdaobex | set also model as obex\n" 729 "irdaobex | set also model as obex\n"
729 "fbus | Nokia FBUS2 serial\n"; 730 "fbus | Nokia FBUS2 serial\n";
730 KMessageBox::information(this,hint,i18n("KDE-Pim sync config")); 731 KMessageBox::information(this,hint,i18n("KDE-Pim sync config"));