author | zautrix <zautrix> | 2005-10-29 17:26:07 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-29 17:26:07 (UTC) |
commit | a4f17bd35c56280c45bda847b42b7d3a003b0a42 (patch) (side-by-side diff) | |
tree | d0bc9ec6a81ecfb272c88248614f633835c454e8 | |
parent | 898dbabef6d747447999add46201315d04f85f63 (diff) | |
download | kdepimpi-a4f17bd35c56280c45bda847b42b7d3a003b0a42.zip kdepimpi-a4f17bd35c56280c45bda847b42b7d3a003b0a42.tar.gz kdepimpi-a4f17bd35c56280c45bda847b42b7d3a003b0a42.tar.bz2 |
commit
-rw-r--r-- | libkdepim/externalapphandler.cpp | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index edefda4..59be506 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp @@ -717,10 +717,12 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS int client = KPimGlobalPrefs::instance()->mEmailClient; if (client == KPimGlobalPrefs::OTHER_EMC) { channel = KPimGlobalPrefs::instance()->mEmailOtherChannel; - message2 = KPimGlobalPrefs::instance()->mEmailOtherMessage; - parameters2 = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters; + message = KPimGlobalPrefs::instance()->mEmailOtherMessage; + message2 = KPimGlobalPrefs::instance()->mEmailOtherMessage2; + parameters = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters; + parameters2 = KPimGlobalPrefs::instance()->mEmailOtherMessageParameters2; } else { DefaultAppItem* dai = getDefaultItem(EMAIL, client); @@ -744,20 +746,31 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS #endif qDebug("%s --- %s %s --- %s %s", channel.latin1(), message.latin1(),message2.latin1(), parameters.latin1(), parameters2.latin1() ); //KMessageBox::sorry( 0, message2 ); QProcess * proc = new QProcess( this ); - QStringList list = QStringList::split( " ", message ); int i = 0; proc->addArgument( channel ); + + if ( message.find (" " ) > 0 ) { + QStringList list = QStringList::split( " ", message ); + int i = 0; while ( i < list.count ( ) ) { - //qDebug("add%sdd ",list[i].stripWhiteSpace().latin1() ); - proc->addArgument( list[i].stripWhiteSpace() ); + //qDebug("add%sdd ",list[i].latin1() ); + proc->addArgument( list[i] ); + //KMessageBox::sorry( 0,list[i]); ++i; } + } else { + proc->addArgument(message ); + //KMessageBox::sorry( 0, message ); + + } + parameters2 = translateMessage(parameters2, urls, "" ); QString arg = "to='%1'"; arg = arg.arg( emails ) + ","+parameters2;; + //KMessageBox::sorry( 0,arg ); //qDebug("2add%sdd ",arg.latin1() ); proc->addArgument( arg); proc->launch(""); #endif @@ -816,18 +829,24 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e passParameters(&e, parameters, name, emailadress); #else // DESKTOP_VERSION - //KMessageBox::sorry( 0, message ); + //KMessageBox::sorry( 0,channel ); QProcess * proc = new QProcess( this ); + proc->addArgument( channel ); + if ( message.find (" " ) > 0 ) { QStringList list = QStringList::split( " ", message ); int i = 0; - proc->addArgument( channel ); while ( i < list.count ( ) ) { //qDebug("add%sdd ",list[i].latin1() ); proc->addArgument( list[i] ); + //KMessageBox::sorry( 0,list[i]); ++i; } + } else { + proc->addArgument(message ); + + } parameters = translateMessage(parameters, name, emailadress); proc->addArgument( parameters ); proc->launch(""); #endif |