-rw-r--r-- | korganizer/koeventviewer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 92d2a80..c0acf34 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -170,25 +170,25 @@ void KOEventViewer::setSource(const QString& n) | |||
170 | //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); | 170 | //requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); |
171 | // the result should now arrive through method insertAttendees | 171 | // the result should now arrive through method insertAttendees |
172 | //QString uid = "uid:"+(*it).uid(); | 172 | //QString uid = "uid:"+(*it).uid(); |
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 | ExternalAppHandler::instance()->mailToOneContact( n.mid(7) ); | 182 | ExternalAppHandler::instance()->mailToOneContact( n.mid(7) ); |
183 | //QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); | 183 | //QCopEnvelope e("QPE/Application/ompi", "newMail(QString)" ); |
184 | //e << n.mid(7); | 184 | //e << n.mid(7); |
185 | } | 185 | } |
186 | //#endif | 186 | //#endif |
187 | 187 | ||
188 | } | 188 | } |
189 | 189 | ||
190 | 190 | ||
191 | #ifndef KORG_NODCOP | 191 | #ifndef KORG_NODCOP |
192 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; | 192 | kdDebug() << "KOEventViewer::setSource(): " << n << endl; |
193 | QString tmpStr; | 193 | QString tmpStr; |
194 | if (n.startsWith("mailto:")) { | 194 | if (n.startsWith("mailto:")) { |
@@ -346,25 +346,25 @@ void KOEventViewer::appendEvent(Event *event, int mode ) | |||
346 | mText.append(i18n("<p><b>To:</b> %1</p>") | 346 | mText.append(i18n("<p><b>To:</b> %1</p>") |
347 | .arg(event->dtEndStr(shortDate))); | 347 | .arg(event->dtEndStr(shortDate))); |
348 | } else { | 348 | } else { |
349 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") | 349 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") |
350 | .arg(event->dtStartTimeStr()) | 350 | .arg(event->dtStartTimeStr()) |
351 | .arg(event->dtEndTimeStr())); | 351 | .arg(event->dtEndTimeStr())); |
352 | mText.append(i18n("<p><b>On:</b> %1</p> ") | 352 | mText.append(i18n("<p><b>On:</b> %1</p> ") |
353 | .arg(event->dtStartDateStr( shortDate ))); | 353 | .arg(event->dtStartDateStr( shortDate ))); |
354 | } | 354 | } |
355 | } | 355 | } |
356 | if (!event->location().isEmpty()) { | 356 | if (!event->location().isEmpty()) { |
357 | addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); | 357 | addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); |
358 | mMailSubject += i18n(" at ") + event->location(); | 358 | mMailSubject += " (" + i18n("Location: ") + event->location() + ")"; |
359 | } | 359 | } |
360 | if (event->doesRecur()) { | 360 | if (event->doesRecur()) { |
361 | 361 | ||
362 | QString recurText = event->recurrenceText(); | 362 | QString recurText = event->recurrenceText(); |
363 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); | 363 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); |
364 | bool ok; | 364 | bool ok; |
365 | QDate start = QDate::currentDate(); | 365 | QDate start = QDate::currentDate(); |
366 | QDateTime next; | 366 | QDateTime next; |
367 | next = event->getNextOccurence( QDateTime::currentDateTime() , &ok ); | 367 | next = event->getNextOccurence( QDateTime::currentDateTime() , &ok ); |
368 | if ( ok ) { | 368 | if ( ok ) { |
369 | if ( wideScreen ){ | 369 | if ( wideScreen ){ |
370 | addTag("p",i18n("<b>Next recurrence is on:</b>") +" " + KGlobal::locale()->formatDate( next.date(), shortDate ) ); | 370 | addTag("p",i18n("<b>Next recurrence is on:</b>") +" " + KGlobal::locale()->formatDate( next.date(), shortDate ) ); |
@@ -505,31 +505,32 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
505 | 505 | ||
506 | 506 | ||
507 | 507 | ||
508 | if (event->doesRecur()) { | 508 | if (event->doesRecur()) { |
509 | 509 | ||
510 | QString recurText = event->recurrence()->recurrenceText(); | 510 | QString recurText = event->recurrence()->recurrenceText(); |
511 | addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); | 511 | addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); |
512 | 512 | ||
513 | } | 513 | } |
514 | if (event->hasStartDate()) { | 514 | if (event->hasStartDate()) { |
515 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); | 515 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); |
516 | } | 516 | } |
517 | if (!event->location().isEmpty()) { | ||
518 | mMailSubject += " (" + i18n("Location: ") + event->location() + ")"; | ||
519 | } | ||
517 | if (event->hasDueDate()) { | 520 | if (event->hasDueDate()) { |
518 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); | 521 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); |
519 | mMailSubject += i18n(" - " )+event->dtDueStr( true ); | ||
520 | } | 522 | } |
521 | if (!event->location().isEmpty()) { | 523 | if (!event->location().isEmpty()) { |
522 | addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); | 524 | addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); |
523 | mMailSubject += i18n(" at ") + event->location(); | ||
524 | } | 525 | } |
525 | mText.append(i18n("<p><b>Priority:</b> %2</p>") | 526 | mText.append(i18n("<p><b>Priority:</b> %2</p>") |
526 | .arg(QString::number(event->priority()))); | 527 | .arg(QString::number(event->priority()))); |
527 | 528 | ||
528 | if (event->isAlarmEnabled()) { | 529 | if (event->isAlarmEnabled()) { |
529 | Alarm *alarm =event->alarms().first() ; | 530 | Alarm *alarm =event->alarms().first() ; |
530 | QDateTime t = alarm->time(); | 531 | QDateTime t = alarm->time(); |
531 | if (event->doesRecur()) { | 532 | if (event->doesRecur()) { |
532 | bool ok = false; | 533 | bool ok = false; |
533 | int offset = 0; | 534 | int offset = 0; |
534 | QDateTime next = event->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ; | 535 | QDateTime next = event->getNextAlarmDateTime(& ok, &offset, QDateTime::currentDateTime() ) ; |
535 | if ( ok ) { | 536 | if ( ok ) { |