summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp24
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
@@ -57,9 +57,9 @@
#include <qpainter.h>
#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)
: QTextBrowser(parent,name)
@@ -173,16 +173,17 @@ void KOEventViewer::setSource(const QString& n)
#endif
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 );
} else if ( n.mid(7,4) == "RSVP" ) {
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
}
@@ -239,14 +240,21 @@ void KOEventViewer::mailToAttendees( bool all )
for(a=attendees.first();a;a=attendees.next()) {
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
}
@@ -670,7 +678,7 @@ 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;
mText += "<IMG src=\"" + iconPath + "\">";