summaryrefslogtreecommitdiffabout
path: root/korganizer/koeventviewer.cpp
Unidiff
Diffstat (limited to 'korganizer/koeventviewer.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeventviewer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 02b54da..607e549 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -311,309 +311,317 @@ void KOEventViewer::appendEvent(Event *event, int mode )
311 } 311 }
312 // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; 312 // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>";
313 if ( mode == 1 ) { 313 if ( mode == 1 ) {
314 addTag("h2",i18n( "Local: " ) +deTag(event->summary())); 314 addTag("h2",i18n( "Local: " ) +deTag(event->summary()));
315 } else { 315 } else {
316 addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); 316 addTag("h2",i18n( "Remote: " ) +deTag(event->summary()));
317 } 317 }
318 formatReadOnly(event); 318 formatReadOnly(event);
319 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); 319 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) );
320 if ( mColorMode ) 320 if ( mColorMode )
321 mText += "</font>"; 321 mText += "</font>";
322 } 322 }
323 mMailSubject += i18n( "Meeting " )+ event->summary(); 323 mMailSubject += i18n( "Meeting " )+ event->summary();
324 if (event->cancelled ()) { 324 if (event->cancelled ()) {
325 mText +="<font color=\"#B00000\">"; 325 mText +="<font color=\"#B00000\">";
326 addTag("i",i18n("This event has been cancelled!")); 326 addTag("i",i18n("This event has been cancelled!"));
327 mText.append("<br>"); 327 mText.append("<br>");
328 mText += "</font>"; 328 mText += "</font>";
329 mMailSubject += i18n("(cancelled)"); 329 mMailSubject += i18n("(cancelled)");
330 } 330 }
331 331
332 if (event->doesFloat()) { 332 if (event->doesFloat()) {
333 if (event->isMultiDay()) { 333 if (event->isMultiDay()) {
334 mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") 334 mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>")
335 .arg(event->dtStartDateStr(shortDate)) 335 .arg(event->dtStartDateStr(shortDate))
336 .arg(event->dtEndDateStr(shortDate))); 336 .arg(event->dtEndDateStr(shortDate)));
337 mText.append(i18n("<p><b>Duration:</b> %1 days</p>") 337 mText.append(i18n("<p><b>Duration:</b> %1 days</p>")
338 .arg(event->dtStart().daysTo(event->dtEnd())+1)); 338 .arg(event->dtStart().daysTo(event->dtEnd())+1));
339 } else { 339 } else {
340 mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); 340 mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate )));
341 } 341 }
342 } else { 342 } else {
343 if (event->isMultiDay()) { 343 if (event->isMultiDay()) {
344 mText.append(i18n("<p><b>From:</b> %1</p> ") 344 mText.append(i18n("<p><b>From:</b> %1</p> ")
345 .arg(event->dtStartStr( shortDate))); 345 .arg(event->dtStartStr( shortDate)));
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(" at ") + 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 ) );
371 } else { 371 } else {
372 addTag("p",i18n("<b>Next recurrence is on:</b>") ); 372 addTag("p",i18n("<b>Next recurrence is on:</b>") );
373 addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); 373 addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate ));
374 } 374 }
375 mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( next, true ); 375 mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( next, true );
376 376
377 } else { 377 } else {
378 bool last; 378 bool last;
379 QDate nextd; 379 QDate nextd;
380 nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last ); 380 nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last );
381 if ( last ) { 381 if ( last ) {
382 if ( wideScreen ){ 382 if ( wideScreen ){
383 addTag("p",i18n("<b>Last recurrence was on:</b>") +" " + KGlobal::locale()->formatDate( nextd, shortDate )); 383 addTag("p",i18n("<b>Last recurrence was on:</b>") +" " + KGlobal::locale()->formatDate( nextd, shortDate ));
384 } else{ 384 } else{
385 addTag("p",i18n("<b>Last recurrence was on:</b>") ); 385 addTag("p",i18n("<b>Last recurrence was on:</b>") );
386 addTag("p", KGlobal::locale()->formatDate( nextd, shortDate )); 386 addTag("p", KGlobal::locale()->formatDate( nextd, shortDate ));
387 } 387 }
388 } 388 }
389 } 389 }
390 } else { 390 } else {
391 mMailSubject += i18n(" - " )+event->dtStartStr( true ); 391 mMailSubject += i18n(" - " )+event->dtStartStr( true );
392 392
393 } 393 }
394 394
395 395
396 if (event->isAlarmEnabled()) { 396 if (event->isAlarmEnabled()) {
397 Alarm *alarm =event->alarms().first() ; 397 Alarm *alarm =event->alarms().first() ;
398 QDateTime t = alarm->time(); 398 QDateTime t = alarm->time();
399 QString s =i18n("( %1 before )").arg( alarm->offsetText() ); 399 QString s =i18n("( %1 before )").arg( alarm->offsetText() );
400 if(wideScreen ){ 400 if(wideScreen ){
401 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate )); 401 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate ));
402 }else{ 402 }else{
403 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); 403 addTag("p",i18n("<b>Alarm on: ") + s +" </b>");
404 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); 404 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
405 } 405 }
406 //addTag("p",s); 406 //addTag("p",s);
407 if ( !(event->alarmEnabled() ) ) {
408 addTag("p", "<em>("+i18n("Enable alarm in resource settings") + ")</em>");
409
410 }
407 } 411 }
408 412
409 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); 413 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr());
410 414
411 formatCategories(event); 415 formatCategories(event);
412 416
413 formatAttendees(event); 417 formatAttendees(event);
414 418
415 if ( KOPrefs::instance()->mEVshowCreated ) { 419 if ( KOPrefs::instance()->mEVshowCreated ) {
416 if(wideScreen ){ 420 if(wideScreen ){
417 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); 421 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate ));
418 }else{ 422 }else{
419 addTag("p",i18n("<b>Created: ") +" </b>"); 423 addTag("p",i18n("<b>Created: ") +" </b>");
420 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); 424 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
421 } 425 }
422 426
423 427
424 } 428 }
425 if ( KOPrefs::instance()->mEVshowChanged ) { 429 if ( KOPrefs::instance()->mEVshowChanged ) {
426 if(wideScreen ){ 430 if(wideScreen ){
427 addTag("p",i18n("<b>Last modified: ") +" </b>" + KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); 431 addTag("p",i18n("<b>Last modified: ") +" </b>" + KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) );
428 }else{ 432 }else{
429 addTag("p",i18n("<b>Last modified: ") +" </b>"); 433 addTag("p",i18n("<b>Last modified: ") +" </b>");
430 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); 434 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
431 } 435 }
432 436
433 } 437 }
434 if ( KOPrefs::instance()->mEVshowDetails ) { 438 if ( KOPrefs::instance()->mEVshowDetails ) {
435 if (!event->description().isEmpty()) { 439 if (!event->description().isEmpty()) {
436 addTag("p",i18n("<b>Details: </b>")); 440 addTag("p",i18n("<b>Details: </b>"));
437 addTag("p",deTag(event->description())); 441 addTag("p",deTag(event->description()));
438 } 442 }
439 } 443 }
440 setText(mText); 444 setText(mText);
441 //QWhatsThis::add(this,mText); 445 //QWhatsThis::add(this,mText);
442 446
443} 447}
444 448
445void KOEventViewer::appendTodo(Todo *event, int mode ) 449void KOEventViewer::appendTodo(Todo *event, int mode )
446{ 450{
447 mMailSubject = ""; 451 mMailSubject = "";
448 mCurrentIncidence = event; 452 mCurrentIncidence = event;
449 topLevelWidget()->setCaption(i18n("Todo Viewer")); 453 topLevelWidget()->setCaption(i18n("Todo Viewer"));
450 bool shortDate = KOPrefs::instance()->mShortDateInViewer; 454 bool shortDate = KOPrefs::instance()->mShortDateInViewer;
451 bool wideScreen = ( QApplication::desktop()->width() >= 640 ); 455 bool wideScreen = ( QApplication::desktop()->width() >= 640 );
452 if (mode == 0 ) { 456 if (mode == 0 ) {
453 addTag("h2",deTag(event->summary())); 457 addTag("h2",deTag(event->summary()));
454 formatReadOnly(event); 458 formatReadOnly(event);
455 } 459 }
456 else { 460 else {
457 if ( mColorMode == 1 ) { 461 if ( mColorMode == 1 ) {
458 mText +="<font color=\"#00A000\">"; 462 mText +="<font color=\"#00A000\">";
459 } 463 }
460 if ( mColorMode == 2 ) { 464 if ( mColorMode == 2 ) {
461 mText +="<font color=\"#B00000\">"; 465 mText +="<font color=\"#B00000\">";
462 } 466 }
463 if ( mode == 1 ) { 467 if ( mode == 1 ) {
464 addTag("h2",i18n( "Local: " ) +deTag(event->summary())); 468 addTag("h2",i18n( "Local: " ) +deTag(event->summary()));
465 } else { 469 } else {
466 addTag("h2",i18n( "Remote: " ) +deTag(event->summary())); 470 addTag("h2",i18n( "Remote: " ) +deTag(event->summary()));
467 } 471 }
468 formatReadOnly(event); 472 formatReadOnly(event);
469 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); 473 addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) );
470 if ( mColorMode ) 474 if ( mColorMode )
471 mText += "</font>"; 475 mText += "</font>";
472 } 476 }
473 mMailSubject += i18n( "Todo " )+ event->summary(); 477 mMailSubject += i18n( "Todo " )+ event->summary();
474 478
475 if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { 479 if ( event->percentComplete() == 100 && event->hasCompletedDate() ) {
476 mText +="<font color=\"#B00000\">"; 480 mText +="<font color=\"#B00000\">";
477 addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(KOPrefs::instance()->mShortDateInViewer) ) ); 481 addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(KOPrefs::instance()->mShortDateInViewer) ) );
478 mText += "</font>"; 482 mText += "</font>";
479 } else { 483 } else {
480 mText.append(i18n("<p><i>%1 % completed</i></p>") 484 mText.append(i18n("<p><i>%1 % completed</i></p>")
481 .arg(event->percentComplete())); 485 .arg(event->percentComplete()));
482 } 486 }
483 487
484 if (event->cancelled ()) { 488 if (event->cancelled ()) {
485 mText +="<font color=\"#B00000\">"; 489 mText +="<font color=\"#B00000\">";
486 addTag("i",i18n("This todo has been cancelled!")); 490 addTag("i",i18n("This todo has been cancelled!"));
487 mText.append("<br>"); 491 mText.append("<br>");
488 mText += "</font>"; 492 mText += "</font>";
489 mMailSubject += i18n("(cancelled)"); 493 mMailSubject += i18n("(cancelled)");
490 } 494 }
491 495
492 496
493 497
494 if (event->doesRecur()) { 498 if (event->doesRecur()) {
495 499
496 QString recurText = event->recurrence()->recurrenceText(); 500 QString recurText = event->recurrence()->recurrenceText();
497 addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); 501 addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>");
498 502
499 } 503 }
500 if (event->hasStartDate()) { 504 if (event->hasStartDate()) {
501 mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); 505 mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer)));
502 } 506 }
503 if (event->hasDueDate()) { 507 if (event->hasDueDate()) {
504 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); 508 mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer)));
505 mMailSubject += i18n(" - " )+event->dtDueStr( true ); 509 mMailSubject += i18n(" - " )+event->dtDueStr( true );
506 } 510 }
507 if (!event->location().isEmpty()) { 511 if (!event->location().isEmpty()) {
508 addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) ); 512 addTag("p","<b>"+i18n("Location: ")+"</b>"+ deTag(event->location() ) );
509 mMailSubject += i18n(" at ") + event->location(); 513 mMailSubject += i18n(" at ") + event->location();
510 } 514 }
511 mText.append(i18n("<p><b>Priority:</b> %2</p>") 515 mText.append(i18n("<p><b>Priority:</b> %2</p>")
512 .arg(QString::number(event->priority()))); 516 .arg(QString::number(event->priority())));
513 517
514 if (event->isAlarmEnabled()) { 518 if (event->isAlarmEnabled()) {
515 Alarm *alarm =event->alarms().first() ; 519 Alarm *alarm =event->alarms().first() ;
516 QDateTime t = alarm->time(); 520 QDateTime t = alarm->time();
517 QString s =i18n("( %1 before )").arg( alarm->offsetText() ); 521 QString s =i18n("( %1 before )").arg( alarm->offsetText() );
518 if ( wideScreen ) { 522 if ( wideScreen ) {
519 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate )); 523 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"+ KGlobal::locale()->formatDateTime( t, shortDate ));
520 } else { 524 } else {
521 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); 525 addTag("p",i18n("<b>Alarm on: ") + s +" </b>");
522 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); 526 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
523 } 527 }
528 if ( !(event->alarmEnabled() ) ) {
529 addTag("p", "<em>("+i18n("Enable alarm in resource settings") + ")</em>");
530
531 }
524 } 532 }
525 533
526 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); 534 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr());
527 535
528 formatCategories(event); 536 formatCategories(event);
529 537
530 formatAttendees(event); 538 formatAttendees(event);
531 539
532 if ( KOPrefs::instance()->mEVshowCreated ) { 540 if ( KOPrefs::instance()->mEVshowCreated ) {
533 if(wideScreen ){ 541 if(wideScreen ){
534 542
535 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate )); 543 addTag("p",i18n("<b>Created: ") +" </b>"+KGlobal::locale()->formatDateTime( event->created(), shortDate ));
536 544
537 } else { 545 } else {
538 addTag("p",i18n("<b>Created: ") +" </b>"); 546 addTag("p",i18n("<b>Created: ") +" </b>");
539 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); 547 addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate ));
540 } 548 }
541 } 549 }
542 if ( KOPrefs::instance()->mEVshowChanged ) { 550 if ( KOPrefs::instance()->mEVshowChanged ) {
543 if(wideScreen ){ 551 if(wideScreen ){
544 addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) ); 552 addTag("p",i18n("<b>Last modified: ") +" </b>" +KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ) );
545 553
546 } else { 554 } else {
547 addTag("p",i18n("<b>Last modified: ") +" </b>"); 555 addTag("p",i18n("<b>Last modified: ") +" </b>");
548 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); 556 addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate ));
549 } 557 }
550 } 558 }
551 if ( event->relatedTo() ) { 559 if ( event->relatedTo() ) {
552 addTag("b",i18n("Parent todo:<br>")); 560 addTag("b",i18n("Parent todo:<br>"));
553 561
554 QString t_name = "[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] ";// +event->relatedTo()->summary()); 562 QString t_name = "[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] ";// +event->relatedTo()->summary());
555 563
556 mText += t_name; 564 mText += t_name;
557 mText += "<a href=\"todo_uid:" + event->relatedTo()->uid() + "\">"; 565 mText += "<a href=\"todo_uid:" + event->relatedTo()->uid() + "\">";
558 mText += deTag(event->relatedTo()->summary()); 566 mText += deTag(event->relatedTo()->summary());
559 mText += "</a><br>"; 567 mText += "</a><br>";
560 568
561 // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<br>"); 569 // mText.append(deTag("[" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] " +event->relatedTo()->summary()) +"<br>");
562 } 570 }
563 QPtrList<Incidence> Relations = event->relations(); 571 QPtrList<Incidence> Relations = event->relations();
564 Incidence *to; 572 Incidence *to;
565 if ( Relations.first() ) 573 if ( Relations.first() )
566 addTag("b",i18n("Sub todos:<br>")); 574 addTag("b",i18n("Sub todos:<br>"));
567 for (to=Relations.first();to;to=Relations.next()) { 575 for (to=Relations.first();to;to=Relations.next()) {
568 QString t_name = "[" +QString::number(((Todo*)to)->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%] ";// +to->relatedTo()->summary()); 576 QString t_name = "[" +QString::number(((Todo*)to)->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%] ";// +to->relatedTo()->summary());
569 mText += t_name; 577 mText += t_name;
570 mText += "<a href=\"todo_uid:" + to->uid() + "\">"; 578 mText += "<a href=\"todo_uid:" + to->uid() + "\">";
571 mText += deTag(to->summary()); 579 mText += deTag(to->summary());
572 mText += "</a><br>"; 580 mText += "</a><br>";
573 581
574 } 582 }
575 583
576 if ( KOPrefs::instance()->mEVshowDetails ) { 584 if ( KOPrefs::instance()->mEVshowDetails ) {
577 if (!event->description().isEmpty()) { 585 if (!event->description().isEmpty()) {
578 addTag("p",i18n("<b>Details: </b>")); 586 addTag("p",i18n("<b>Details: </b>"));
579 addTag("p",deTag(event->description())); 587 addTag("p",deTag(event->description()));
580 } 588 }
581 } 589 }
582 setText(mText); 590 setText(mText);
583} 591}
584 592
585void KOEventViewer::formatCategories(Incidence *event) 593void KOEventViewer::formatCategories(Incidence *event)
586{ 594{
587 if (!event->categoriesStr().isEmpty()) { 595 if (!event->categoriesStr().isEmpty()) {
588 if (event->categories().count() == 1) { 596 if (event->categories().count() == 1) {
589 addTag("p","<b>"+i18n("Category") + ":</b> " + event->categoriesStrWithSpace()); 597 addTag("p","<b>"+i18n("Category") + ":</b> " + event->categoriesStrWithSpace());
590 } else { 598 } else {
591 addTag("p","<b>"+i18n("Categories")+":</b> " + event->categoriesStrWithSpace() ) ; 599 addTag("p","<b>"+i18n("Categories")+":</b> " + event->categoriesStrWithSpace() ) ;
592 } 600 }
593 } 601 }
594} 602}
595void KOEventViewer::formatAttendees(Incidence *event) 603void KOEventViewer::formatAttendees(Incidence *event)
596{ 604{
597 QPtrList<Attendee> attendees = event->attendees(); 605 QPtrList<Attendee> attendees = event->attendees();
598 if (attendees.count()) { 606 if (attendees.count()) {
599 607
600 608
601 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); 609 QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small);
602 QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); 610 QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small);
603 addTag("h3",i18n("Organizer")); 611 addTag("h3",i18n("Organizer"));
604 mText.append("<ul><li>"); 612 mText.append("<ul><li>");
605#ifndef KORG_NOKABC 613#ifndef KORG_NOKABC
606 614
607#ifdef DESKTOP_VERSION 615#ifdef DESKTOP_VERSION
608 KABC::AddressBook *add_book = KABC::StdAddressBook::self(); 616 KABC::AddressBook *add_book = KABC::StdAddressBook::self();
609 KABC::Addressee::List addressList; 617 KABC::Addressee::List addressList;
610 addressList = add_book->findByEmail(event->organizer()); 618 addressList = add_book->findByEmail(event->organizer());
611 KABC::Addressee o = addressList.first(); 619 KABC::Addressee o = addressList.first();
612 if (!o.isEmpty() && addressList.size()<2) { 620 if (!o.isEmpty() && addressList.size()<2) {
613 mText += "<a href=\"uid:" + o.uid() + "\">"; 621 mText += "<a href=\"uid:" + o.uid() + "\">";
614 mText += o.formattedName(); 622 mText += o.formattedName();
615 mText += "</a>\n"; 623 mText += "</a>\n";
616 } else { 624 } else {
617 mText.append(event->organizer()); 625 mText.append(event->organizer());
618 } 626 }
619#else //DESKTOP_VERSION 627#else //DESKTOP_VERSION