summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kcmconfigs/kdepimconfigwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
index 6de60fa..1fae41f 100644
--- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
+++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp
@@ -597,193 +597,193 @@ void KDEPIMConfigWidget::updateClientWidgets()
597 ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC)) 597 ||((mCurrentApp == ExternalAppHandler::FAX) && (mCurrentClient == KPimGlobalPrefs::NONE_FAC))
598 ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC)) 598 ||((mCurrentApp == ExternalAppHandler::PAGER) && (mCurrentClient == KPimGlobalPrefs::NONE_PAC))
599 ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC))) 599 ||((mCurrentApp == ExternalAppHandler::SIP) && (mCurrentClient == KPimGlobalPrefs::NONE_SIC)))
600 { 600 {
601 enabled = false; 601 enabled = false;
602 } 602 }
603 else 603 else
604 { 604 {
605 enabled = true; 605 enabled = true;
606 } 606 }
607 607
608 608
609 mChannel->setReadOnly(readonly); 609 mChannel->setReadOnly(readonly);
610 mMessage->setReadOnly(readonly); 610 mMessage->setReadOnly(readonly);
611 mParameters->setReadOnly(readonly); 611 mParameters->setReadOnly(readonly);
612 mMessage2->setReadOnly(readonly); 612 mMessage2->setReadOnly(readonly);
613 mParameters2->setReadOnly(readonly); 613 mParameters2->setReadOnly(readonly);
614 614
615 mChannel->setEnabled(enabled); 615 mChannel->setEnabled(enabled);
616 mMessage->setEnabled(enabled); 616 mMessage->setEnabled(enabled);
617 mParameters->setEnabled(enabled); 617 mParameters->setEnabled(enabled);
618 mMessage2->setEnabled(enabled); 618 mMessage2->setEnabled(enabled);
619 mParameters2->setEnabled(enabled); 619 mParameters2->setEnabled(enabled);
620 620
621 621
622 622
623 mClient->setCurrentItem(mCurrentClient); 623 mClient->setCurrentItem(mCurrentClient);
624 624
625 625
626 // enable/disable the extra message/parameter field 626 // enable/disable the extra message/parameter field
627 if (mCurrentApp == ExternalAppHandler::EMAIL) 627 if (mCurrentApp == ExternalAppHandler::EMAIL)
628 { 628 {
629 } 629 }
630 else 630 else
631 { 631 {
632 mMessage2->setText( "" ); 632 mMessage2->setText( "" );
633 mParameters2->setText( "" ); 633 mParameters2->setText( "" );
634 } 634 }
635 635
636 if (enabled == true) { 636 if (enabled == true) {
637 mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); 637 mMessage2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL);
638 mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL); 638 mParameters2->setEnabled(mCurrentApp == ExternalAppHandler::EMAIL);
639 } 639 }
640 640
641 641
642 blockSignals( blocked ); 642 blockSignals( blocked );
643 643
644} 644}
645 645
646void KDEPIMConfigWidget::usrReadConfig() 646void KDEPIMConfigWidget::usrReadConfig()
647{ 647{
648 KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); 648 KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance();
649 649
650 bool blocked = signalsBlocked(); 650 bool blocked = signalsBlocked();
651 blockSignals( true ); 651 blockSignals( true );
652 652
653 QString dummy = prefs->mUserDateFormatLong; 653 QString dummy = prefs->mUserDateFormatLong;
654 mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") )); 654 mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") ));
655 dummy = prefs->mUserDateFormatShort; 655 dummy = prefs->mUserDateFormatShort;
656 mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") )); 656 mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") ));
657 657
658 QDate current ( 2001, 1,1); 658 QDate current ( 2001, 1,1);
659 mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1)); 659 mStartDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingStart-1));
660 mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1)); 660 mEndDateSavingEdit->setDate(current.addDays(prefs->mDaylightsavingEnd-1));
661 setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId)); 661 setCombo(mTimeZoneCombo,i18n(prefs->mTimeZoneId));
662 662
663 663
664 664
665 665
666 mEmailClient = prefs->mEmailClient; 666 mEmailClient = prefs->mEmailClient;
667 mEmailOtherChannel = prefs->mEmailOtherChannel; 667 mEmailOtherChannel = prefs->mEmailOtherChannel;
668 mEmailOtherMessage = prefs->mEmailOtherMessage; 668 mEmailOtherMessage = prefs->mEmailOtherMessage;
669 mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters; 669 mEmailOtherMessageParameters = prefs->mEmailOtherMessageParameters;
670 mEmailOtherMessage2 = prefs->mEmailOtherMessage2; 670 mEmailOtherMessage2 = prefs->mEmailOtherMessage2;
671 mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2; 671 mEmailOtherMessageParameters2 = prefs->mEmailOtherMessageParameters2;
672 672
673 mPhoneClient = prefs->mPhoneClient; 673 mPhoneClient = prefs->mPhoneClient;
674 mPhoneOtherChannel = prefs->mPhoneOtherChannel; 674 mPhoneOtherChannel = prefs->mPhoneOtherChannel;
675 mPhoneOtherMessage = prefs->mPhoneOtherMessage; 675 mPhoneOtherMessage = prefs->mPhoneOtherMessage;
676 mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters; 676 mPhoneOtherMessageParameters = prefs->mPhoneOtherMessageParameters;
677 677
678 mFaxClient = prefs->mFaxClient; 678 mFaxClient = prefs->mFaxClient;
679 mFaxOtherChannel = prefs->mFaxOtherChannel; 679 mFaxOtherChannel = prefs->mFaxOtherChannel;
680 mFaxOtherMessage = prefs->mFaxOtherMessage; 680 mFaxOtherMessage = prefs->mFaxOtherMessage;
681 mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters; 681 mFaxOtherMessageParameters = prefs->mFaxOtherMessageParameters;
682 682
683 mSMSClient = prefs->mSMSClient; 683 mSMSClient = prefs->mSMSClient;
684 mSMSOtherChannel = prefs->mSMSOtherChannel; 684 mSMSOtherChannel = prefs->mSMSOtherChannel;
685 mSMSOtherMessage = prefs->mSMSOtherMessage; 685 mSMSOtherMessage = prefs->mSMSOtherMessage;
686 mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters; 686 mSMSOtherMessageParameters = prefs->mSMSOtherMessageParameters;
687 687
688 mPagerClient = prefs->mPagerClient; 688 mPagerClient = prefs->mPagerClient;
689 mPagerOtherChannel = prefs->mPagerOtherChannel; 689 mPagerOtherChannel = prefs->mPagerOtherChannel;
690 mPagerOtherMessage = prefs->mPagerOtherMessage; 690 mPagerOtherMessage = prefs->mPagerOtherMessage;
691 mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters; 691 mPagerOtherMessageParameters = prefs->mPagerOtherMessageParameters;
692 692
693 mSipClient = prefs->mPagerClient; 693 mSipClient = prefs->mSipClient;
694 mSipOtherChannel = prefs->mSipOtherChannel; 694 mSipOtherChannel = prefs->mSipOtherChannel;
695 mSipOtherMessage = prefs->mSipOtherMessage; 695 mSipOtherMessage = prefs->mSipOtherMessage;
696 mSipOtherMessageParameters = prefs->mSipOtherMessageParameters; 696 mSipOtherMessageParameters = prefs->mSipOtherMessageParameters;
697 697
698 mCurrentApp = ExternalAppHandler::EMAIL; 698 mCurrentApp = ExternalAppHandler::EMAIL;
699 mCurrentClient = mEmailClient; 699 mCurrentClient = mEmailClient;
700 700
701 updateClientWidgets(); 701 updateClientWidgets();
702 702
703 blockSignals( blocked ); 703 blockSignals( blocked );
704 704
705} 705}
706 706
707void KDEPIMConfigWidget::usrWriteConfig() 707void KDEPIMConfigWidget::usrWriteConfig()
708{ 708{
709 KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance(); 709 KPimGlobalPrefs* prefs = KPimGlobalPrefs::instance();
710 710
711 saveEditFieldSettings(); 711 saveEditFieldSettings();
712 712
713 713
714 prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") ); 714 prefs->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") );
715 prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") ); 715 prefs->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") );
716 716
717 prefs->mTimeZoneId = mTimeZoneCombo->currentText(); 717 prefs->mTimeZoneId = mTimeZoneCombo->currentText();
718 QDate date; 718 QDate date;
719 date = mStartDateSavingEdit->date(); 719 date = mStartDateSavingEdit->date();
720 int sub = 0; 720 int sub = 0;
721 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 721 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
722 sub = 1; 722 sub = 1;
723 prefs->mDaylightsavingStart = date.dayOfYear()-sub; 723 prefs->mDaylightsavingStart = date.dayOfYear()-sub;
724 date = mEndDateSavingEdit->date(); 724 date = mEndDateSavingEdit->date();
725 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 ) 725 if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
726 sub = 1; 726 sub = 1;
727 else 727 else
728 sub = 0; 728 sub = 0;
729 prefs->mDaylightsavingEnd = date.dayOfYear()-sub; 729 prefs->mDaylightsavingEnd = date.dayOfYear()-sub;
730 730
731 731
732 prefs->mEmailClient = mEmailClient; 732 prefs->mEmailClient = mEmailClient;
733 prefs->mEmailOtherChannel = mEmailOtherChannel; 733 prefs->mEmailOtherChannel = mEmailOtherChannel;
734 prefs->mEmailOtherMessage = mEmailOtherMessage; 734 prefs->mEmailOtherMessage = mEmailOtherMessage;
735 prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters; 735 prefs->mEmailOtherMessageParameters = mEmailOtherMessageParameters;
736 prefs->mEmailOtherMessage2 = mEmailOtherMessage2; 736 prefs->mEmailOtherMessage2 = mEmailOtherMessage2;
737 prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2; 737 prefs->mEmailOtherMessageParameters2 = mEmailOtherMessageParameters2;
738 738
739 prefs->mPhoneClient = mPhoneClient; 739 prefs->mPhoneClient = mPhoneClient;
740 prefs->mPhoneOtherChannel = mPhoneOtherChannel; 740 prefs->mPhoneOtherChannel = mPhoneOtherChannel;
741 prefs->mPhoneOtherMessage = mPhoneOtherMessage; 741 prefs->mPhoneOtherMessage = mPhoneOtherMessage;
742 prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters; 742 prefs->mPhoneOtherMessageParameters = mPhoneOtherMessageParameters;
743 743
744 prefs->mFaxClient = mFaxClient; 744 prefs->mFaxClient = mFaxClient;
745 prefs->mFaxOtherChannel = mFaxOtherChannel; 745 prefs->mFaxOtherChannel = mFaxOtherChannel;
746 prefs->mFaxOtherMessage = mFaxOtherMessage; 746 prefs->mFaxOtherMessage = mFaxOtherMessage;
747 prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters; 747 prefs->mFaxOtherMessageParameters = mFaxOtherMessageParameters;
748 748
749 prefs->mSMSClient = mSMSClient; 749 prefs->mSMSClient = mSMSClient;
750 prefs->mSMSOtherChannel = mSMSOtherChannel; 750 prefs->mSMSOtherChannel = mSMSOtherChannel;
751 prefs->mSMSOtherMessage = mSMSOtherMessage; 751 prefs->mSMSOtherMessage = mSMSOtherMessage;
752 prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters; 752 prefs->mSMSOtherMessageParameters = mSMSOtherMessageParameters;
753 753
754 prefs->mPagerClient = mPagerClient; 754 prefs->mPagerClient = mPagerClient;
755 prefs->mPagerOtherChannel = mPagerOtherChannel; 755 prefs->mPagerOtherChannel = mPagerOtherChannel;
756 prefs->mPagerOtherMessage = mPagerOtherMessage; 756 prefs->mPagerOtherMessage = mPagerOtherMessage;
757 prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters; 757 prefs->mPagerOtherMessageParameters = mPagerOtherMessageParameters;
758 758
759 759
760 prefs->mSipClient = mSipClient; 760 prefs->mSipClient = mSipClient;
761 prefs->mSipOtherChannel = mSipOtherChannel; 761 prefs->mSipOtherChannel = mSipOtherChannel;
762 prefs->mSipOtherMessage = mSipOtherMessage; 762 prefs->mSipOtherMessage = mSipOtherMessage;
763 prefs->mSipOtherMessageParameters = mSipOtherMessageParameters; 763 prefs->mSipOtherMessageParameters = mSipOtherMessageParameters;
764 764
765 //release the cache that other views can access the changed values instantanious 765 //release the cache that other views can access the changed values instantanious
766 ExternalAppHandler::instance()->loadConfig(); 766 ExternalAppHandler::instance()->loadConfig();
767 KPimGlobalPrefs::instance()->setGlobalConfig(); 767 KPimGlobalPrefs::instance()->setGlobalConfig();
768} 768}
769 769
770 770
771void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text, 771void KDEPIMConfigWidget::setCombo(QComboBox *combo, const QString & text,
772 const QStringList *tags) 772 const QStringList *tags)
773{ 773{
774 if (tags) { 774 if (tags) {
775 int i = tags->findIndex(text); 775 int i = tags->findIndex(text);
776 if (i > 0) combo->setCurrentItem(i); 776 if (i > 0) combo->setCurrentItem(i);
777 } else { 777 } else {
778 for(int i=0;i<combo->count();++i) { 778 for(int i=0;i<combo->count();++i) {
779 if (combo->text(i) == text) { 779 if (combo->text(i) == text) {
780 combo->setCurrentItem(i); 780 combo->setCurrentItem(i);
781 break; 781 break;
782 } 782 }
783 } 783 }
784 } 784 }
785} 785}
786 786
787 787
788void KDEPIMConfigWidget::textChanged( const QString& text ) 788void KDEPIMConfigWidget::textChanged( const QString& text )
789{ 789{