Diffstat (limited to 'korganizer/koeventviewer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventviewer.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 976ee2c..02b54da 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -58,7 +58,7 @@ #include <qpaintdevicemetrics.h> #else //DESKTOP_VERSION -#include <externalapphandler.h> #include <qtopia/qcopenvelope_qws.h> #endif //DESKTOP_VERSION +#include <externalapphandler.h> KOEventViewer::KOEventViewer(QWidget *parent,const char *name) @@ -174,5 +174,5 @@ void KOEventViewer::setSource(const QString& n) if ( n.left(6) == "mailto" ) { // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); -#ifndef DESKTOP_VERSION + //#ifndef DESKTOP_VERSION if ( n.mid(7,3) == "ALL" ) { mailToAttendees( true ); @@ -180,8 +180,9 @@ void KOEventViewer::setSource(const QString& n) mailToAttendees( false ); } else { - QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); - e << n.mid(7); + ExternalAppHandler::instance()->mailToOneContact( n.mid(7) ); + //QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); + //e << n.mid(7); } -#endif + //#endif } @@ -240,12 +241,19 @@ void KOEventViewer::mailToAttendees( bool all ) if ( !all && !a->RSVP() ) continue; if (!a->email().isEmpty()) { - nameList.append (a->name() ); +#ifndef DESKTOP_VERSION + nameList.append (a->realName() ); emailList.append (a->email() ); uidList.append (a->uid() ); +#else + emailList.append(a->realName() +" <" + a->email() +">"); +#endif } } - QString uid = "ComposeMailUIpick2"+mMailSubject; #ifndef DESKTOP_VERSION + QString uid = "ComposeMailUIpick2"+mMailSubject; bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); + +#else + ExternalAppHandler::instance()->mailToMultipleContacts( emailList.join(","), mMailSubject ); #endif @@ -671,5 +679,5 @@ void KOEventViewer::formatAttendees(Incidence *event) if (!a->email().isEmpty()) { if (iconPath) { - mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; + mText += "<a href=\"mailto:" + a->realName() +" <" + a->email() + ">:" + mMailSubject + "\">"; if ( a->RSVP() ) { ++a_count_nr; |