author | eilers <eilers> | 2002-12-09 15:08:30 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-12-09 15:08:30 (UTC) |
commit | e487238141c57df63252e41a47b409cbb1f9ae83 (patch) (unidiff) | |
tree | 6b98869056d5444d65432f3ba313a46273387118 | |
parent | 9aa7570be3c5417314f5c865344b948a90450b48 (diff) | |
download | opie-e487238141c57df63252e41a47b409cbb1f9ae83.zip opie-e487238141c57df63252e41a47b409cbb1f9ae83.tar.gz opie-e487238141c57df63252e41a47b409cbb1f9ae83.tar.bz2 |
Added preview for default email and all email
-rw-r--r-- | libopie/pim/ocontact.cpp | 8 | ||||
-rw-r--r-- | libopie2/opiepim/ocontact.cpp | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp index efa2777..6aec62e 100644 --- a/libopie/pim/ocontact.cpp +++ b/libopie/pim/ocontact.cpp | |||
@@ -457,99 +457,103 @@ QString OContact::toRichText() const | |||
457 | // business address | 457 | // business address |
458 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || | 458 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || |
459 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { | 459 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { |
460 | text += "<br>"; | 460 | text += "<br>"; |
461 | text += QObject::tr( "<b>Work Address:</b>" ); | 461 | text += QObject::tr( "<b>Work Address:</b>" ); |
462 | text += "<br>"; | 462 | text += "<br>"; |
463 | } | 463 | } |
464 | 464 | ||
465 | if ( !(value = businessStreet()).isEmpty() ) | 465 | if ( !(value = businessStreet()).isEmpty() ) |
466 | text += Qtopia::escapeString(value) + "<br>"; | 466 | text += Qtopia::escapeString(value) + "<br>"; |
467 | state = businessState(); | 467 | state = businessState(); |
468 | if ( !(value = businessCity()).isEmpty() ) { | 468 | if ( !(value = businessCity()).isEmpty() ) { |
469 | text += Qtopia::escapeString(value); | 469 | text += Qtopia::escapeString(value); |
470 | if ( state ) | 470 | if ( state ) |
471 | text += ", " + Qtopia::escapeString(state); | 471 | text += ", " + Qtopia::escapeString(state); |
472 | text += "<br>"; | 472 | text += "<br>"; |
473 | } else if ( !state.isEmpty() ) | 473 | } else if ( !state.isEmpty() ) |
474 | text += Qtopia::escapeString(state) + "<br>"; | 474 | text += Qtopia::escapeString(state) + "<br>"; |
475 | if ( !(value = businessZip()).isEmpty() ) | 475 | if ( !(value = businessZip()).isEmpty() ) |
476 | text += Qtopia::escapeString(value) + "<br>"; | 476 | text += Qtopia::escapeString(value) + "<br>"; |
477 | if ( !(value = businessCountry()).isEmpty() ) | 477 | if ( !(value = businessCountry()).isEmpty() ) |
478 | text += Qtopia::escapeString(value) + "<br>"; | 478 | text += Qtopia::escapeString(value) + "<br>"; |
479 | 479 | ||
480 | // home address | 480 | // home address |
481 | if ( !homeStreet().isEmpty() || !homeCity().isEmpty() || | 481 | if ( !homeStreet().isEmpty() || !homeCity().isEmpty() || |
482 | !homeZip().isEmpty() || !homeCountry().isEmpty() ) { | 482 | !homeZip().isEmpty() || !homeCountry().isEmpty() ) { |
483 | text += "<br>"; | 483 | text += "<br>"; |
484 | text += QObject::tr( "<b>Home Address:</b>" ); | 484 | text += QObject::tr( "<b>Home Address:</b>" ); |
485 | text += "<br>"; | 485 | text += "<br>"; |
486 | } | 486 | } |
487 | 487 | ||
488 | if ( !(value = homeStreet()).isEmpty() ) | 488 | if ( !(value = homeStreet()).isEmpty() ) |
489 | text += Qtopia::escapeString(value) + "<br>"; | 489 | text += Qtopia::escapeString(value) + "<br>"; |
490 | state = homeState(); | 490 | state = homeState(); |
491 | if ( !(value = homeCity()).isEmpty() ) { | 491 | if ( !(value = homeCity()).isEmpty() ) { |
492 | text += Qtopia::escapeString(value); | 492 | text += Qtopia::escapeString(value); |
493 | if ( !state.isEmpty() ) | 493 | if ( !state.isEmpty() ) |
494 | text += ", " + Qtopia::escapeString(state); | 494 | text += ", " + Qtopia::escapeString(state); |
495 | text += "<br>"; | 495 | text += "<br>"; |
496 | } else if (!state.isEmpty()) | 496 | } else if (!state.isEmpty()) |
497 | text += Qtopia::escapeString(state) + "<br>"; | 497 | text += Qtopia::escapeString(state) + "<br>"; |
498 | if ( !(value = homeZip()).isEmpty() ) | 498 | if ( !(value = homeZip()).isEmpty() ) |
499 | text += Qtopia::escapeString(value) + "<br>"; | 499 | text += Qtopia::escapeString(value) + "<br>"; |
500 | if ( !(value = homeCountry()).isEmpty() ) | 500 | if ( !(value = homeCountry()).isEmpty() ) |
501 | text += Qtopia::escapeString(value) + "<br>"; | 501 | text += Qtopia::escapeString(value) + "<br>"; |
502 | 502 | ||
503 | // the others... | 503 | // the others... |
504 | QString str; | 504 | QString str; |
505 | QString defEmail = defaultEmail(); | ||
506 | if ( !defEmail.isEmpty() ) | ||
507 | text += "<b>" + QObject::tr("Default Email: ") + "</b>" | ||
508 | + Qtopia::escapeString(defEmail) + "<br>"; | ||
505 | str = emails(); | 509 | str = emails(); |
506 | if ( !str.isEmpty() ) | 510 | if ( !str.isEmpty() && ( str != defEmail ) ) |
507 | text += "<b>" + QObject::tr("Email Addresses: ") + "</b>" | 511 | text += "<b>" + QObject::tr("All Emails: ") + "</b>" |
508 | + Qtopia::escapeString(str) + "<br>"; | 512 | + Qtopia::escapeString(str) + "<br>"; |
509 | str = homePhone(); | 513 | str = homePhone(); |
510 | if ( !str.isEmpty() ) | 514 | if ( !str.isEmpty() ) |
511 | text += "<b>" + QObject::tr("Home Phone: ") + "</b>" | 515 | text += "<b>" + QObject::tr("Home Phone: ") + "</b>" |
512 | + Qtopia::escapeString(str) + "<br>"; | 516 | + Qtopia::escapeString(str) + "<br>"; |
513 | str = homeFax(); | 517 | str = homeFax(); |
514 | if ( !str.isEmpty() ) | 518 | if ( !str.isEmpty() ) |
515 | text += "<b>" + QObject::tr("Home Fax: ") + "</b>" | 519 | text += "<b>" + QObject::tr("Home Fax: ") + "</b>" |
516 | + Qtopia::escapeString(str) + "<br>"; | 520 | + Qtopia::escapeString(str) + "<br>"; |
517 | str = homeMobile(); | 521 | str = homeMobile(); |
518 | if ( !str.isEmpty() ) | 522 | if ( !str.isEmpty() ) |
519 | text += "<b>" + QObject::tr("Home Mobile: ") + "</b>" | 523 | text += "<b>" + QObject::tr("Home Mobile: ") + "</b>" |
520 | + Qtopia::escapeString(str) + "<br>"; | 524 | + Qtopia::escapeString(str) + "<br>"; |
521 | str = homeWebpage(); | 525 | str = homeWebpage(); |
522 | if ( !str.isEmpty() ) | 526 | if ( !str.isEmpty() ) |
523 | text += "<b>" + QObject::tr("Home Web Page: ") + "</b>" | 527 | text += "<b>" + QObject::tr("Home Web Page: ") + "</b>" |
524 | + Qtopia::escapeString(str) + "<br>"; | 528 | + Qtopia::escapeString(str) + "<br>"; |
525 | str = businessWebpage(); | 529 | str = businessWebpage(); |
526 | if ( !str.isEmpty() ) | 530 | if ( !str.isEmpty() ) |
527 | text += "<b>" + QObject::tr("Business Web Page: ") + "</b>" | 531 | text += "<b>" + QObject::tr("Business Web Page: ") + "</b>" |
528 | + Qtopia::escapeString(str) + "<br>"; | 532 | + Qtopia::escapeString(str) + "<br>"; |
529 | str = office(); | 533 | str = office(); |
530 | if ( !str.isEmpty() ) | 534 | if ( !str.isEmpty() ) |
531 | text += "<b>" + QObject::tr("Office: ") + "</b>" | 535 | text += "<b>" + QObject::tr("Office: ") + "</b>" |
532 | + Qtopia::escapeString(str) + "<br>"; | 536 | + Qtopia::escapeString(str) + "<br>"; |
533 | str = businessPhone(); | 537 | str = businessPhone(); |
534 | if ( !str.isEmpty() ) | 538 | if ( !str.isEmpty() ) |
535 | text += "<b>" + QObject::tr("Business Phone: ") + "</b>" | 539 | text += "<b>" + QObject::tr("Business Phone: ") + "</b>" |
536 | + Qtopia::escapeString(str) + "<br>"; | 540 | + Qtopia::escapeString(str) + "<br>"; |
537 | str = businessFax(); | 541 | str = businessFax(); |
538 | if ( !str.isEmpty() ) | 542 | if ( !str.isEmpty() ) |
539 | text += "<b>" + QObject::tr("Business Fax: ") + "</b>" | 543 | text += "<b>" + QObject::tr("Business Fax: ") + "</b>" |
540 | + Qtopia::escapeString(str) + "<br>"; | 544 | + Qtopia::escapeString(str) + "<br>"; |
541 | str = businessMobile(); | 545 | str = businessMobile(); |
542 | if ( !str.isEmpty() ) | 546 | if ( !str.isEmpty() ) |
543 | text += "<b>" + QObject::tr("Business Mobile: ") + "</b>" | 547 | text += "<b>" + QObject::tr("Business Mobile: ") + "</b>" |
544 | + Qtopia::escapeString(str) + "<br>"; | 548 | + Qtopia::escapeString(str) + "<br>"; |
545 | str = businessPager(); | 549 | str = businessPager(); |
546 | if ( !str.isEmpty() ) | 550 | if ( !str.isEmpty() ) |
547 | text += "<b>" + QObject::tr("Business Pager: ") + "</b>" | 551 | text += "<b>" + QObject::tr("Business Pager: ") + "</b>" |
548 | + Qtopia::escapeString(str) + "<br>"; | 552 | + Qtopia::escapeString(str) + "<br>"; |
549 | str = profession(); | 553 | str = profession(); |
550 | if ( !str.isEmpty() ) | 554 | if ( !str.isEmpty() ) |
551 | text += "<b>" + QObject::tr("Profession: ") + "</b>" | 555 | text += "<b>" + QObject::tr("Profession: ") + "</b>" |
552 | + Qtopia::escapeString(str) + "<br>"; | 556 | + Qtopia::escapeString(str) + "<br>"; |
553 | str = assistant(); | 557 | str = assistant(); |
554 | if ( !str.isEmpty() ) | 558 | if ( !str.isEmpty() ) |
555 | text += "<b>" + QObject::tr("Assistant: ") + "</b>" | 559 | text += "<b>" + QObject::tr("Assistant: ") + "</b>" |
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp index efa2777..6aec62e 100644 --- a/libopie2/opiepim/ocontact.cpp +++ b/libopie2/opiepim/ocontact.cpp | |||
@@ -457,99 +457,103 @@ QString OContact::toRichText() const | |||
457 | // business address | 457 | // business address |
458 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || | 458 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || |
459 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { | 459 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { |
460 | text += "<br>"; | 460 | text += "<br>"; |
461 | text += QObject::tr( "<b>Work Address:</b>" ); | 461 | text += QObject::tr( "<b>Work Address:</b>" ); |
462 | text += "<br>"; | 462 | text += "<br>"; |
463 | } | 463 | } |
464 | 464 | ||
465 | if ( !(value = businessStreet()).isEmpty() ) | 465 | if ( !(value = businessStreet()).isEmpty() ) |
466 | text += Qtopia::escapeString(value) + "<br>"; | 466 | text += Qtopia::escapeString(value) + "<br>"; |
467 | state = businessState(); | 467 | state = businessState(); |
468 | if ( !(value = businessCity()).isEmpty() ) { | 468 | if ( !(value = businessCity()).isEmpty() ) { |
469 | text += Qtopia::escapeString(value); | 469 | text += Qtopia::escapeString(value); |
470 | if ( state ) | 470 | if ( state ) |
471 | text += ", " + Qtopia::escapeString(state); | 471 | text += ", " + Qtopia::escapeString(state); |
472 | text += "<br>"; | 472 | text += "<br>"; |
473 | } else if ( !state.isEmpty() ) | 473 | } else if ( !state.isEmpty() ) |
474 | text += Qtopia::escapeString(state) + "<br>"; | 474 | text += Qtopia::escapeString(state) + "<br>"; |
475 | if ( !(value = businessZip()).isEmpty() ) | 475 | if ( !(value = businessZip()).isEmpty() ) |
476 | text += Qtopia::escapeString(value) + "<br>"; | 476 | text += Qtopia::escapeString(value) + "<br>"; |
477 | if ( !(value = businessCountry()).isEmpty() ) | 477 | if ( !(value = businessCountry()).isEmpty() ) |
478 | text += Qtopia::escapeString(value) + "<br>"; | 478 | text += Qtopia::escapeString(value) + "<br>"; |
479 | 479 | ||
480 | // home address | 480 | // home address |
481 | if ( !homeStreet().isEmpty() || !homeCity().isEmpty() || | 481 | if ( !homeStreet().isEmpty() || !homeCity().isEmpty() || |
482 | !homeZip().isEmpty() || !homeCountry().isEmpty() ) { | 482 | !homeZip().isEmpty() || !homeCountry().isEmpty() ) { |
483 | text += "<br>"; | 483 | text += "<br>"; |
484 | text += QObject::tr( "<b>Home Address:</b>" ); | 484 | text += QObject::tr( "<b>Home Address:</b>" ); |
485 | text += "<br>"; | 485 | text += "<br>"; |
486 | } | 486 | } |
487 | 487 | ||
488 | if ( !(value = homeStreet()).isEmpty() ) | 488 | if ( !(value = homeStreet()).isEmpty() ) |
489 | text += Qtopia::escapeString(value) + "<br>"; | 489 | text += Qtopia::escapeString(value) + "<br>"; |
490 | state = homeState(); | 490 | state = homeState(); |
491 | if ( !(value = homeCity()).isEmpty() ) { | 491 | if ( !(value = homeCity()).isEmpty() ) { |
492 | text += Qtopia::escapeString(value); | 492 | text += Qtopia::escapeString(value); |
493 | if ( !state.isEmpty() ) | 493 | if ( !state.isEmpty() ) |
494 | text += ", " + Qtopia::escapeString(state); | 494 | text += ", " + Qtopia::escapeString(state); |
495 | text += "<br>"; | 495 | text += "<br>"; |
496 | } else if (!state.isEmpty()) | 496 | } else if (!state.isEmpty()) |
497 | text += Qtopia::escapeString(state) + "<br>"; | 497 | text += Qtopia::escapeString(state) + "<br>"; |
498 | if ( !(value = homeZip()).isEmpty() ) | 498 | if ( !(value = homeZip()).isEmpty() ) |
499 | text += Qtopia::escapeString(value) + "<br>"; | 499 | text += Qtopia::escapeString(value) + "<br>"; |
500 | if ( !(value = homeCountry()).isEmpty() ) | 500 | if ( !(value = homeCountry()).isEmpty() ) |
501 | text += Qtopia::escapeString(value) + "<br>"; | 501 | text += Qtopia::escapeString(value) + "<br>"; |
502 | 502 | ||
503 | // the others... | 503 | // the others... |
504 | QString str; | 504 | QString str; |
505 | QString defEmail = defaultEmail(); | ||
506 | if ( !defEmail.isEmpty() ) | ||
507 | text += "<b>" + QObject::tr("Default Email: ") + "</b>" | ||
508 | + Qtopia::escapeString(defEmail) + "<br>"; | ||
505 | str = emails(); | 509 | str = emails(); |
506 | if ( !str.isEmpty() ) | 510 | if ( !str.isEmpty() && ( str != defEmail ) ) |
507 | text += "<b>" + QObject::tr("Email Addresses: ") + "</b>" | 511 | text += "<b>" + QObject::tr("All Emails: ") + "</b>" |
508 | + Qtopia::escapeString(str) + "<br>"; | 512 | + Qtopia::escapeString(str) + "<br>"; |
509 | str = homePhone(); | 513 | str = homePhone(); |
510 | if ( !str.isEmpty() ) | 514 | if ( !str.isEmpty() ) |
511 | text += "<b>" + QObject::tr("Home Phone: ") + "</b>" | 515 | text += "<b>" + QObject::tr("Home Phone: ") + "</b>" |
512 | + Qtopia::escapeString(str) + "<br>"; | 516 | + Qtopia::escapeString(str) + "<br>"; |
513 | str = homeFax(); | 517 | str = homeFax(); |
514 | if ( !str.isEmpty() ) | 518 | if ( !str.isEmpty() ) |
515 | text += "<b>" + QObject::tr("Home Fax: ") + "</b>" | 519 | text += "<b>" + QObject::tr("Home Fax: ") + "</b>" |
516 | + Qtopia::escapeString(str) + "<br>"; | 520 | + Qtopia::escapeString(str) + "<br>"; |
517 | str = homeMobile(); | 521 | str = homeMobile(); |
518 | if ( !str.isEmpty() ) | 522 | if ( !str.isEmpty() ) |
519 | text += "<b>" + QObject::tr("Home Mobile: ") + "</b>" | 523 | text += "<b>" + QObject::tr("Home Mobile: ") + "</b>" |
520 | + Qtopia::escapeString(str) + "<br>"; | 524 | + Qtopia::escapeString(str) + "<br>"; |
521 | str = homeWebpage(); | 525 | str = homeWebpage(); |
522 | if ( !str.isEmpty() ) | 526 | if ( !str.isEmpty() ) |
523 | text += "<b>" + QObject::tr("Home Web Page: ") + "</b>" | 527 | text += "<b>" + QObject::tr("Home Web Page: ") + "</b>" |
524 | + Qtopia::escapeString(str) + "<br>"; | 528 | + Qtopia::escapeString(str) + "<br>"; |
525 | str = businessWebpage(); | 529 | str = businessWebpage(); |
526 | if ( !str.isEmpty() ) | 530 | if ( !str.isEmpty() ) |
527 | text += "<b>" + QObject::tr("Business Web Page: ") + "</b>" | 531 | text += "<b>" + QObject::tr("Business Web Page: ") + "</b>" |
528 | + Qtopia::escapeString(str) + "<br>"; | 532 | + Qtopia::escapeString(str) + "<br>"; |
529 | str = office(); | 533 | str = office(); |
530 | if ( !str.isEmpty() ) | 534 | if ( !str.isEmpty() ) |
531 | text += "<b>" + QObject::tr("Office: ") + "</b>" | 535 | text += "<b>" + QObject::tr("Office: ") + "</b>" |
532 | + Qtopia::escapeString(str) + "<br>"; | 536 | + Qtopia::escapeString(str) + "<br>"; |
533 | str = businessPhone(); | 537 | str = businessPhone(); |
534 | if ( !str.isEmpty() ) | 538 | if ( !str.isEmpty() ) |
535 | text += "<b>" + QObject::tr("Business Phone: ") + "</b>" | 539 | text += "<b>" + QObject::tr("Business Phone: ") + "</b>" |
536 | + Qtopia::escapeString(str) + "<br>"; | 540 | + Qtopia::escapeString(str) + "<br>"; |
537 | str = businessFax(); | 541 | str = businessFax(); |
538 | if ( !str.isEmpty() ) | 542 | if ( !str.isEmpty() ) |
539 | text += "<b>" + QObject::tr("Business Fax: ") + "</b>" | 543 | text += "<b>" + QObject::tr("Business Fax: ") + "</b>" |
540 | + Qtopia::escapeString(str) + "<br>"; | 544 | + Qtopia::escapeString(str) + "<br>"; |
541 | str = businessMobile(); | 545 | str = businessMobile(); |
542 | if ( !str.isEmpty() ) | 546 | if ( !str.isEmpty() ) |
543 | text += "<b>" + QObject::tr("Business Mobile: ") + "</b>" | 547 | text += "<b>" + QObject::tr("Business Mobile: ") + "</b>" |
544 | + Qtopia::escapeString(str) + "<br>"; | 548 | + Qtopia::escapeString(str) + "<br>"; |
545 | str = businessPager(); | 549 | str = businessPager(); |
546 | if ( !str.isEmpty() ) | 550 | if ( !str.isEmpty() ) |
547 | text += "<b>" + QObject::tr("Business Pager: ") + "</b>" | 551 | text += "<b>" + QObject::tr("Business Pager: ") + "</b>" |
548 | + Qtopia::escapeString(str) + "<br>"; | 552 | + Qtopia::escapeString(str) + "<br>"; |
549 | str = profession(); | 553 | str = profession(); |
550 | if ( !str.isEmpty() ) | 554 | if ( !str.isEmpty() ) |
551 | text += "<b>" + QObject::tr("Profession: ") + "</b>" | 555 | text += "<b>" + QObject::tr("Profession: ") + "</b>" |
552 | + Qtopia::escapeString(str) + "<br>"; | 556 | + Qtopia::escapeString(str) + "<br>"; |
553 | str = assistant(); | 557 | str = assistant(); |
554 | if ( !str.isEmpty() ) | 558 | if ( !str.isEmpty() ) |
555 | text += "<b>" + QObject::tr("Assistant: ") + "</b>" | 559 | text += "<b>" + QObject::tr("Assistant: ") + "</b>" |