Diffstat (limited to 'libkdepim/ksyncprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index 292cde1..27f7932 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp | |||
@@ -563,66 +563,66 @@ void KSyncPrefsDialog::profileChanged( int item ) | |||
563 | loc->setChecked( true); | 563 | loc->setChecked( true); |
564 | break; | 564 | break; |
565 | case 1: | 565 | case 1: |
566 | rem->setChecked( true ); | 566 | rem->setChecked( true ); |
567 | break; | 567 | break; |
568 | case 2: | 568 | case 2: |
569 | newest->setChecked( true); | 569 | newest->setChecked( true); |
570 | break; | 570 | break; |
571 | case 3: | 571 | case 3: |
572 | ask->setChecked( true); | 572 | ask->setChecked( true); |
573 | break; | 573 | break; |
574 | case 4: | 574 | case 4: |
575 | f_loc->setChecked( true); | 575 | f_loc->setChecked( true); |
576 | break; | 576 | break; |
577 | case 5: | 577 | case 5: |
578 | f_rem->setChecked( true); | 578 | f_rem->setChecked( true); |
579 | break; | 579 | break; |
580 | case 6: | 580 | case 6: |
581 | //both->setChecked( true); | 581 | //both->setChecked( true); |
582 | break; | 582 | break; |
583 | default: | 583 | default: |
584 | break; | 584 | break; |
585 | } | 585 | } |
586 | mIsLocal->setChecked(prof->getIsLocalFileSync()) ; | 586 | mIsLocal->setChecked(prof->getIsLocalFileSync()) ; |
587 | mIsPhone->setChecked(prof->getIsPhoneSync()) ; | 587 | mIsPhone->setChecked(prof->getIsPhoneSync()) ; |
588 | mIsPi->setChecked(prof->getIsPiSync()) ; | 588 | mIsPi->setChecked(prof->getIsPiSync()) ; |
589 | mIsPiSpecific->setChecked(prof->getIsPiSyncSpec()) ; | 589 | mIsPiSpecific->setChecked(prof->getIsPiSyncSpec()) ; |
590 | mIsKapiFileL->setChecked(prof->getIsKapiFile()) ; | 590 | mIsKapiFileL->setChecked(prof->getIsKapiFile()) ; |
591 | mIsKapiFileR->setChecked(prof->getIsKapiFile()) ; | 591 | mIsKapiFileR->setChecked(prof->getIsKapiFile()) ; |
592 | 592 | ||
593 | 593 | ||
594 | QStringList res = QStringList::split( ":",prof->getResSpecKopi()); | 594 | QStringList res = QStringList::split( ":",prof->getResSpecKopi()); |
595 | int i; | 595 | int i= res.count()/2; |
596 | for ( i = 0;i < res.count(); ++i ) { | 596 | for ( ;i < res.count(); ++i ) { |
597 | mResTableKopi->setText( i, 0, res[i] ); | 597 | mResTableKopi->setText( i, 0, res[i] ); |
598 | } | 598 | } |
599 | res = QStringList::split( ":",prof->getResSpecKapi()); | 599 | res = QStringList::split( ":",prof->getResSpecKapi()); |
600 | for ( i = 0;i < res.count(); ++i ) { | 600 | for ( i = 0;i < res.count(); ++i ) { |
601 | mResTableKapi->setText( i, 0, res[i] ); | 601 | mResTableKapi->setText( i, 0, res[i] ); |
602 | } | 602 | } |
603 | mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() &&!prof->getIsPiSync() &&!prof->getIsPiSyncSpec()); | 603 | mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() &&!prof->getIsPiSync() &&!prof->getIsPiSyncSpec()); |
604 | proGr->setEnabled( item > 2 ); | 604 | proGr->setEnabled( item > 2 ); |
605 | if ( item < 3 ) { | 605 | if ( item < 3 ) { |
606 | localFileWidget->hide(); | 606 | localFileWidget->hide(); |
607 | remoteFileWidget->hide(); | 607 | remoteFileWidget->hide(); |
608 | phoneWidget->hide(); | 608 | phoneWidget->hide(); |
609 | piWidget->hide(); | 609 | piWidget->hide(); |
610 | 610 | ||
611 | } else | 611 | } else |
612 | kindChanged( prof->getIsLocalFileSync() ); | 612 | kindChanged( prof->getIsLocalFileSync() ); |
613 | } | 613 | } |
614 | 614 | ||
615 | void KSyncPrefsDialog::fillSSH() | 615 | void KSyncPrefsDialog::fillSSH() |
616 | { | 616 | { |
617 | mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); | 617 | mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); |
618 | mLocalTempFile->setText("/tmp/mycalendar.ics" ); | 618 | mLocalTempFile->setText("/tmp/mycalendar.ics" ); |
619 | mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" ); | 619 | mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" ); |
620 | mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); | 620 | mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); |
621 | mLocalTempFileAB->setText("/tmp/std.vcf" ); | 621 | mLocalTempFileAB->setText("/tmp/std.vcf" ); |
622 | mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" ); | 622 | mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" ); |
623 | mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); | 623 | mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); |
624 | mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); | 624 | mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); |
625 | mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" ); | 625 | mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" ); |
626 | } | 626 | } |
627 | void KSyncPrefsDialog::fillFTP() | 627 | void KSyncPrefsDialog::fillFTP() |
628 | { | 628 | { |
@@ -723,65 +723,65 @@ void KSyncPrefsDialog::saveProfile() | |||
723 | prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text()); | 723 | prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text()); |
724 | prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() ); | 724 | prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() ); |
725 | prof->setLocalTempFilePWM( mLocalTempFilePWM->text()); | 725 | prof->setLocalTempFilePWM( mLocalTempFilePWM->text()); |
726 | prof->setRemoteFileNamePWM( mRemoteFilePWM->text() ); | 726 | prof->setRemoteFileNamePWM( mRemoteFilePWM->text() ); |
727 | prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); | 727 | prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); |
728 | prof->setAskForPreferences( mAskForPreferences->isChecked()); | 728 | prof->setAskForPreferences( mAskForPreferences->isChecked()); |
729 | prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); | 729 | prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); |
730 | prof->setWriteBackFile( mWriteBackFile->isChecked()); | 730 | prof->setWriteBackFile( mWriteBackFile->isChecked()); |
731 | prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); | 731 | prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); |
732 | prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); | 732 | prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); |
733 | prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() ); | 733 | prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() ); |
734 | int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; | 734 | int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; |
735 | prof->setSyncPrefs( syncprefs); | 735 | prof->setSyncPrefs( syncprefs); |
736 | prof->setIsLocalFileSync( mIsLocal->isChecked() ); | 736 | prof->setIsLocalFileSync( mIsLocal->isChecked() ); |
737 | prof->setIsPhoneSync( mIsPhone->isChecked() ); | 737 | prof->setIsPhoneSync( mIsPhone->isChecked() ); |
738 | prof->setIsPiSync( mIsPi->isChecked() ); | 738 | prof->setIsPiSync( mIsPi->isChecked() ); |
739 | prof->setIsPiSyncSpec( mIsPiSpecific->isChecked() ); | 739 | prof->setIsPiSyncSpec( mIsPiSpecific->isChecked() ); |
740 | prof->setIsKapiFile( mIsKapiFileL->isChecked() ); | 740 | prof->setIsKapiFile( mIsKapiFileL->isChecked() ); |
741 | prof->setWriteBackFuture(mWriteBackFuture->isChecked()); | 741 | prof->setWriteBackFuture(mWriteBackFuture->isChecked()); |
742 | prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); | 742 | prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); |
743 | prof->setWriteBackPastWeeks(mWriteBackPastWeeks->value()); | 743 | prof->setWriteBackPastWeeks(mWriteBackPastWeeks->value()); |
744 | if ( mWriteContactToSIM ) | 744 | if ( mWriteContactToSIM ) |
745 | prof->setWriteContactToSIM(mWriteContactToSIM->isChecked()); | 745 | prof->setWriteContactToSIM(mWriteContactToSIM->isChecked()); |
746 | prof->setPhoneDevice( mPhoneDevice->text() ); | 746 | prof->setPhoneDevice( mPhoneDevice->text() ); |
747 | prof->setPhoneConnection( mPhoneConnection->text() ); | 747 | prof->setPhoneConnection( mPhoneConnection->text() ); |
748 | prof->setPhoneModel( mPhoneModel->text() ); | 748 | prof->setPhoneModel( mPhoneModel->text() ); |
749 | prof->setFilterInCal ( mFilterInCal->currentText ()); | 749 | prof->setFilterInCal ( mFilterInCal->currentText ()); |
750 | prof->setFilterOutCal ( mFilterOutCal ->currentText ()); | 750 | prof->setFilterOutCal ( mFilterOutCal ->currentText ()); |
751 | prof->setFilterInAB ( mFilterInAB ->currentText ()); | 751 | prof->setFilterInAB ( mFilterInAB ->currentText ()); |
752 | prof->setFilterOutAB ( mFilterOutAB ->currentText ()); | 752 | prof->setFilterOutAB ( mFilterOutAB ->currentText ()); |
753 | if ( mIsPiSpecific->isChecked() ) { | 753 | if ( mIsPiSpecific->isChecked() ) { |
754 | 754 | ||
755 | QStringList res; | 755 | QStringList res = mResourcesKopi; |
756 | int i; | 756 | int i; |
757 | for ( i = 0;i < mResourcesKopi.count(); ++i ) { | 757 | for ( i = 0;i < mResourcesKopi.count(); ++i ) { |
758 | res.append( mResTableKopi->text( i, 0 )); | 758 | res.append( mResTableKopi->text( i, 0 )); |
759 | } | 759 | } |
760 | prof->setResSpecKopi( res.join(":")); | 760 | prof->setResSpecKopi( res.join(":")); |
761 | } | 761 | } |
762 | } | 762 | } |
763 | } | 763 | } |
764 | 764 | ||
765 | void KSyncPrefsDialog::insertProfiles() | 765 | void KSyncPrefsDialog::insertProfiles() |
766 | { | 766 | { |
767 | int curItem = mProfileBox->currentItem(); | 767 | int curItem = mProfileBox->currentItem(); |
768 | mProfileBox->blockSignals( true ); | 768 | mProfileBox->blockSignals( true ); |
769 | mProfileBox->clear(); | 769 | mProfileBox->clear(); |
770 | mProfileBox->insertStringList (mSyncProfileNames ); | 770 | mProfileBox->insertStringList (mSyncProfileNames ); |
771 | int item = mSyncProfileNames.count() -1; | 771 | int item = mSyncProfileNames.count() -1; |
772 | if ( curItem >= 0 && mSyncProfileNames.count() > 0 && curItem < mSyncProfileNames.count() ) | 772 | if ( curItem >= 0 && mSyncProfileNames.count() > 0 && curItem < mSyncProfileNames.count() ) |
773 | mProfileBox->setCurrentItem( curItem ); | 773 | mProfileBox->setCurrentItem( curItem ); |
774 | else if ( item >= 0 ) { | 774 | else if ( item >= 0 ) { |
775 | mProfileBox->setCurrentItem( item ); | 775 | mProfileBox->setCurrentItem( item ); |
776 | } | 776 | } |
777 | currentSelection = -1; | 777 | currentSelection = -1; |
778 | if ( mSyncProfileNames.count() > 0 ) { | 778 | if ( mSyncProfileNames.count() > 0 ) { |
779 | //qDebug(" profileChanged( mProfileBox->currentItem() "); | 779 | //qDebug(" profileChanged( mProfileBox->currentItem() "); |
780 | profileChanged( mProfileBox->currentItem() ); | 780 | profileChanged( mProfileBox->currentItem() ); |
781 | currentSelection = mProfileBox->currentItem(); | 781 | currentSelection = mProfileBox->currentItem(); |
782 | } | 782 | } |
783 | mProfileBox->blockSignals( false ); | 783 | mProfileBox->blockSignals( false ); |
784 | } | 784 | } |
785 | 785 | ||
786 | void KSyncPrefsDialog::addProfile ( KSyncProfile* temp ) | 786 | void KSyncPrefsDialog::addProfile ( KSyncProfile* temp ) |
787 | { | 787 | { |