Diffstat (limited to 'libkdepim/ksyncprefsdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index a1eebec..6e6e631 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp @@ -143,12 +143,15 @@ void KSyncPrefsDialog::setupSyncAlgTab() mIncludeInRing = new QCheckBox( i18n("Include in multiple calendar sync"), topFrame ); topLayout->addMultiCellWidget(mIncludeInRing, iii,iii,0,1); ++iii; mIncludeInRingAB = new QCheckBox( i18n("Include in multiple addressbook sync"), topFrame ); topLayout->addMultiCellWidget(mIncludeInRingAB, iii,iii,0,1); ++iii; + mIncludeInRingPWM = new QCheckBox( i18n("Include in multiple pwmanager sync"), topFrame ); + topLayout->addMultiCellWidget(mIncludeInRingPWM, iii,iii,0,1); + ++iii; mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); ++iii; QButtonGroup* gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); topLayout->addMultiCellWidget(gr, iii,iii,0,1); @@ -221,44 +224,52 @@ void KSyncPrefsDialog::setupSyncAlgTab() topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); ++iii; temphb = new QHBox( localFileWidget ); lab = new QLabel( i18n("Local file Cal:"), temphb ); lab = new QLabel( i18n("Local file ABook:"), temphb ); + lab = new QLabel( i18n("Local file PWMgr:"), temphb ); temphb = new QHBox( localFileWidget ); button = new QPushButton( i18n("Choose..."), temphb ); connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); button = new QPushButton( i18n("Choose..."), temphb ); connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) ); + button = new QPushButton( i18n("Choose..."), temphb ); + connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) ); temphb = new QHBox( localFileWidget ); mRemoteFile = new QLineEdit( temphb); mRemoteFileAB = new QLineEdit( temphb); + mRemoteFilePWM = new QLineEdit( temphb); // *** remote remoteFileWidget = new QVBox( topFrame); topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1); ++iii; temphb = new QHBox( remoteFileWidget ); new QLabel( i18n("Calendar:"), temphb); new QLabel( i18n("AddressBook:"), temphb); + new QLabel( i18n("PWManager:"), temphb); lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); temphb = new QHBox( remoteFileWidget ); mRemotePrecommand = new QLineEdit(temphb); mRemotePrecommandAB = new QLineEdit(temphb); + mRemotePrecommandPWM = new QLineEdit(temphb); lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); temphb = new QHBox( remoteFileWidget ); mLocalTempFile = new QLineEdit(temphb); mLocalTempFileAB = new QLineEdit(temphb); + mLocalTempFilePWM = new QLineEdit(temphb); lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); temphb = new QHBox( remoteFileWidget ); mRemotePostcommand = new QLineEdit(temphb ); mRemotePostcommandAB = new QLineEdit(temphb ); + mRemotePostcommandPWM = new QLineEdit(temphb ); lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); temphb = new QHBox( remoteFileWidget ); button = new QPushButton( i18n("ssh/scp"), temphb ); connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); button = new QPushButton( i18n("ftp"), temphb ); @@ -298,18 +309,28 @@ void KSyncPrefsDialog::chooseFile() } void KSyncPrefsDialog::chooseFileAB() { QString fn = QDir::homeDirPath(); - fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.ics/*.vcs)"), this ); + fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.vcf)"), this ); if ( fn == "" ) return; mRemoteFileAB->setText( fn ); } +void KSyncPrefsDialog::chooseFilePWM() +{ + QString fn = QDir::homeDirPath(); + + fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename(*.pwm)"), this ); + if ( fn == "" ) + return; + mRemoteFilePWM->setText( fn ); +} + void KSyncPrefsDialog::textChanged( const QString & s ) { if ( mProfileBox->count() == 0 ) return; if ( currentSelection < 3 ) { //KMessageBox::error(this,i18n("This profil name\ncannot be edited!\n"),i18n("KO/Pi config error")); @@ -338,23 +359,29 @@ void KSyncPrefsDialog::profileChanged( int item ) mRemotePrecommandAB->setText(prof->getPreSyncCommandAB()); mRemotePostcommandAB->setText(prof->getPostSyncCommandAB()); mLocalTempFileAB->setText(prof->getLocalTempFileAB()); mRemoteFileAB->setText(prof->getRemoteFileNameAB()) ; + mRemotePrecommandPWM->setText(prof->getPreSyncCommandPWM()); + mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM()); + mLocalTempFilePWM->setText(prof->getLocalTempFilePWM()); + mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ; + mWriteContactToSIM->setChecked( prof->getWriteContactToSIM()); mPhoneDevice->setText(prof->getPhoneDevice()); mPhoneConnection->setText(prof->getPhoneConnection()); mPhoneModel->setText(prof->getPhoneModel()); mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); mAskForPreferences->setChecked( prof->getAskForPreferences()); mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); mWriteBackFile->setChecked( prof->getWriteBackFile()); mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); + mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() ); mWriteBackFuture->setChecked( prof->getWriteBackFuture()); mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() ); switch ( prof->getSyncPrefs() ) { case 0: loc->setChecked( true); @@ -398,22 +425,29 @@ void KSyncPrefsDialog::fillSSH() mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); mLocalTempFile->setText("/tmp/mycalendar.ics" ); mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" ); mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); mLocalTempFileAB->setText("/tmp/std.vcf" ); mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" ); + mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); + mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); + mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" ); } void KSyncPrefsDialog::fillFTP() { mRemotePrecommand->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics" ); mLocalTempFile->setText("/tmp/mycalendar.ics" ); mRemotePostcommand->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); mRemotePrecommandAB->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf" ); mLocalTempFileAB->setText("/tmp/std.vcf" ); mRemotePostcommandAB->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); + mRemotePrecommandPWM->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm" ); + mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); + mRemotePostcommandPWM->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); + } void KSyncPrefsDialog::kindChanged( bool b ) { if ( mIsLocal->isChecked () ) localFileWidget->show(); @@ -458,18 +492,23 @@ void KSyncPrefsDialog::saveProfile() prof->setLocalTempFile( mLocalTempFile->text()); prof->setRemoteFileName( mRemoteFile->text() ); prof->setPreSyncCommandAB( mRemotePrecommandAB->text()); prof->setPostSyncCommandAB( mRemotePostcommandAB->text() ); prof->setLocalTempFileAB( mLocalTempFileAB->text()); prof->setRemoteFileNameAB( mRemoteFileAB->text() ); + prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text()); + prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() ); + prof->setLocalTempFilePWM( mLocalTempFilePWM->text()); + prof->setRemoteFileNamePWM( mRemoteFilePWM->text() ); prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); prof->setAskForPreferences( mAskForPreferences->isChecked()); prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); prof->setWriteBackFile( mWriteBackFile->isChecked()); prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); + prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() ); int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; prof->setSyncPrefs( syncprefs); prof->setIsLocalFileSync( mIsLocal->isChecked() ); prof->setIsPhoneSync( mIsPhone->isChecked() ); prof->setWriteBackFuture(mWriteBackFuture->isChecked()); prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); |