author | zautrix <zautrix> | 2005-10-29 16:39:40 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-29 16:39:40 (UTC) |
commit | 898dbabef6d747447999add46201315d04f85f63 (patch) (side-by-side diff) | |
tree | fb247cbbd99ca6918400547e16484a58a8ba1523 /korganizer | |
parent | 1360f8e3b5da58b561f868643d2d5f04b874cee7 (diff) | |
download | kdepimpi-898dbabef6d747447999add46201315d04f85f63.zip kdepimpi-898dbabef6d747447999add46201315d04f85f63.tar.gz kdepimpi-898dbabef6d747447999add46201315d04f85f63.tar.bz2 |
commit
-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 @@ -52,19 +52,19 @@ #ifdef DESKTOP_VERSION #include <kabc/addresseedialog.h> #include <kabc/addresseeview.h> #include <qprinter.h> #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) { mSyncMode = false; mColorMode = 0; } @@ -168,26 +168,27 @@ void KOEventViewer::setSource(const QString& n) return; } //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); // the result should now arrive through method insertAttendees //QString uid = "uid:"+(*it).uid(); #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 } #ifndef KORG_NODCOP kdDebug() << "KOEventViewer::setSource(): " << n << endl; QString tmpStr; if (n.startsWith("mailto:")) { @@ -234,24 +235,31 @@ void KOEventViewer::mailToAttendees( bool all ) if (attendees.count() == 0) return; QStringList nameList; QStringList emailList; QStringList uidList; Attendee* a; 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 } void KOEventViewer::addTag(const QString & tag,const QString & text) { int number=text.contains("\n"); QString str = "<" + tag + ">"; QString tmpText=text; @@ -665,17 +673,17 @@ void KOEventViewer::formatAttendees(Incidence *event) if (!a->name().isEmpty()) mText += a->name(); else mText += a->email(); mText += "</a>\n"; #endif 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 + "\">"; } else { ++a_count; mText += "<IMG src=\"" + NOiconPath + "\">"; } |