summaryrefslogtreecommitdiffabout
path: root/libkdepim/externalapphandler.cpp
Unidiff
Diffstat (limited to 'libkdepim/externalapphandler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/externalapphandler.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index 59be506..f376e6c 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -658,384 +658,386 @@ bool ExternalAppHandler::isSIPAppAvailable()
658 658
659 659
660//calls the emailapplication with a number of attachments that need to be send (Seperated by Comma) 660//calls the emailapplication with a number of attachments that need to be send (Seperated by Comma)
661bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QString& urls ) 661bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QString& urls )
662{ 662{
663 663
664#ifndef DESKTOP_VERSION 664#ifndef DESKTOP_VERSION
665 QString channel; 665 QString channel;
666 QString message2; 666 QString message2;
667 QString parameters2; 667 QString parameters2;
668 668
669 669
670 int client = KPimGlobalPrefs::instance()->mEmailClient; 670 int client = KPimGlobalPrefs::instance()->mEmailClient;
671 if (client == KPimGlobalPrefs::OTHER_EMC) 671 if (client == KPimGlobalPrefs::OTHER_EMC)
672 { 672 {
673 channel = KPimGlobalPrefs::instance()->mEmailOtherChannel; 673 channel = KPimGlobalPrefs::instance()->mEmailOtherChannel;
674 message2 = KPimGlobalPrefs::instance()->mEmailOtherMessage; 674 message2 = KPimGlobalPrefs::instance()->mEmailOtherMessage;
675 parameters2 = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters; 675 parameters2 = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters;
676 } 676 }
677 else 677 else
678 { 678 {
679 DefaultAppItem* dai = getDefaultItem(EMAIL, client); 679 DefaultAppItem* dai = getDefaultItem(EMAIL, client);
680 if (!dai) 680 if (!dai)
681 { 681 {
682 qDebug("could not find configured email application."); 682 qDebug("could not find configured email application.");
683 return false; 683 return false;
684 } 684 }
685 channel = dai->_channel; 685 channel = dai->_channel;
686 message2 = dai->_message2; 686 message2 = dai->_message2;
687 parameters2 = dai->_parameters2; 687 parameters2 = dai->_parameters2;
688 } 688 }
689 689
690 //first check if one of the mailers need the emails right in the message. 690 //first check if one of the mailers need the emails right in the message.
691 message2 = translateMessage(message2, emails, urls); 691 message2 = translateMessage(message2, emails, urls);
692 692
693 693
694#ifdef DEBUG_EXT_APP_HANDLER 694#ifdef DEBUG_EXT_APP_HANDLER
695 qDebug("4Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1()); 695 qDebug("4Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1());
696 qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1()); 696 qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1());
697#endif 697#endif
698 698
699 699
700 QCopEnvelope e(channel.latin1(), message2.latin1()); 700 QCopEnvelope e(channel.latin1(), message2.latin1());
701 //US we need no names in the To field. The emailadresses are enough 701 //US we need no names in the To field. The emailadresses are enough
702 702
703 passParameters(&e, parameters2, emails, urls); 703 passParameters(&e, parameters2, emails, urls);
704 704
705 705
706 706
707#else 707#else
708 //qDebug("mtmc %s %s ", emails.latin1(), urls.latin1()); 708 //qDebug("mtmc %s %s ", emails.latin1(), urls.latin1());
709 709
710 QString channel; 710 QString channel;
711 QString message2; 711 QString message2;
712 QString parameters2; 712 QString parameters2;
713 QString message; 713 QString message;
714 QString parameters; 714 QString parameters;
715 715
716 716
717 int client = KPimGlobalPrefs::instance()->mEmailClient; 717 int client = KPimGlobalPrefs::instance()->mEmailClient;
718 if (client == KPimGlobalPrefs::OTHER_EMC) 718 if (client == KPimGlobalPrefs::OTHER_EMC)
719 { 719 {
720 channel = KPimGlobalPrefs::instance()->mEmailOtherChannel; 720 channel = KPimGlobalPrefs::instance()->mEmailOtherChannel;
721 message = KPimGlobalPrefs::instance()->mEmailOtherMessage; 721 message = KPimGlobalPrefs::instance()->mEmailOtherMessage;
722 message2 = KPimGlobalPrefs::instance()->mEmailOtherMessage2; 722 message2 = KPimGlobalPrefs::instance()->mEmailOtherMessage2;
723 parameters = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters; 723 parameters = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters;
724 parameters2 = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters2; 724 parameters2 = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters2;
725 } 725 }
726 else 726 else
727 { 727 {
728 DefaultAppItem* dai = getDefaultItem(EMAIL, client); 728 DefaultAppItem* dai = getDefaultItem(EMAIL, client);
729 if (!dai) 729 if (!dai)
730 { 730 {
731 qDebug("could not find configured email application."); 731 qDebug("could not find configured email application.");
732 return false; 732 return false;
733 } 733 }
734 channel = dai->_channel; 734 channel = dai->_channel;
735 message2 = dai->_message2; 735 message2 = dai->_message2;
736 parameters2 = dai->_parameters2; 736 parameters2 = dai->_parameters2;
737 message = dai->_message; 737 message = dai->_message;
738 parameters = dai->_parameters; 738 parameters = dai->_parameters;
739 } 739 }
740 740
741 //first check if one of the mailers need the emails right in the message. 741 //first check if one of the mailers need the emails right in the message.
742 message2 = translateMessage(message2, emails, urls); 742 message2 = translateMessage(message2, emails, urls);
743#ifdef DEBUG_EXT_APP_HANDLER 743#ifdef DEBUG_EXT_APP_HANDLER
744 qDebug("4Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1()); 744 qDebug("4Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message2.latin1());
745 qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1()); 745 qDebug("passing emailadresses(%s), attachmenturls(%s) as parameters in the form %s to QCopEnvelope", emails.latin1() , urls.latin1(), parameters2.latin1());
746#endif 746#endif
747 qDebug("%s --- %s %s --- %s %s", channel.latin1(), message.latin1(),message2.latin1(), parameters.latin1(), parameters2.latin1() ); 747 qDebug("%s --- %s %s --- %s %s", channel.latin1(), message.latin1(),message2.latin1(), parameters.latin1(), parameters2.latin1() );
748 //KMessageBox::sorry( 0, message2 ); 748 //KMessageBox::sorry( 0, message2 );
749 QProcess * proc = new QProcess( this ); 749 QProcess * proc = new QProcess( this );
750 int i = 0; 750 int i = 0;
751 proc->addArgument( channel ); 751 proc->addArgument( channel );
752 752
753 if ( message.find (" " ) > 0 ) { 753 if ( message.find (" " ) > 0 ) {
754 QStringList list = QStringList::split( " ", message ); 754 QStringList list = QStringList::split( " ", message );
755 int i = 0; 755 int i = 0;
756 while ( i < list.count ( ) ) { 756 while ( i < list.count ( ) ) {
757 //qDebug("add%sdd ",list[i].latin1() ); 757 //qDebug("add%sdd ",list[i].latin1() );
758 proc->addArgument( list[i] ); 758 proc->addArgument( list[i] );
759 //KMessageBox::sorry( 0,list[i]); 759 //KMessageBox::sorry( 0,list[i]);
760 ++i; 760 ++i;
761 } 761 }
762 } else { 762 } else {
763 proc->addArgument(message ); 763 proc->addArgument(message );
764 //KMessageBox::sorry( 0, message ); 764 //KMessageBox::sorry( 0, message );
765 765
766 } 766 }
767 767
768 parameters2 = translateMessage(parameters2, urls, "" ); 768 parameters2 = translateMessage(parameters2, urls, "" );
769 QString arg = "to='%1'"; 769 QString arg = "to='%1'";
770 arg = arg.arg( emails ) + ","+parameters2;; 770 arg = arg.arg( emails ) + ","+parameters2;;
771 771
772 //KMessageBox::sorry( 0,arg ); 772 //KMessageBox::sorry( 0,arg );
773 //qDebug("2add%sdd ",arg.latin1() ); 773 //qDebug("2add%sdd ",arg.latin1() );
774 proc->addArgument( arg); 774 proc->addArgument( arg);
775 proc->launch(""); 775 proc->launch("");
776#endif 776#endif
777 777
778 return true; 778 return true;
779} 779}
780 780
781/************************************************************************** 781/**************************************************************************
782 * 782 *
783 **************************************************************************/ 783 **************************************************************************/
784 784
785 785
786//calls the emailapplication and creates a mail with parameter emails as recipients 786//calls the emailapplication and creates a mail with parameter emails as recipients
787bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& emailadress ) 787bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& emailadress )
788{ 788{
789 789
790 QString channel; 790 QString channel;
791 QString message; 791 QString message;
792 QString parameters; 792 QString parameters;
793 793
794 794
795 int client = KPimGlobalPrefs::instance()->mEmailClient; 795 int client = KPimGlobalPrefs::instance()->mEmailClient;
796 if (client == KPimGlobalPrefs::OTHER_EMC) 796 if (client == KPimGlobalPrefs::OTHER_EMC)
797 { 797 {
798 channel = KPimGlobalPrefs::instance()->mEmailOtherChannel; 798 channel = KPimGlobalPrefs::instance()->mEmailOtherChannel;
799 message = KPimGlobalPrefs::instance()->mEmailOtherMessage; 799 message = KPimGlobalPrefs::instance()->mEmailOtherMessage;
800 parameters = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters; 800 parameters = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters;
801 } 801 }
802 else 802 else
803 { 803 {
804 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(EMAIL, client); 804 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(EMAIL, client);
805 if (!dai) 805 if (!dai)
806 { 806 {
807 qDebug("could not find configured email application."); 807 qDebug("could not find configured email application.");
808 return false; 808 return false;
809 } 809 }
810 channel = dai->_channel; 810 channel = dai->_channel;
811 message = dai->_message; 811 message = dai->_message;
812 parameters = dai->_parameters; 812 parameters = dai->_parameters;
813 } 813 }
814 814
815#ifdef DESKTOP_VERSION 815#ifdef DESKTOP_VERSION
816 //message = channel + " " +message + " \""+ parameters + "\""; 816 //message = channel + " " +message + " \""+ parameters + "\"";
817#endif 817#endif
818 //first check if one of the mailers need the emails right in the message. 818 //first check if one of the mailers need the emails right in the message.
819 message = translateMessage(message, name, emailadress); 819 message = translateMessage(message, name, emailadress);
820 820
821#ifdef DEBUG_EXT_APP_HANDLER 821#ifdef DEBUG_EXT_APP_HANDLER
822 qDebug("5Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 822 qDebug("5Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
823 qDebug("passing name(%s), emailadresses(%s) as parameters in the form %s to QCopEnvelope", name.latin1(), emailadress.latin1(), parameters.latin1()); 823 qDebug("passing name(%s), emailadresses(%s) as parameters in the form %s to QCopEnvelope", name.latin1(), emailadress.latin1(), parameters.latin1());
824#endif 824#endif
825 825
826#ifndef DESKTOP_VERSION 826#ifndef DESKTOP_VERSION
827 QCopEnvelope e(channel.latin1(), message.latin1()); 827 QCopEnvelope e(channel.latin1(), message.latin1());
828 //US we need no names in the To field. The emailadresses are enough 828 //US we need no names in the To field. The emailadresses are enough
829 829
830 passParameters(&e, parameters, name, emailadress); 830 passParameters(&e, parameters, name, emailadress);
831#else // DESKTOP_VERSION 831#else // DESKTOP_VERSION
832 832
833 //KMessageBox::sorry( 0,channel ); 833 //KMessageBox::sorry( 0,channel );
834 QProcess * proc = new QProcess( this ); 834 QProcess * proc = new QProcess( this );
835 proc->addArgument( channel ); 835 proc->addArgument( channel );
836 if ( message.find (" " ) > 0 ) { 836 if ( message.find (" " ) > 0 ) {
837 QStringList list = QStringList::split( " ", message ); 837 QStringList list = QStringList::split( " ", message );
838 int i = 0; 838 int i = 0;
839 while ( i < list.count ( ) ) { 839 while ( i < list.count ( ) ) {
840 //qDebug("add%sdd ",list[i].latin1() ); 840 //qDebug("add%sdd ",list[i].latin1() );
841 proc->addArgument( list[i] ); 841 proc->addArgument( list[i] );
842 //KMessageBox::sorry( 0,list[i]); 842 //KMessageBox::sorry( 0,list[i]);
843 ++i; 843 ++i;
844 } 844 }
845 } else { 845 } else {
846 proc->addArgument(message ); 846 proc->addArgument(message );
847 847
848 } 848 }
849 parameters = translateMessage(parameters, name, emailadress); 849 parameters = translateMessage(parameters, name, emailadress);
850
851 //KMessageBox::information(0,parameters);
850 proc->addArgument( parameters ); 852 proc->addArgument( parameters );
851 proc->launch(""); 853 proc->launch("");
852#endif 854#endif
853 855
854 return true; 856 return true;
855} 857}
856 858
857/************************************************************************** 859/**************************************************************************
858 * 860 *
859 **************************************************************************/ 861 **************************************************************************/
860 862
861//calls the emailapplication and creates a mail with parameter as recipients 863//calls the emailapplication and creates a mail with parameter as recipients
862// parameters format is 864// parameters format is
863// NAME <EMAIL>:SUBJECT 865// NAME <EMAIL>:SUBJECT
864bool ExternalAppHandler::mailToOneContact( const QString& adressline ) 866bool ExternalAppHandler::mailToOneContact( const QString& adressline )
865{ 867{
866 QString line = adressline; 868 QString line = adressline;
867 869
868 int first = line.find( "<"); 870 int first = line.find( "<");
869 int last = line.find( ">"); 871 int last = line.find( ">");
870 QString name = line.left(first); 872 QString name = line.left(first);
871 QString emailadress = line.mid(first+1, last-first-1); 873 QString emailadress = line.mid(first+1, last-first-1);
872 874
873 //Subject can not be handled right now. 875 //Subject can not be handled right now.
874 return mailToOneContact( name, emailadress ); 876 return mailToOneContact( name, emailadress );
875 877
876} 878}
877 879
878 880
879/************************************************************************** 881/**************************************************************************
880 * 882 *
881 **************************************************************************/ 883 **************************************************************************/
882 884
883//calls the phoneapplication with the number 885//calls the phoneapplication with the number
884bool ExternalAppHandler::callByPhone( const QString& phonenumber ) 886bool ExternalAppHandler::callByPhone( const QString& phonenumber )
885{ 887{
886#ifndef DESKTOP_VERSION 888#ifndef DESKTOP_VERSION
887 QString channel; 889 QString channel;
888 QString message; 890 QString message;
889 QString parameters; 891 QString parameters;
890 892
891 893
892 int client = KPimGlobalPrefs::instance()->mPhoneClient; 894 int client = KPimGlobalPrefs::instance()->mPhoneClient;
893 if (client == KPimGlobalPrefs::OTHER_PHC) 895 if (client == KPimGlobalPrefs::OTHER_PHC)
894 { 896 {
895 channel = KPimGlobalPrefs::instance()->mPhoneOtherChannel; 897 channel = KPimGlobalPrefs::instance()->mPhoneOtherChannel;
896 message = KPimGlobalPrefs::instance()->mPhoneOtherMessage; 898 message = KPimGlobalPrefs::instance()->mPhoneOtherMessage;
897 parameters = KPimGlobalPrefs::instance()->mPhoneOtherMessageParameters; 899 parameters = KPimGlobalPrefs::instance()->mPhoneOtherMessageParameters;
898 } 900 }
899 else 901 else
900 { 902 {
901 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PHONE, client); 903 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PHONE, client);
902 if (!dai) 904 if (!dai)
903 { 905 {
904 qDebug("could not find configured phone application."); 906 qDebug("could not find configured phone application.");
905 return false; 907 return false;
906 } 908 }
907 channel = dai->_channel; 909 channel = dai->_channel;
908 message = dai->_message; 910 message = dai->_message;
909 parameters = dai->_parameters; 911 parameters = dai->_parameters;
910 } 912 }
911 913
912 914
913 //first check if one of the mailers need the emails right in the message. 915 //first check if one of the mailers need the emails right in the message.
914 message = translateMessage(message, phonenumber, ""); 916 message = translateMessage(message, phonenumber, "");
915 917
916 918
917#ifdef DEBUG_EXT_APP_HANDLER 919#ifdef DEBUG_EXT_APP_HANDLER
918 qDebug("6Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 920 qDebug("6Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
919 qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); 921 qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1());
920#endif 922#endif
921 923
922 QCopEnvelope e(channel.latin1(), message.latin1()); 924 QCopEnvelope e(channel.latin1(), message.latin1());
923 //US we need no names in the To field. The emailadresses are enough 925 //US we need no names in the To field. The emailadresses are enough
924 926
925 passParameters(&e, parameters, phonenumber, ""); 927 passParameters(&e, parameters, phonenumber, "");
926 928
927 929
928#else 930#else
929 KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) ); 931 KMessageBox::sorry( 0, i18n( "This version does not support phonecalls." ) );
930#endif 932#endif
931 933
932 934
933 return true; 935 return true;
934} 936}
935 937
936/************************************************************************** 938/**************************************************************************
937 * 939 *
938 **************************************************************************/ 940 **************************************************************************/
939 941
940//calls the smsapplication with the number 942//calls the smsapplication with the number
941bool ExternalAppHandler::callBySMS( const QString& phonenumber ) 943bool ExternalAppHandler::callBySMS( const QString& phonenumber )
942{ 944{
943#ifndef DESKTOP_VERSION 945#ifndef DESKTOP_VERSION
944 QString channel; 946 QString channel;
945 QString message; 947 QString message;
946 QString parameters; 948 QString parameters;
947 949
948 950
949 int client = KPimGlobalPrefs::instance()->mSMSClient; 951 int client = KPimGlobalPrefs::instance()->mSMSClient;
950 if (client == KPimGlobalPrefs::OTHER_SMC) 952 if (client == KPimGlobalPrefs::OTHER_SMC)
951 { 953 {
952 channel = KPimGlobalPrefs::instance()->mSMSOtherChannel; 954 channel = KPimGlobalPrefs::instance()->mSMSOtherChannel;
953 message = KPimGlobalPrefs::instance()->mSMSOtherMessage; 955 message = KPimGlobalPrefs::instance()->mSMSOtherMessage;
954 parameters = KPimGlobalPrefs::instance()->mSMSOtherMessageParameters; 956 parameters = KPimGlobalPrefs::instance()->mSMSOtherMessageParameters;
955 } 957 }
956 else 958 else
957 { 959 {
958 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SMS, client); 960 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(SMS, client);
959 if (!dai) 961 if (!dai)
960 { 962 {
961 qDebug("could not find configured sms application."); 963 qDebug("could not find configured sms application.");
962 return false; 964 return false;
963 } 965 }
964 channel = dai->_channel; 966 channel = dai->_channel;
965 message = dai->_message; 967 message = dai->_message;
966 parameters = dai->_parameters; 968 parameters = dai->_parameters;
967 } 969 }
968 970
969 971
970 //first check if one of the mailers need the emails right in the message. 972 //first check if one of the mailers need the emails right in the message.
971 message = translateMessage(message, phonenumber, ""); 973 message = translateMessage(message, phonenumber, "");
972 974
973 975
974#ifdef DEBUG_EXT_APP_HANDLER 976#ifdef DEBUG_EXT_APP_HANDLER
975 qDebug("7Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 977 qDebug("7Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
976 qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1()); 978 qDebug("passing phonenumber(%s) as parameter in the form %s to QCopEnvelope", phonenumber.latin1(), parameters.latin1());
977#endif 979#endif
978 980
979 QCopEnvelope e(channel.latin1(), message.latin1()); 981 QCopEnvelope e(channel.latin1(), message.latin1());
980 //US we need no names in the To field. The emailadresses are enough 982 //US we need no names in the To field. The emailadresses are enough
981 983
982 passParameters(&e, parameters, phonenumber, ""); 984 passParameters(&e, parameters, phonenumber, "");
983 985
984 986
985#else 987#else
986 KMessageBox::sorry( 0, i18n( "This version does not support the sending of sms." ) ); 988 KMessageBox::sorry( 0, i18n( "This version does not support the sending of sms." ) );
987#endif 989#endif
988 990
989 991
990 return true; 992 return true;
991} 993}
992 994
993/************************************************************************** 995/**************************************************************************
994 * 996 *
995 **************************************************************************/ 997 **************************************************************************/
996 998
997//calls the pagerapplication with the number 999//calls the pagerapplication with the number
998bool ExternalAppHandler::callByPager( const QString& pagernumber ) 1000bool ExternalAppHandler::callByPager( const QString& pagernumber )
999{ 1001{
1000#ifndef DESKTOP_VERSION 1002#ifndef DESKTOP_VERSION
1001 QString channel; 1003 QString channel;
1002 QString message; 1004 QString message;
1003 QString parameters; 1005 QString parameters;
1004 1006
1005 1007
1006 int client = KPimGlobalPrefs::instance()->mPagerClient; 1008 int client = KPimGlobalPrefs::instance()->mPagerClient;
1007 if (client == KPimGlobalPrefs::OTHER_PAC) 1009 if (client == KPimGlobalPrefs::OTHER_PAC)
1008 { 1010 {
1009 channel = KPimGlobalPrefs::instance()->mPagerOtherChannel; 1011 channel = KPimGlobalPrefs::instance()->mPagerOtherChannel;
1010 message = KPimGlobalPrefs::instance()->mPagerOtherMessage; 1012 message = KPimGlobalPrefs::instance()->mPagerOtherMessage;
1011 parameters = KPimGlobalPrefs::instance()->mPagerOtherMessageParameters; 1013 parameters = KPimGlobalPrefs::instance()->mPagerOtherMessageParameters;
1012 } 1014 }
1013 else 1015 else
1014 { 1016 {
1015 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PAGER, client); 1017 DefaultAppItem* dai = ExternalAppHandler::getDefaultItem(PAGER, client);
1016 if (!dai) 1018 if (!dai)
1017 { 1019 {
1018 qDebug("could not find configured pager application."); 1020 qDebug("could not find configured pager application.");
1019 return false; 1021 return false;
1020 } 1022 }
1021 channel = dai->_channel; 1023 channel = dai->_channel;
1022 message = dai->_message; 1024 message = dai->_message;
1023 parameters = dai->_parameters; 1025 parameters = dai->_parameters;
1024 } 1026 }
1025 1027
1026 1028
1027 //first check if one of the mailers need the emails right in the message. 1029 //first check if one of the mailers need the emails right in the message.
1028 message = translateMessage(message, pagernumber, ""); 1030 message = translateMessage(message, pagernumber, "");
1029 1031
1030 1032
1031#ifdef DEBUG_EXT_APP_HANDLER 1033#ifdef DEBUG_EXT_APP_HANDLER
1032 qDebug("8Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1()); 1034 qDebug("8Using QCopEnvelope e(\"%s\",\"%s\")", channel.latin1(), message.latin1());
1033 qDebug("passing pagernumber(%s) as parameter in the form %s to QCopEnvelope", pagernumber.latin1(), parameters.latin1()); 1035 qDebug("passing pagernumber(%s) as parameter in the form %s to QCopEnvelope", pagernumber.latin1(), parameters.latin1());
1034#endif 1036#endif
1035 1037
1036 QCopEnvelope e(channel.latin1(), message.latin1()); 1038 QCopEnvelope e(channel.latin1(), message.latin1());
1037 //US we need no names in the To field. The emailadresses are enough 1039 //US we need no names in the To field. The emailadresses are enough
1038 1040
1039 passParameters(&e, parameters, pagernumber, ""); 1041 passParameters(&e, parameters, pagernumber, "");
1040 1042
1041 1043