-rw-r--r-- | korganizer/koeventviewer.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index f6c9624..d87938a 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -246,275 +246,290 @@ void KOEventViewer::appendEvent(Event *event, int mode ) | |||
246 | if ( mode == 0 ) { | 246 | if ( mode == 0 ) { |
247 | addTag("h2",event->summary()); | 247 | addTag("h2",event->summary()); |
248 | } | 248 | } |
249 | else { | 249 | else { |
250 | if ( mColorMode == 1 ) { | 250 | if ( mColorMode == 1 ) { |
251 | mText +="<font color=\"#00A000\">"; | 251 | mText +="<font color=\"#00A000\">"; |
252 | } | 252 | } |
253 | if ( mColorMode == 2 ) { | 253 | if ( mColorMode == 2 ) { |
254 | mText +="<font color=\"#C00000\">"; | 254 | mText +="<font color=\"#C00000\">"; |
255 | } | 255 | } |
256 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; | 256 | // mText +="<font color=\"#F00000\">" + i18n("O-due!") + "</font>"; |
257 | if ( mode == 1 ) { | 257 | if ( mode == 1 ) { |
258 | addTag("h2",i18n( "Local: " ) +event->summary()); | 258 | addTag("h2",i18n( "Local: " ) +event->summary()); |
259 | } else { | 259 | } else { |
260 | addTag("h2",i18n( "Remote: " ) +event->summary()); | 260 | addTag("h2",i18n( "Remote: " ) +event->summary()); |
261 | } | 261 | } |
262 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 262 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
263 | if ( mColorMode ) | 263 | if ( mColorMode ) |
264 | mText += "</font>"; | 264 | mText += "</font>"; |
265 | } | 265 | } |
266 | mMailSubject += i18n( "Meeting " )+ event->summary(); | 266 | mMailSubject += i18n( "Meeting " )+ event->summary(); |
267 | if (event->cancelled ()) { | 267 | if (event->cancelled ()) { |
268 | mText +="<font color=\"#B00000\">"; | 268 | mText +="<font color=\"#B00000\">"; |
269 | addTag("i",i18n("This event has been cancelled!")); | 269 | addTag("i",i18n("This event has been cancelled!")); |
270 | mText.append("<br>"); | 270 | mText.append("<br>"); |
271 | mText += "</font>"; | 271 | mText += "</font>"; |
272 | mMailSubject += i18n("(cancelled)"); | 272 | mMailSubject += i18n("(cancelled)"); |
273 | } | 273 | } |
274 | if (!event->location().isEmpty()) { | 274 | if (!event->location().isEmpty()) { |
275 | addTag("b",i18n("Location: ")); | 275 | addTag("b",i18n("Location: ")); |
276 | mText.append(event->location()+"<br>"); | 276 | mText.append(event->location()+"<br>"); |
277 | mMailSubject += i18n(" at ") + event->location(); | 277 | mMailSubject += i18n(" at ") + event->location(); |
278 | } | 278 | } |
279 | if (event->doesFloat()) { | 279 | if (event->doesFloat()) { |
280 | if (event->isMultiDay()) { | 280 | if (event->isMultiDay()) { |
281 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") | 281 | mText.append(i18n("<p><b>From:</b> %1 </p><p><b>To:</b> %2</p>") |
282 | .arg(event->dtStartDateStr(shortDate)) | 282 | .arg(event->dtStartDateStr(shortDate)) |
283 | .arg(event->dtEndDateStr(shortDate))); | 283 | .arg(event->dtEndDateStr(shortDate))); |
284 | } else { | 284 | } else { |
285 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); | 285 | mText.append(i18n("<p><b>On:</b> %1</p>").arg(event->dtStartDateStr( shortDate ))); |
286 | } | 286 | } |
287 | } else { | 287 | } else { |
288 | if (event->isMultiDay()) { | 288 | if (event->isMultiDay()) { |
289 | mText.append(i18n("<p><b>From:</b> %1</p> ") | 289 | mText.append(i18n("<p><b>From:</b> %1</p> ") |
290 | .arg(event->dtStartStr( shortDate))); | 290 | .arg(event->dtStartStr( shortDate))); |
291 | mText.append(i18n("<p><b>To:</b> %1</p>") | 291 | mText.append(i18n("<p><b>To:</b> %1</p>") |
292 | .arg(event->dtEndStr(shortDate))); | 292 | .arg(event->dtEndStr(shortDate))); |
293 | } else { | 293 | } else { |
294 | mText.append(i18n("<p><b>On:</b> %1</p> ") | 294 | mText.append(i18n("<p><b>On:</b> %1</p> ") |
295 | .arg(event->dtStartDateStr( shortDate ))); | 295 | .arg(event->dtStartDateStr( shortDate ))); |
296 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") | 296 | mText.append(i18n("<p><b>From:</b> %1 <b>To:</b> %2</p>") |
297 | .arg(event->dtStartTimeStr()) | 297 | .arg(event->dtStartTimeStr()) |
298 | .arg(event->dtEndTimeStr())); | 298 | .arg(event->dtEndTimeStr())); |
299 | } | 299 | } |
300 | } | 300 | } |
301 | 301 | ||
302 | if (event->recurrence()->doesRecur()) { | 302 | if (event->recurrence()->doesRecur()) { |
303 | 303 | ||
304 | QString recurText = event->recurrence()->recurrenceText(); | 304 | QString recurText = event->recurrence()->recurrenceText(); |
305 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); | 305 | addTag("p","<em>" + i18n("This is a %1 recurring event.").arg(recurText ) + "</em>"); |
306 | bool ok; | 306 | bool ok; |
307 | QDate start = QDate::currentDate(); | 307 | QDate start = QDate::currentDate(); |
308 | QDateTime next; | 308 | QDateTime next; |
309 | next = event->getNextOccurence( QDateTime::currentDateTime() , &ok ); | 309 | next = event->getNextOccurence( QDateTime::currentDateTime() , &ok ); |
310 | if ( ok ) { | 310 | if ( ok ) { |
311 | addTag("p",i18n("<b>Next recurrence is on:</b>") ); | 311 | addTag("p",i18n("<b>Next recurrence is on:</b>") ); |
312 | addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); | 312 | addTag("p", KGlobal::locale()->formatDate( next.date(), shortDate )); |
313 | mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( next, true ); | 313 | mMailSubject += i18n(" - " )+ KGlobal::locale()->formatDateTime( next, true ); |
314 | 314 | ||
315 | } else { | 315 | } else { |
316 | bool last; | 316 | bool last; |
317 | QDate nextd; | 317 | QDate nextd; |
318 | nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last ); | 318 | nextd = event->recurrence()->getPreviousDate( QDate::currentDate() , &last ); |
319 | if ( last ) { | 319 | if ( last ) { |
320 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); | 320 | addTag("p",i18n("<b>Last recurrence was on:</b>") ); |
321 | addTag("p", KGlobal::locale()->formatDate( nextd, shortDate )); | 321 | addTag("p", KGlobal::locale()->formatDate( nextd, shortDate )); |
322 | } | 322 | } |
323 | } | 323 | } |
324 | } else { | 324 | } else { |
325 | mMailSubject += i18n(" - " )+event->dtStartStr( true ); | 325 | mMailSubject += i18n(" - " )+event->dtStartStr( true ); |
326 | 326 | ||
327 | } | 327 | } |
328 | 328 | ||
329 | 329 | ||
330 | if (event->isAlarmEnabled()) { | 330 | if (event->isAlarmEnabled()) { |
331 | Alarm *alarm =event->alarms().first() ; | 331 | Alarm *alarm =event->alarms().first() ; |
332 | QDateTime t = alarm->time(); | 332 | QDateTime t = alarm->time(); |
333 | int min = t.secsTo( event->dtStart() )/60; | 333 | int min = t.secsTo( event->dtStart() )/60; |
334 | QString s =i18n("( %1 min before )").arg( min ); | 334 | QString s =i18n("( %1 min before )").arg( min ); |
335 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); | 335 | addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); |
336 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); | 336 | addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); |
337 | //addTag("p",s); | 337 | //addTag("p",s); |
338 | } | 338 | } |
339 | 339 | ||
340 | addTag("b",i18n("Access: ")); | 340 | addTag("b",i18n("Access: ")); |
341 | mText.append(event->secrecyStr()+"<br>"); | 341 | mText.append(event->secrecyStr()+"<br>"); |
342 | |||
343 | |||
344 | if ( KOPrefs::instance()->mEVshowDetails ) { | ||
342 | if (!event->description().isEmpty()) { | 345 | if (!event->description().isEmpty()) { |
343 | addTag("p",i18n("<b>Details: </b>")); | 346 | addTag("p",i18n("<b>Details: </b>")); |
344 | addTag("p",event->description()); | 347 | addTag("p",event->description()); |
345 | } | 348 | } |
346 | 349 | } | |
347 | formatCategories(event); | 350 | formatCategories(event); |
348 | 351 | ||
349 | formatReadOnly(event); | 352 | formatReadOnly(event); |
350 | formatAttendees(event); | 353 | formatAttendees(event); |
351 | 354 | ||
355 | if ( KOPrefs::instance()->mEVshowCreated ) { | ||
356 | addTag("p",i18n("<b>Created: ") +" </b>"); | ||
357 | addTag("p", KGlobal::locale()->formatDateTime( event->created(), shortDate )); | ||
358 | |||
359 | } | ||
360 | if ( KOPrefs::instance()->mEVshowChanged ) { | ||
361 | addTag("p",i18n("<b>Last modified: ") +" </b>"); | ||
362 | addTag("p", KGlobal::locale()->formatDateTime( event->lastModified(), shortDate )); | ||
363 | |||
364 | } | ||
352 | setText(mText); | 365 | setText(mText); |
353 | //QWhatsThis::add(this,mText); | 366 | //QWhatsThis::add(this,mText); |
354 | 367 | ||
355 | } | 368 | } |
356 | 369 | ||
357 | void KOEventViewer::appendTodo(Todo *event, int mode ) | 370 | void KOEventViewer::appendTodo(Todo *event, int mode ) |
358 | { | 371 | { |
359 | mMailSubject = ""; | 372 | mMailSubject = ""; |
360 | mCurrentIncidence = event; | 373 | mCurrentIncidence = event; |
361 | topLevelWidget()->setCaption(i18n("Todo Viewer")); | 374 | topLevelWidget()->setCaption(i18n("Todo Viewer")); |
362 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 375 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
363 | if (mode == 0 ) | 376 | if (mode == 0 ) |
364 | addTag("h2",event->summary()); | 377 | addTag("h2",event->summary()); |
365 | else { | 378 | else { |
366 | if ( mColorMode == 1 ) { | 379 | if ( mColorMode == 1 ) { |
367 | mText +="<font color=\"#00A000\">"; | 380 | mText +="<font color=\"#00A000\">"; |
368 | } | 381 | } |
369 | if ( mColorMode == 2 ) { | 382 | if ( mColorMode == 2 ) { |
370 | mText +="<font color=\"#B00000\">"; | 383 | mText +="<font color=\"#B00000\">"; |
371 | } | 384 | } |
372 | if ( mode == 1 ) { | 385 | if ( mode == 1 ) { |
373 | addTag("h2",i18n( "Local: " ) +event->summary()); | 386 | addTag("h2",i18n( "Local: " ) +event->summary()); |
374 | } else { | 387 | } else { |
375 | addTag("h2",i18n( "Remote: " ) +event->summary()); | 388 | addTag("h2",i18n( "Remote: " ) +event->summary()); |
376 | } | 389 | } |
377 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); | 390 | addTag("h3",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(event->lastModified(),shortDate, true ) ); |
378 | if ( mColorMode ) | 391 | if ( mColorMode ) |
379 | mText += "</font>"; | 392 | mText += "</font>"; |
380 | } | 393 | } |
381 | mMailSubject += i18n( "Todo " )+ event->summary(); | 394 | mMailSubject += i18n( "Todo " )+ event->summary(); |
382 | 395 | ||
383 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { | 396 | if ( event->percentComplete() == 100 && event->hasCompletedDate() ) { |
384 | mText +="<font color=\"#B00000\">"; | 397 | mText +="<font color=\"#B00000\">"; |
385 | addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(KOPrefs::instance()->mShortDateInViewer) ) ); | 398 | addTag("i", i18n("<p><i>Completed on %1</i></p>").arg( event->completedStr(KOPrefs::instance()->mShortDateInViewer) ) ); |
386 | mText += "</font>"; | 399 | mText += "</font>"; |
387 | } else { | 400 | } else { |
388 | mText.append(i18n("<p><i>%1 % completed</i></p>") | 401 | mText.append(i18n("<p><i>%1 % completed</i></p>") |
389 | .arg(event->percentComplete())); | 402 | .arg(event->percentComplete())); |
390 | } | 403 | } |
391 | 404 | ||
392 | if (event->cancelled ()) { | 405 | if (event->cancelled ()) { |
393 | mText +="<font color=\"#B00000\">"; | 406 | mText +="<font color=\"#B00000\">"; |
394 | addTag("i",i18n("This todo has been cancelled!")); | 407 | addTag("i",i18n("This todo has been cancelled!")); |
395 | mText.append("<br>"); | 408 | mText.append("<br>"); |
396 | mText += "</font>"; | 409 | mText += "</font>"; |
397 | mMailSubject += i18n("(cancelled)"); | 410 | mMailSubject += i18n("(cancelled)"); |
398 | } | 411 | } |
399 | 412 | ||
400 | if (!event->location().isEmpty()) { | 413 | if (!event->location().isEmpty()) { |
401 | addTag("b",i18n("Location: ")); | 414 | addTag("b",i18n("Location: ")); |
402 | mText.append(event->location()+"<br>"); | 415 | mText.append(event->location()+"<br>"); |
403 | mMailSubject += i18n(" at ") + event->location(); | 416 | mMailSubject += i18n(" at ") + event->location(); |
404 | } | 417 | } |
405 | 418 | ||
406 | if (event->recurrence()->doesRecur()) { | 419 | if (event->recurrence()->doesRecur()) { |
407 | 420 | ||
408 | QString recurText = event->recurrence()->recurrenceText(); | 421 | QString recurText = event->recurrence()->recurrenceText(); |
409 | addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); | 422 | addTag("p","<em>" + i18n("This is a %1 recurring todo.").arg(recurText ) + "</em>"); |
410 | 423 | ||
411 | } | 424 | } |
412 | if (event->hasStartDate()) { | 425 | if (event->hasStartDate()) { |
413 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); | 426 | mText.append(i18n("<p><b>Start on:</b> %1</p>").arg(event->dtStartStr(KOPrefs::instance()->mShortDateInViewer))); |
414 | } | 427 | } |
415 | if (event->hasDueDate()) { | 428 | if (event->hasDueDate()) { |
416 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); | 429 | mText.append(i18n("<p><b>Due on:</b> %1</p>").arg(event->dtDueStr(KOPrefs::instance()->mShortDateInViewer))); |
417 | mMailSubject += i18n(" - " )+event->dtDueStr( true ); | 430 | mMailSubject += i18n(" - " )+event->dtDueStr( true ); |
418 | } | 431 | } |
419 | addTag("b",i18n("Access: ")); | 432 | addTag("b",i18n("Access: ")); |
420 | mText.append(event->secrecyStr()+"<br>"); | 433 | mText.append(event->secrecyStr()+"<br>"); |
434 | if ( KOPrefs::instance()->mEVshowDetails ) { | ||
421 | if (!event->description().isEmpty()) { | 435 | if (!event->description().isEmpty()) { |
422 | addTag("p",i18n("<b>Details: </b>")); | 436 | addTag("p",i18n("<b>Details: </b>")); |
423 | addTag("p",event->description()); | 437 | addTag("p",event->description()); |
424 | } | 438 | } |
439 | } | ||
425 | 440 | ||
426 | formatCategories(event); | 441 | formatCategories(event); |
427 | 442 | ||
428 | mText.append(i18n("<p><b>Priority:</b> %2</p>") | 443 | mText.append(i18n("<p><b>Priority:</b> %2</p>") |
429 | .arg(QString::number(event->priority()))); | 444 | .arg(QString::number(event->priority()))); |
430 | 445 | ||
431 | formatReadOnly(event); | 446 | formatReadOnly(event); |
432 | formatAttendees(event); | 447 | formatAttendees(event); |
433 | if ( event->relatedTo() ) { | 448 | if ( event->relatedTo() ) { |
434 | addTag("b",i18n("Parent todo:<br>")); | 449 | addTag("b",i18n("Parent todo:<br>")); |
435 | mText.append(event->relatedTo()->summary()+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); | 450 | mText.append(event->relatedTo()->summary()+" [" +QString::number(event->relatedTo()->priority()) + "/" + QString::number(((Todo*)event->relatedTo())->percentComplete())+"%] <br>"); |
436 | } | 451 | } |
437 | QPtrList<Incidence> Relations = event->relations(); | 452 | QPtrList<Incidence> Relations = event->relations(); |
438 | Incidence *to; | 453 | Incidence *to; |
439 | if ( Relations.first() ) | 454 | if ( Relations.first() ) |
440 | addTag("b",i18n("Sub todos:<br>")); | 455 | addTag("b",i18n("Sub todos:<br>")); |
441 | for (to=Relations.first();to;to=Relations.next()) { | 456 | for (to=Relations.first();to;to=Relations.next()) { |
442 | mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); | 457 | mText.append( to->summary()+" [" +QString::number(to->priority()) + "/" + QString::number(((Todo*)to)->percentComplete())+"%]<br>"); |
443 | 458 | ||
444 | } | 459 | } |
445 | setText(mText); | 460 | setText(mText); |
446 | } | 461 | } |
447 | 462 | ||
448 | void KOEventViewer::formatCategories(Incidence *event) | 463 | void KOEventViewer::formatCategories(Incidence *event) |
449 | { | 464 | { |
450 | if (!event->categoriesStr().isEmpty()) { | 465 | if (!event->categoriesStr().isEmpty()) { |
451 | if (event->categories().count() == 1) { | 466 | if (event->categories().count() == 1) { |
452 | addTag("h3",i18n("Category")); | 467 | addTag("h3",i18n("Category")); |
453 | } else { | 468 | } else { |
454 | addTag("h3",i18n("Categories")); | 469 | addTag("h3",i18n("Categories")); |
455 | } | 470 | } |
456 | addTag("p",event->categoriesStr()); | 471 | addTag("p",event->categoriesStr()); |
457 | } | 472 | } |
458 | } | 473 | } |
459 | void KOEventViewer::formatAttendees(Incidence *event) | 474 | void KOEventViewer::formatAttendees(Incidence *event) |
460 | { | 475 | { |
461 | QPtrList<Attendee> attendees = event->attendees(); | 476 | QPtrList<Attendee> attendees = event->attendees(); |
462 | if (attendees.count()) { | 477 | if (attendees.count()) { |
463 | 478 | ||
464 | 479 | ||
465 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); | 480 | QString iconPath = KGlobal::iconLoader()->iconPath("mailappt",KIcon::Small); |
466 | QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); | 481 | QString NOiconPath = KGlobal::iconLoader()->iconPath("nomailappt",KIcon::Small); |
467 | addTag("h3",i18n("Organizer")); | 482 | addTag("h3",i18n("Organizer")); |
468 | mText.append("<ul><li>"); | 483 | mText.append("<ul><li>"); |
469 | #ifndef KORG_NOKABC | 484 | #ifndef KORG_NOKABC |
470 | 485 | ||
471 | #ifdef DESKTOP_VERSION | 486 | #ifdef DESKTOP_VERSION |
472 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); | 487 | KABC::AddressBook *add_book = KABC::StdAddressBook::self(); |
473 | KABC::Addressee::List addressList; | 488 | KABC::Addressee::List addressList; |
474 | addressList = add_book->findByEmail(event->organizer()); | 489 | addressList = add_book->findByEmail(event->organizer()); |
475 | KABC::Addressee o = addressList.first(); | 490 | KABC::Addressee o = addressList.first(); |
476 | if (!o.isEmpty() && addressList.size()<2) { | 491 | if (!o.isEmpty() && addressList.size()<2) { |
477 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 492 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
478 | mText += o.formattedName(); | 493 | mText += o.formattedName(); |
479 | mText += "</a>\n"; | 494 | mText += "</a>\n"; |
480 | } else { | 495 | } else { |
481 | mText.append(event->organizer()); | 496 | mText.append(event->organizer()); |
482 | } | 497 | } |
483 | #else //DESKTOP_VERSION | 498 | #else //DESKTOP_VERSION |
484 | mText += "<a href=\"uid:organizer\">"; | 499 | mText += "<a href=\"uid:organizer\">"; |
485 | mText += event->organizer(); | 500 | mText += event->organizer(); |
486 | mText += "</a>\n"; | 501 | mText += "</a>\n"; |
487 | #endif //DESKTOP_VERSION | 502 | #endif //DESKTOP_VERSION |
488 | 503 | ||
489 | 504 | ||
490 | #else | 505 | #else |
491 | mText.append(event->organizer()); | 506 | mText.append(event->organizer()); |
492 | #endif | 507 | #endif |
493 | 508 | ||
494 | if (iconPath) { | 509 | if (iconPath) { |
495 | mText += " <a href=\"mailto:" + event->organizer() + "\">"; | 510 | mText += " <a href=\"mailto:" + event->organizer() + "\">"; |
496 | mText += "<IMG src=\"" + iconPath + "\">"; | 511 | mText += "<IMG src=\"" + iconPath + "\">"; |
497 | mText += "</a>\n"; | 512 | mText += "</a>\n"; |
498 | } | 513 | } |
499 | mText.append("</li></ul>"); | 514 | mText.append("</li></ul>"); |
500 | 515 | ||
501 | addTag("h3",i18n("Attendees")); | 516 | addTag("h3",i18n("Attendees")); |
502 | Attendee *a; | 517 | Attendee *a; |
503 | mText.append("<ul>"); | 518 | mText.append("<ul>"); |
504 | int a_count = 0; | 519 | int a_count = 0; |
505 | int a_count_nr = 0; | 520 | int a_count_nr = 0; |
506 | 521 | ||
507 | for(a=attendees.first();a;a=attendees.next()) { | 522 | for(a=attendees.first();a;a=attendees.next()) { |
508 | #ifndef KORG_NOKABC | 523 | #ifndef KORG_NOKABC |
509 | #ifdef DESKTOP_VERSION | 524 | #ifdef DESKTOP_VERSION |
510 | if (a->name().isEmpty()) { | 525 | if (a->name().isEmpty()) { |
511 | addressList = add_book->findByEmail(a->email()); | 526 | addressList = add_book->findByEmail(a->email()); |
512 | KABC::Addressee o = addressList.first(); | 527 | KABC::Addressee o = addressList.first(); |
513 | if (!o.isEmpty() && addressList.size()<2) { | 528 | if (!o.isEmpty() && addressList.size()<2) { |
514 | mText += "<a href=\"uid:" + o.uid() + "\">"; | 529 | mText += "<a href=\"uid:" + o.uid() + "\">"; |
515 | mText += o.formattedName(); | 530 | mText += o.formattedName(); |
516 | mText += "</a>\n"; | 531 | mText += "</a>\n"; |
517 | } else { | 532 | } else { |
518 | mText += "<li>"; | 533 | mText += "<li>"; |
519 | mText.append(a->email()); | 534 | mText.append(a->email()); |
520 | mText += "\n"; | 535 | mText += "\n"; |