author | zautrix <zautrix> | 2005-10-29 17:26:07 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-29 17:26:07 (UTC) |
commit | a4f17bd35c56280c45bda847b42b7d3a003b0a42 (patch) (unidiff) | |
tree | d0bc9ec6a81ecfb272c88248614f633835c454e8 /libkdepim | |
parent | 898dbabef6d747447999add46201315d04f85f63 (diff) | |
download | kdepimpi-a4f17bd35c56280c45bda847b42b7d3a003b0a42.zip kdepimpi-a4f17bd35c56280c45bda847b42b7d3a003b0a42.tar.gz kdepimpi-a4f17bd35c56280c45bda847b42b7d3a003b0a42.tar.bz2 |
commit
-rw-r--r-- | libkdepim/externalapphandler.cpp | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index edefda4..59be506 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp | |||
@@ -718,8 +718,10 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS | |||
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 | message2 = KPimGlobalPrefs::instance()->mEmailOtherMessage; | 721 | message = KPimGlobalPrefs::instance()->mEmailOtherMessage; |
722 | parameters2 = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters; | 722 | message2 = KPimGlobalPrefs::instance()->mEmailOtherMessage2; |
723 | parameters = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters; | ||
724 | parameters2 = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters2; | ||
723 | } | 725 | } |
724 | else | 726 | else |
725 | { | 727 | { |
@@ -745,18 +747,29 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS | |||
745 | 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() ); |
746 | //KMessageBox::sorry( 0, message2 ); | 748 | //KMessageBox::sorry( 0, message2 ); |
747 | QProcess * proc = new QProcess( this ); | 749 | QProcess * proc = new QProcess( this ); |
748 | QStringList list = QStringList::split( " ", message ); | ||
749 | int i = 0; | 750 | int i = 0; |
750 | proc->addArgument( channel ); | 751 | proc->addArgument( channel ); |
751 | while ( i < list.count ( ) ) { | 752 | |
752 | //qDebug("add%sdd ",list[i].stripWhiteSpace().latin1() ); | 753 | if ( message.find (" " ) > 0 ) { |
753 | proc->addArgument( list[i].stripWhiteSpace() ); | 754 | QStringList list = QStringList::split( " ", message ); |
755 | int i = 0; | ||
756 | while ( i < list.count ( ) ) { | ||
757 | //qDebug("add%sdd ",list[i].latin1() ); | ||
758 | proc->addArgument( list[i] ); | ||
759 | //KMessageBox::sorry( 0,list[i]); | ||
754 | ++i; | 760 | ++i; |
761 | } | ||
762 | } else { | ||
763 | proc->addArgument(message ); | ||
764 | //KMessageBox::sorry( 0, message ); | ||
765 | |||
755 | } | 766 | } |
767 | |||
756 | parameters2 = translateMessage(parameters2, urls, "" ); | 768 | parameters2 = translateMessage(parameters2, urls, "" ); |
757 | QString arg = "to='%1'"; | 769 | QString arg = "to='%1'"; |
758 | arg = arg.arg( emails ) + ","+parameters2;; | 770 | arg = arg.arg( emails ) + ","+parameters2;; |
759 | 771 | ||
772 | //KMessageBox::sorry( 0,arg ); | ||
760 | //qDebug("2add%sdd ",arg.latin1() ); | 773 | //qDebug("2add%sdd ",arg.latin1() ); |
761 | proc->addArgument( arg); | 774 | proc->addArgument( arg); |
762 | proc->launch(""); | 775 | proc->launch(""); |
@@ -817,15 +830,21 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e | |||
817 | passParameters(&e, parameters, name, emailadress); | 830 | passParameters(&e, parameters, name, emailadress); |
818 | #else // DESKTOP_VERSION | 831 | #else // DESKTOP_VERSION |
819 | 832 | ||
820 | //KMessageBox::sorry( 0, message ); | 833 | //KMessageBox::sorry( 0,channel ); |
821 | QProcess * proc = new QProcess( this ); | 834 | QProcess * proc = new QProcess( this ); |
822 | QStringList list = QStringList::split( " ", message ); | ||
823 | int i = 0; | ||
824 | proc->addArgument( channel ); | 835 | proc->addArgument( channel ); |
825 | while ( i < list.count ( ) ) { | 836 | if ( message.find (" " ) > 0 ) { |
837 | QStringList list = QStringList::split( " ", message ); | ||
838 | int i = 0; | ||
839 | while ( i < list.count ( ) ) { | ||
826 | //qDebug("add%sdd ",list[i].latin1() ); | 840 | //qDebug("add%sdd ",list[i].latin1() ); |
827 | proc->addArgument( list[i] ); | 841 | proc->addArgument( list[i] ); |
842 | //KMessageBox::sorry( 0,list[i]); | ||
828 | ++i; | 843 | ++i; |
844 | } | ||
845 | } else { | ||
846 | proc->addArgument(message ); | ||
847 | |||
829 | } | 848 | } |
830 | parameters = translateMessage(parameters, name, emailadress); | 849 | parameters = translateMessage(parameters, name, emailadress); |
831 | proc->addArgument( parameters ); | 850 | proc->addArgument( parameters ); |
@@ -903,7 +922,7 @@ bool ExternalAppHandler::callByPhone( const QString& phonenumber ) | |||
903 | QCopEnvelope e(channel.latin1(), message.latin1()); | 922 | QCopEnvelope e(channel.latin1(), message.latin1()); |
904 | //US we need no names in the To field. The emailadresses are enough | 923 | //US we need no names in the To field. The emailadresses are enough |
905 | 924 | ||
906 | passParameters(&e, parameters, phonenumber, ""); | 925 | passParameters(&e, parameters, phonenumber, ""); |
907 | 926 | ||
908 | 927 | ||
909 | #else | 928 | #else |