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 | |||
@@ -57,9 +57,9 @@ | |||
57 | #include <qpainter.h> | 57 | #include <qpainter.h> |
58 | #include <qpaintdevicemetrics.h> | 58 | #include <qpaintdevicemetrics.h> |
59 | #else //DESKTOP_VERSION | 59 | #else //DESKTOP_VERSION |
60 | #include <externalapphandler.h> | ||
61 | #include <qtopia/qcopenvelope_qws.h> | 60 | #include <qtopia/qcopenvelope_qws.h> |
62 | #endif //DESKTOP_VERSION | 61 | #endif //DESKTOP_VERSION |
62 | #include <externalapphandler.h> | ||
63 | 63 | ||
64 | KOEventViewer::KOEventViewer(QWidget *parent,const char *name) | 64 | KOEventViewer::KOEventViewer(QWidget *parent,const char *name) |
65 | : QTextBrowser(parent,name) | 65 | : QTextBrowser(parent,name) |
@@ -173,16 +173,17 @@ void KOEventViewer::setSource(const QString& n) | |||
173 | #endif | 173 | #endif |
174 | if ( n.left(6) == "mailto" ) { | 174 | if ( n.left(6) == "mailto" ) { |
175 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); | 175 | // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); |
176 | #ifndef DESKTOP_VERSION | 176 | //#ifndef DESKTOP_VERSION |
177 | if ( n.mid(7,3) == "ALL" ) { | 177 | if ( n.mid(7,3) == "ALL" ) { |
178 | mailToAttendees( true ); | 178 | mailToAttendees( true ); |
179 | } else if ( n.mid(7,4) == "RSVP" ) { | 179 | } else if ( n.mid(7,4) == "RSVP" ) { |
180 | mailToAttendees( false ); | 180 | mailToAttendees( false ); |
181 | } else { | 181 | } else { |
182 | QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); | 182 | ExternalAppHandler::instance()->mailToOneContact( n.mid(7) ); |
183 | e << n.mid(7); | 183 | //QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); |
184 | //e << n.mid(7); | ||
184 | } | 185 | } |
185 | #endif | 186 | //#endif |
186 | 187 | ||
187 | } | 188 | } |
188 | 189 | ||
@@ -239,14 +240,21 @@ void KOEventViewer::mailToAttendees( bool all ) | |||
239 | for(a=attendees.first();a;a=attendees.next()) { | 240 | for(a=attendees.first();a;a=attendees.next()) { |
240 | if ( !all && !a->RSVP() ) continue; | 241 | if ( !all && !a->RSVP() ) continue; |
241 | if (!a->email().isEmpty()) { | 242 | if (!a->email().isEmpty()) { |
242 | nameList.append (a->name() ); | 243 | #ifndef DESKTOP_VERSION |
244 | nameList.append (a->realName() ); | ||
243 | emailList.append (a->email() ); | 245 | emailList.append (a->email() ); |
244 | uidList.append (a->uid() ); | 246 | uidList.append (a->uid() ); |
247 | #else | ||
248 | emailList.append(a->realName() +" <" + a->email() +">"); | ||
249 | #endif | ||
245 | } | 250 | } |
246 | } | 251 | } |
247 | QString uid = "ComposeMailUIpick2"+mMailSubject; | ||
248 | #ifndef DESKTOP_VERSION | 252 | #ifndef DESKTOP_VERSION |
253 | QString uid = "ComposeMailUIpick2"+mMailSubject; | ||
249 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); | 254 | bool res = ExternalAppHandler::instance()->returnNameEmailUidListFromKAPI("QPE/Application/ompi", uid, nameList, emailList, uidList); |
255 | |||
256 | #else | ||
257 | ExternalAppHandler::instance()->mailToMultipleContacts( emailList.join(","), mMailSubject ); | ||
250 | #endif | 258 | #endif |
251 | 259 | ||
252 | } | 260 | } |
@@ -670,7 +678,7 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
670 | 678 | ||
671 | if (!a->email().isEmpty()) { | 679 | if (!a->email().isEmpty()) { |
672 | if (iconPath) { | 680 | if (iconPath) { |
673 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; | 681 | mText += "<a href=\"mailto:" + a->realName() +" <" + a->email() + ">:" + mMailSubject + "\">"; |
674 | if ( a->RSVP() ) { | 682 | if ( a->RSVP() ) { |
675 | ++a_count_nr; | 683 | ++a_count_nr; |
676 | mText += "<IMG src=\"" + iconPath + "\">"; | 684 | mText += "<IMG src=\"" + iconPath + "\">"; |