author | zautrix <zautrix> | 2004-09-22 03:08:05 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-22 03:08:05 (UTC) |
commit | d63eac7a612a9724705bc58ad98c65c6ac052d07 (patch) (unidiff) | |
tree | dc584a0ddcbd5f828ea36b86b6af640e46e137f2 /libkdepim/kcmconfigs | |
parent | 633522024e48efc423155a04b71083a03696211d (diff) | |
download | kdepimpi-d63eac7a612a9724705bc58ad98c65c6ac052d07.zip kdepimpi-d63eac7a612a9724705bc58ad98c65c6ac052d07.tar.gz kdepimpi-d63eac7a612a9724705bc58ad98c65c6ac052d07.tar.bz2 |
connected global config
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 00a07d9..2819ab1 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -651,121 +651,121 @@ void KDEPIMConfigWidget::usrReadConfig() | |||
651 | mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2; | 651 | mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2; |
652 | 652 | ||
653 | mPhoneClient = prefs->mPhoneClient; | 653 | mPhoneClient = prefs->mPhoneClient; |
654 | mPhoneOtherChannel = prefs->mPhoneOtherChannel; | 654 | mPhoneOtherChannel = prefs->mPhoneOtherChannel; |
655 | mPhoneOtherMessage = prefs->mPhoneOtherMessage; | 655 | mPhoneOtherMessage = prefs->mPhoneOtherMessage; |
656 | mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters; | 656 | mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters; |
657 | 657 | ||
658 | mFaxClient = prefs->mFaxClient; | 658 | mFaxClient = prefs->mFaxClient; |
659 | mFaxOtherChannel = prefs->mFaxOtherChannel; | 659 | mFaxOtherChannel = prefs->mFaxOtherChannel; |
660 | mFaxOtherMessage = prefs->mFaxOtherMessage; | 660 | mFaxOtherMessage = prefs->mFaxOtherMessage; |
661 | mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters; | 661 | mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters; |
662 | 662 | ||
663 | mSMSClient = prefs->mSMSClient; | 663 | mSMSClient = prefs->mSMSClient; |
664 | mSMSOtherChannel = prefs->mSMSOtherChannel; | 664 | mSMSOtherChannel = prefs->mSMSOtherChannel; |
665 | mSMSOtherMessage = prefs->mSMSOtherMessage; | 665 | mSMSOtherMessage = prefs->mSMSOtherMessage; |
666 | mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters; | 666 | mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters; |
667 | 667 | ||
668 | mPagerClient = prefs->mPagerClient; | 668 | mPagerClient = prefs->mPagerClient; |
669 | mPagerOtherChannel = prefs->mPagerOtherChannel; | 669 | mPagerOtherChannel = prefs->mPagerOtherChannel; |
670 | mPagerOtherMessage = prefs->mPagerOtherMessage; | 670 | mPagerOtherMessage = prefs->mPagerOtherMessage; |
671 | mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; | 671 | mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; |
672 | 672 | ||
673 | mSipClient = prefs->mPagerClient; | 673 | mSipClient = prefs->mPagerClient; |
674 | mSipOtherChannel = prefs->mSipOtherChannel; | 674 | mSipOtherChannel = prefs->mSipOtherChannel; |
675 | mSipOtherMessage = prefs->mSipOtherMessage; | 675 | mSipOtherMessage = prefs->mSipOtherMessage; |
676 | mSipOtherMessageParameters = prefs->mSipOtherMessageParameters; | 676 | mSipOtherMessageParameters = prefs->mSipOtherMessageParameters; |
677 | 677 | ||
678 | mCurrentApp = ExternalAppHandler::EMAIL; | 678 | mCurrentApp = ExternalAppHandler::EMAIL; |
679 | mCurrentClient = mEmailClient; | 679 | mCurrentClient = mEmailClient; |
680 | 680 | ||
681 | updateClientWidgets(); | 681 | updateClientWidgets(); |
682 | 682 | ||
683 | blockSignals( blocked ); | 683 | blockSignals( blocked ); |
684 | 684 | ||
685 | } | 685 | } |
686 | 686 | ||
687 | void KDEPIMConfigWidget::usrWriteConfig() | 687 | void KDEPIMConfigWidget::usrWriteConfig() |
688 | { | 688 | { |
689 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); | 689 | KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); |
690 | 690 | ||
691 | saveEditFieldSettings(); | 691 | saveEditFieldSettings(); |
692 | 692 | ||
693 | 693 | ||
694 | prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); | 694 | prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); |
695 | prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); | 695 | prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); |
696 | 696 | ||
697 | prefs->mTimeZoneId = mTimeZoneCombo->currentText(); | 697 | prefs->mTimeZoneId = mTimeZoneCombo->currentText(); |
698 | QDate date; | 698 | QDate date; |
699 | date = mStartDateSavingEdit->date(); | 699 | date = mStartDateSavingEdit->date(); |
700 | int sub = 0; | 700 | int sub = 0; |
701 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 701 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
702 | sub = 1; | 702 | sub = 1; |
703 | prefs->mDaylightsavingStart = date.dayOfYear()-sub; | 703 | prefs->mDaylightsavingStart = date.dayOfYear()-sub; |
704 | date = mEndDateSavingEdit->date(); | 704 | date = mEndDateSavingEdit->date(); |
705 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) | 705 | if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) |
706 | sub = 1; | 706 | sub = 1; |
707 | else | 707 | else |
708 | sub = 0; | 708 | sub = 0; |
709 | prefs->mDaylightsavingEnd = date.dayOfYear()-sub; | 709 | prefs->mDaylightsavingEnd = date.dayOfYear()-sub; |
710 | 710 | ||
711 | 711 | ||
712 | prefs->mEmailClient = mEmailClient; | 712 | prefs->mEmailClient = mEmailClient; |
713 | prefs->mEmailOtherChannel = mEmailOtherChannel; | 713 | prefs->mEmailOtherChannel = mEmailOtherChannel; |
714 | prefs->mEmailOtherMessage = mEmailOtherMessage; | 714 | prefs->mEmailOtherMessage = mEmailOtherMessage; |
715 | prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters; | 715 | prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters; |
716 | prefs->mEmailOtherMessage2 = mEmailOtherMessage2; | 716 | prefs->mEmailOtherMessage2 = mEmailOtherMessage2; |
717 | prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2; | 717 | prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2; |
718 | 718 | ||
719 | prefs->mPhoneClient = mPhoneClient; | 719 | prefs->mPhoneClient = mPhoneClient; |
720 | prefs->mPhoneOtherChannel = mPhoneOtherChannel; | 720 | prefs->mPhoneOtherChannel = mPhoneOtherChannel; |
721 | prefs->mPhoneOtherMessage = mPhoneOtherMessage; | 721 | prefs->mPhoneOtherMessage = mPhoneOtherMessage; |
722 | prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters; | 722 | prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters; |
723 | 723 | ||
724 | prefs->mFaxClient = mFaxClient; | 724 | prefs->mFaxClient = mFaxClient; |
725 | prefs->mFaxOtherChannel = mFaxOtherChannel; | 725 | prefs->mFaxOtherChannel = mFaxOtherChannel; |
726 | prefs->mFaxOtherMessage = mFaxOtherMessage; | 726 | prefs->mFaxOtherMessage = mFaxOtherMessage; |
727 | prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters; | 727 | prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters; |
728 | 728 | ||
729 | prefs->mSMSClient = mSMSClient; | 729 | prefs->mSMSClient = mSMSClient; |
730 | prefs->mSMSOtherChannel = mSMSOtherChannel; | 730 | prefs->mSMSOtherChannel = mSMSOtherChannel; |
731 | prefs->mSMSOtherMessage = mSMSOtherMessage; | 731 | prefs->mSMSOtherMessage = mSMSOtherMessage; |
732 | prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters; | 732 | prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters; |
733 | 733 | ||
734 | prefs->mPagerClient = mPagerClient; | 734 | prefs->mPagerClient = mPagerClient; |
735 | prefs->mPagerOtherChannel = mPagerOtherChannel; | 735 | prefs->mPagerOtherChannel = mPagerOtherChannel; |
736 | prefs->mPagerOtherMessage = mPagerOtherMessage; | 736 | prefs->mPagerOtherMessage = mPagerOtherMessage; |
737 | prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; | 737 | prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; |
738 | 738 | ||
739 | 739 | ||
740 | prefs->mSipClient = mSipClient; | 740 | prefs->mSipClient = mSipClient; |
741 | prefs->mSipOtherChannel = mSipOtherChannel; | 741 | prefs->mSipOtherChannel = mSipOtherChannel; |
742 | prefs->mSipOtherMessage = mSipOtherMessage; | 742 | prefs->mSipOtherMessage = mSipOtherMessage; |
743 | prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; | 743 | prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; |
744 | 744 | ||
745 | //release the cache that other views can access the changed values instantanious | 745 | //release the cache that other views can access the changed values instantanious |
746 | ExternalAppHandler::instance()->loadConfig(); | 746 | ExternalAppHandler::instance()->loadConfig(); |
747 | 747 | KPimGlobalPrefs::instance()->setGlobalConfig(); | |
748 | } | 748 | } |
749 | 749 | ||
750 | 750 | ||
751 | void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, | 751 | void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, |
752 | const QStringList *tags) | 752 | const QStringList *tags) |
753 | { | 753 | { |
754 | if (tags) { | 754 | if (tags) { |
755 | int i = tags->findIndex(text); | 755 | int i = tags->findIndex(text); |
756 | if (i > 0) combo->setCurrentItem(i); | 756 | if (i > 0) combo->setCurrentItem(i); |
757 | } else { | 757 | } else { |
758 | for(int i=0;i<combo->count();++i) { | 758 | for(int i=0;i<combo->count();++i) { |
759 | if (combo->text(i) == text) { | 759 | if (combo->text(i) == text) { |
760 | combo->setCurrentItem(i); | 760 | combo->setCurrentItem(i); |
761 | break; | 761 | break; |
762 | } | 762 | } |
763 | } | 763 | } |
764 | } | 764 | } |
765 | } | 765 | } |
766 | 766 | ||
767 | 767 | ||
768 | void KDEPIMConfigWidget::textChanged( const QString& text ) | 768 | void KDEPIMConfigWidget::textChanged( const QString& text ) |
769 | { | 769 | { |
770 | emit changed( true ); | 770 | emit changed( true ); |
771 | } | 771 | } |