author | zautrix <zautrix> | 2005-01-30 00:33:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-30 00:33:46 (UTC) |
commit | a8fae20ad7bcb59df9a603c88accf3a10401c2f9 (patch) (unidiff) | |
tree | 12deeef9bae6d470c244ce9a9916c59d6879f9b2 /korganizer/koeventviewer.cpp | |
parent | d94b52aa95cc52aa1bef7c9cd99f43c725ed8042 (diff) | |
download | kdepimpi-a8fae20ad7bcb59df9a603c88accf3a10401c2f9.zip kdepimpi-a8fae20ad7bcb59df9a603c88accf3a10401c2f9.tar.gz kdepimpi-a8fae20ad7bcb59df9a603c88accf3a10401c2f9.tar.bz2 |
f
Diffstat (limited to 'korganizer/koeventviewer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventviewer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 5de667e..2f0fa9e 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -396,48 +396,49 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) | |||
396 | mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); | 396 | mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); |
397 | 397 | ||
398 | } | 398 | } |
399 | setText(mText); | 399 | setText(mText); |
400 | } | 400 | } |
401 | 401 | ||
402 | void KOEventViewer::formatCategories(Incidence *event) | 402 | void KOEventViewer::formatCategories(Incidence *event) |
403 | { | 403 | { |
404 | if (!event->categoriesStr().isEmpty()) { | 404 | if (!event->categoriesStr().isEmpty()) { |
405 | if (event->categories().count() == 1) { | 405 | if (event->categories().count() == 1) { |
406 | addTag("h3",i18n("Category")); | 406 | addTag("h3",i18n("Category")); |
407 | } else { | 407 | } else { |
408 | addTag("h3",i18n("Categories")); | 408 | addTag("h3",i18n("Categories")); |
409 | } | 409 | } |
410 | addTag("p",event->categoriesStr()); | 410 | addTag("p",event->categoriesStr()); |
411 | } | 411 | } |
412 | } | 412 | } |
413 | void KOEventViewer::formatAttendees(Incidence *event) | 413 | void KOEventViewer::formatAttendees(Incidence *event) |
414 | { | 414 | { |
415 | QPtrList<Attendee> attendees = event->attendees(); | 415 | QPtrList<Attendee> attendees = event->attendees(); |
416 | if (attendees.count()) { | 416 | if (attendees.count()) { |
417 | 417 | ||
418 | 418 | ||
419 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); | 419 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); |
420 | QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); | ||
420 | addTag("h3",i18n("Organizer")); | 421 | addTag("h3",i18n("Organizer")); |
421 | mText.append("<ul><li>"); | 422 | mText.append("<ul><li>"); |
422 | #ifndef KORG_NOKABC | 423 | #ifndef KORG_NOKABC |
423 | 424 | ||
424 | #ifdef DESKTOP_VERSION | 425 | #ifdef DESKTOP_VERSION |
425 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); | 426 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); |
426 | KABC::Addressee::List addressList; | 427 | KABC::Addressee::List addressList; |
427 | addressList = add_book->findByEmail(event->organizer()); | 428 | addressList = add_book->findByEmail(event->organizer()); |
428 | KABC::Addressee o = addressList.first(); | 429 | KABC::Addressee o = addressList.first(); |
429 | if (!o.isEmpty() && addressList.size()<2) { | 430 | if (!o.isEmpty() && addressList.size()<2) { |
430 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 431 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
431 | mText += o.formattedName(); | 432 | mText += o.formattedName(); |
432 | mText += "</a>\n"; | 433 | mText += "</a>\n"; |
433 | } else { | 434 | } else { |
434 | mText.append(event->organizer()); | 435 | mText.append(event->organizer()); |
435 | } | 436 | } |
436 | #else //DESKTOP_VERSION | 437 | #else //DESKTOP_VERSION |
437 | mText += "<a href=\"uid:organizer\">"; | 438 | mText += "<a href=\"uid:organizer\">"; |
438 | mText += event->organizer(); | 439 | mText += event->organizer(); |
439 | mText += "</a>\n"; | 440 | mText += "</a>\n"; |
440 | #endif //DESKTOP_VERSION | 441 | #endif //DESKTOP_VERSION |
441 | 442 | ||
442 | 443 | ||
443 | #else | 444 | #else |
@@ -472,49 +473,52 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
472 | } else { | 473 | } else { |
473 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 474 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
474 | if (!a->name().isEmpty()) mText += a->name(); | 475 | if (!a->name().isEmpty()) mText += a->name(); |
475 | else mText += a->email(); | 476 | else mText += a->email(); |
476 | mText += "</a>\n"; | 477 | mText += "</a>\n"; |
477 | } | 478 | } |
478 | #else //DESKTOP_VERSION | 479 | #else //DESKTOP_VERSION |
479 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 480 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
480 | if (!a->name().isEmpty()) mText += a->name(); | 481 | if (!a->name().isEmpty()) mText += a->name(); |
481 | else mText += a->email(); | 482 | else mText += a->email(); |
482 | mText += "</a>\n"; | 483 | mText += "</a>\n"; |
483 | #endif //DESKTOP_VERSION | 484 | #endif //DESKTOP_VERSION |
484 | #else | 485 | #else |
485 | //qDebug("nokabc "); | 486 | //qDebug("nokabc "); |
486 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; | 487 | mText += "<li><a href=\"uid:" + a->uid() + "\">"; |
487 | if (!a->name().isEmpty()) mText += a->name(); | 488 | if (!a->name().isEmpty()) mText += a->name(); |
488 | else mText += a->email(); | 489 | else mText += a->email(); |
489 | mText += "</a>\n"; | 490 | mText += "</a>\n"; |
490 | #endif | 491 | #endif |
491 | 492 | ||
492 | 493 | ||
493 | if (!a->email().isEmpty()) { | 494 | if (!a->email().isEmpty()) { |
494 | if (iconPath) { | 495 | if (iconPath) { |
495 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; | 496 | mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">"; |
496 | mText += "<IMG src=\"" + iconPath + "\">"; | 497 | if ( a->RSVP() ) |
498 | mText += "<IMG src=\"" + iconPath + "\">"; | ||
499 | else | ||
500 | mText += "<IMG src=\"" + NOiconPath + "\">"; | ||
497 | mText += "</a>\n"; | 501 | mText += "</a>\n"; |
498 | } | 502 | } |
499 | } | 503 | } |
500 | if (a->status() != Attendee::NeedsAction ) | 504 | if (a->status() != Attendee::NeedsAction ) |
501 | mText +="[" + a->statusStr() + "] "; | 505 | mText +="[" + a->statusStr() + "] "; |
502 | if (a->role() == Attendee::Chair ) | 506 | if (a->role() == Attendee::Chair ) |
503 | mText +="(" + a->roleStr().left(1) + ".)"; | 507 | mText +="(" + a->roleStr().left(1) + ".)"; |
504 | } | 508 | } |
505 | mText.append("</li></ul>"); | 509 | mText.append("</li></ul>"); |
506 | } | 510 | } |
507 | 511 | ||
508 | } | 512 | } |
509 | void KOEventViewer::appendJournal(Journal *jour, int mode ) | 513 | void KOEventViewer::appendJournal(Journal *jour, int mode ) |
510 | { | 514 | { |
511 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 515 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
512 | if (mode == 0 ) { | 516 | if (mode == 0 ) { |
513 | addTag("h2",i18n("Journal from: ")); | 517 | addTag("h2",i18n("Journal from: ")); |
514 | } | 518 | } |
515 | else { | 519 | else { |
516 | if ( mode == 1 ) { | 520 | if ( mode == 1 ) { |
517 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); | 521 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); |
518 | } else { | 522 | } else { |
519 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); | 523 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); |
520 | } | 524 | } |