summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventviewer.cpp
Unidiff
Diffstat (limited to 'korganizer/koeventviewer.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp90
1 files changed, 54 insertions, 36 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index bdad248..fefc778 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -312,9 +312,5 @@ void KOEventViewer::appendEvent(Event *event, int mode )
312 mMailSubject += i18n("(cancelled)"); 312 mMailSubject += i18n("(cancelled)");
313 } 313 }
314 if (!event->location().isEmpty()) { 314
315 addTag("b",i18n("Location: "));
316 mText.append(deTag(event->location())+"<br>");
317 mMailSubject += i18n(" at ") + event->location();
318 }
319 if (event->doesFloat()) { 315 if (event->doesFloat()) {
320 if (event->isMultiDay()) { 316 if (event->isMultiDay()) {
@@ -332,12 +328,16 @@ void KOEventViewer::appendEvent(Event *event, int mode )
332 .arg(event->dtEndStr(shortDate))); 328 .arg(event->dtEndStr(shortDate)));
333 } else { 329 } else {
334 mText.append(i18n("<p><b>On:</b> %1</p> ")
335 .arg(event->dtStartDateStr( shortDate )));
336 mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") 330 mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>")
337 .arg(event->dtStartTimeStr()) 331 .arg(event->dtStartTimeStr())
338 .arg(event->dtEndTimeStr())); 332 .arg(event->dtEndTimeStr()));
333 mText.append(i18n("<p><b>On:</b> %1</p> ")
334 .arg(event->dtStartDateStr( shortDate )));
339 } 335 }
340 } 336 }
341 337 if (!event->location().isEmpty()) {
338 addTag("b",i18n("Location: "));
339 mText.append(deTag(event->location())+"<br>");
340 mMailSubject += i18n(" at ") + event->location();
341 }
342 if (event->recurrence()->doesRecur()) { 342 if (event->recurrence()->doesRecur()) {
343 343
@@ -381,10 +381,5 @@ void KOEventViewer::appendEvent(Event *event, int mode )
381 381
382 382
383 if ( KOPrefs::instance()->mEVshowDetails ) { 383
384 if (!event->description().isEmpty()) {
385 addTag("p",i18n("<b>Details: </b>"));
386 addTag("p",deTag(event->description()));
387 }
388 }
389 formatCategories(event); 384 formatCategories(event);
390 385
@@ -393,13 +388,27 @@ void KOEventViewer::appendEvent(Event *event, int mode )
393 388
394 if ( KOPrefs::instance()->mEVshowCreated ) { 389 if ( KOPrefs::instance()->mEVshowCreated ) {
390#ifdef DESKTOP_VERSION
391 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate ));
392#else
395 addTag("p",i18n("<b>Created: ") +" </b>"); 393 addTag("p",i18n("<b>Created: ") +" </b>");
396 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); 394 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
395#endif
397 396
398 } 397 }
399 if ( KOPrefs::instance()->mEVshowChanged ) { 398 if ( KOPrefs::instance()->mEVshowChanged ) {
399#ifdef DESKTOP_VERSION
400 addTag("p",i18n("<b>Last modified: ") +" </b>" + KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) );
401#else
400 addTag("p",i18n("<b>Last modified: ") +" </b>"); 402 addTag("p",i18n("<b>Last modified: ") +" </b>");
401 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); 403 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
404#endif
402 405
403 } 406 }
407 if ( KOPrefs::instance()->mEVshowDetails ) {
408 if (!event->description().isEmpty()) {
409 addTag("p",i18n("<b>Details: </b>"));
410 addTag("p",deTag(event->description()));
411 }
412 }
404 setText(mText); 413 setText(mText);
405 //QWhatsThis::add(this,mText); 414 //QWhatsThis::add(this,mText);
@@ -450,9 +459,5 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
450 } 459 }
451 460
452 if (!event->location().isEmpty()) { 461
453 addTag("b",i18n("Location: "));
454 mText.append(deTag(event->location())+"<br>");
455 mMailSubject += i18n(" at ") + event->location();
456 }
457 462
458 if (event->recurrence()->doesRecur()) { 463 if (event->recurrence()->doesRecur()) {
@@ -469,5 +474,11 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
469 mMailSubject += i18n(" - " )+event->dtDueStr( true ); 474 mMailSubject += i18n(" - " )+event->dtDueStr( true );
470 } 475 }
471 476 if (!event->location().isEmpty()) {
477 addTag("b",i18n("Location: "));
478 mText.append(deTag(event->location())+"<br>");
479 mMailSubject += i18n(" at ") + event->location();
480 }
481 mText.append(i18n("<p><b>Priority:</b> %2</p>")
482 .arg(QString::number(event->priority())));
472 483
473 if (event->isAlarmEnabled()) { 484 if (event->isAlarmEnabled()) {
@@ -482,18 +493,28 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
482 addTag("b",i18n("Access: ")); 493 addTag("b",i18n("Access: "));
483 mText.append(event->secrecyStr()+"<br>"); 494 mText.append(event->secrecyStr()+"<br>");
484 if ( KOPrefs::instance()->mEVshowDetails ) {
485 if (!event->description().isEmpty()) {
486 addTag("p",i18n("<b>Details: </b>"));
487 addTag("p",deTag(event->description()));
488 }
489 }
490 495
491 formatCategories(event); 496 formatCategories(event);
492 497
493 mText.append(i18n("<p><b>Priority:</b> %2</p>")
494 .arg(QString::number(event->priority())));
495
496 formatReadOnly(event); 498 formatReadOnly(event);
497 formatAttendees(event); 499 formatAttendees(event);
500
501 if ( KOPrefs::instance()->mEVshowCreated ) {
502#ifdef DESKTOP_VERSION
503 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate ));
504#else
505 addTag("p",i18n("<b>Created: ") +" </b>");
506 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
507#endif
508
509 }
510 if ( KOPrefs::instance()->mEVshowChanged ) {
511#ifdef DESKTOP_VERSION
512 addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) );
513#else
514 addTag("p",i18n("<b>Last modified: ") +" </b>");
515 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
516#endif
517
518 }
498 if ( event->relatedTo() ) { 519 if ( event->relatedTo() ) {
499 addTag("b",i18n("Parent todo:<br>")); 520 addTag("b",i18n("Parent todo:<br>"));
@@ -508,13 +529,10 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
508 529
509 } 530 }
510 if ( KOPrefs::instance()->mEVshowCreated ) {
511 addTag("p",i18n("<b>Created: ") +" </b>");
512 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
513 531
532 if ( KOPrefs::instance()->mEVshowDetails ) {
533 if (!event->description().isEmpty()) {
534 addTag("p",i18n("<b>Details: </b>"));
535 addTag("p",deTag(event->description()));
514 } 536 }
515 if ( KOPrefs::instance()->mEVshowChanged ) {
516 addTag("p",i18n("<b>Last modified: ") +" </b>");
517 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
518
519 } 537 }
520 setText(mText); 538 setText(mText);