-rw-r--r-- | korganizer/koeventviewer.cpp | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index bac66d3..1f69700 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -52,2 +52,6 @@ #endif +#ifndef DESKTOP_VERSION +#include <qtopia/qcopenvelope_qws.h> +#endif + KOEventViewer::KOEventViewer(QWidget *parent,const char *name) @@ -65,2 +69,4 @@ void KOEventViewer::setSource(const QString& n) { + + if ( n.left(3) == "uid" ) { KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); @@ -93,2 +99,12 @@ void KOEventViewer::setSource(const QString& n) } + return; + } + if ( n.left(6) == "mailto" ) { + // qDebug("KOEventViewer::setSource %s ", n.mid(7).latin1()); +#ifndef DESKTOP_VERSION + QCopEnvelope e("QPE/Application/kmpi", "newMail(QString)" ); + e << n.mid(7); +#endif + + } @@ -172,2 +188,3 @@ void KOEventViewer::appendEvent(Event *event, int mode ) { + mMailSubject = ""; mCurrentIncidence = event; @@ -195,2 +212,3 @@ void KOEventViewer::appendEvent(Event *event, int mode ) } + mMailSubject += i18n( "Meeting " )+ event->summary(); if (event->cancelled ()) { @@ -200,2 +218,3 @@ void KOEventViewer::appendEvent(Event *event, int mode ) mText += "</font>"; + mMailSubject += i18n("(cancelled)"); } @@ -204,2 +223,3 @@ void KOEventViewer::appendEvent(Event *event, int mode ) mText.append(event->location()+"<br>"); + mMailSubject += i18n(" at ") + event->location(); } @@ -240,2 +260,5 @@ void KOEventViewer::appendEvent(Event *event, int mode ) addTag("p", KGlobal::locale()->formatDate( next, shortDate )); + QDateTime nextdt = QDateTime( next, event->dtStart().time()); + mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( nextdt, true ); + } else { @@ -244,2 +267,5 @@ void KOEventViewer::appendEvent(Event *event, int mode ) } + } else { + mMailSubject += i18n(" - " )+event->dtStartStr( true ); + } @@ -276,2 +302,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) { + mMailSubject = ""; mCurrentIncidence = event; @@ -297,2 +324,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) } + mMailSubject += i18n( "Todo " )+ event->summary(); if (event->cancelled ()) { @@ -302,2 +330,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) mText += "</font>"; + mMailSubject += i18n("(cancelled)"); } @@ -307,2 +336,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) mText.append(event->location()+"<br>"); + mMailSubject += i18n(" at ") + event->location(); } @@ -310,2 +340,3 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); + mMailSubject += i18n(" - " )+event->dtDueStr( true ); } @@ -407,5 +438,6 @@ void KOEventViewer::formatAttendees(Incidence *event) + if (!a->email().isEmpty()) { if (iconPath) { - mText += "<a href=\"mailto:" + a->name() +" "+ "<" + a->email() + ">" + "\">"; + mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; mText += "<IMG src=\"" + iconPath + "\">"; |