author | eilers <eilers> | 2003-09-08 12:42:26 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-09-08 12:42:26 (UTC) |
commit | 913788f77c3f501778b7653317a4a6b06452961d (patch) (unidiff) | |
tree | b9393e5b7eefb87f3a421a17035b702a6b688eb7 | |
parent | 7fb091e12eec52e3d73896c728fc011fe40a3eb4 (diff) | |
download | opie-913788f77c3f501778b7653317a4a6b06452961d.zip opie-913788f77c3f501778b7653317a4a6b06452961d.tar.gz opie-913788f77c3f501778b7653317a4a6b06452961d.tar.bz2 |
Fixing bug #1161: No space between jobtitle and organization
-rw-r--r-- | libopie/pim/ocontact.cpp | 12 | ||||
-rw-r--r-- | libopie2/opiepim/ocontact.cpp | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp index 0f05b65..fcf3b26 100644 --- a/libopie/pim/ocontact.cpp +++ b/libopie/pim/ocontact.cpp | |||
@@ -427,61 +427,57 @@ QMap<int, QString> OContact::toMap() const | |||
427 | if ( !cats.isEmpty() ) | 427 | if ( !cats.isEmpty() ) |
428 | map.insert( Qtopia::AddressCategory, cats ); | 428 | map.insert( Qtopia::AddressCategory, cats ); |
429 | return map; | 429 | return map; |
430 | } | 430 | } |
431 | 431 | ||
432 | /*! | 432 | /*! |
433 | Returns a rich text formatted QString representing the contents the contact. | 433 | Returns a rich text formatted QString representing the contents the contact. |
434 | */ | 434 | */ |
435 | QString OContact::toRichText() const | 435 | QString OContact::toRichText() const |
436 | { | 436 | { |
437 | QString text; | 437 | QString text; |
438 | QString value, comp, state; | 438 | QString value, comp, state; |
439 | QString str; | 439 | QString str; |
440 | bool marker = false; | 440 | bool marker = false; |
441 | 441 | ||
442 | Config cfg("qpe"); | 442 | Config cfg("qpe"); |
443 | cfg.setGroup("Appearance"); | 443 | cfg.setGroup("Appearance"); |
444 | int addressformat = cfg.readNumEntry( "AddressFormat", Zip_City_State ); | 444 | int addressformat = cfg.readNumEntry( "AddressFormat", Zip_City_State ); |
445 | 445 | ||
446 | // name, jobtitle and company | 446 | // name, jobtitle and company |
447 | if ( !(value = fullName()).isEmpty() ) | 447 | if ( !(value = fullName()).isEmpty() ) |
448 | text += "<b><h3><img src=\"addressbook/AddressBook\"> " + Qtopia::escapeString(value) + "</h3></b>"; | 448 | text += "<b><h3><img src=\"addressbook/AddressBook\"> " + Qtopia::escapeString(value) + "</h3></b>"; |
449 | 449 | ||
450 | if ( !(value = jobTitle()).isEmpty() ) | 450 | if ( !(value = jobTitle()).isEmpty() ) |
451 | text += Qtopia::escapeString(value); | 451 | text += Qtopia::escapeString(value) + " "; |
452 | 452 | ||
453 | comp = company(); | 453 | comp = company(); |
454 | if ( !(value = department()).isEmpty() ) { | 454 | if ( !(value = department()).isEmpty() ) { |
455 | text += Qtopia::escapeString(value); | 455 | text += Qtopia::escapeString(value); |
456 | if ( comp ) | 456 | if ( comp ) |
457 | text += ", "; | 457 | text += ", " + Qtopia::escapeString(comp); |
458 | else | 458 | }else if ( comp ) |
459 | text += "<br>"; | 459 | text += "<br>" + Qtopia::escapeString(comp); |
460 | } | ||
461 | if ( !comp.isEmpty() ) | ||
462 | text += Qtopia::escapeString(comp); | ||
463 | |||
464 | text += "<br><hr>"; | 460 | text += "<br><hr>"; |
465 | 461 | ||
466 | // defailt email | 462 | // defailt email |
467 | QString defEmail = defaultEmail(); | 463 | QString defEmail = defaultEmail(); |
468 | if ( !defEmail.isEmpty() ){ | 464 | if ( !defEmail.isEmpty() ){ |
469 | text += "<b><img src=\"addressbook/email\"> " + QObject::tr("Default Email: ") + "</b>" | 465 | text += "<b><img src=\"addressbook/email\"> " + QObject::tr("Default Email: ") + "</b>" |
470 | + Qtopia::escapeString(defEmail); | 466 | + Qtopia::escapeString(defEmail); |
471 | marker = true; | 467 | marker = true; |
472 | } | 468 | } |
473 | 469 | ||
474 | // business address | 470 | // business address |
475 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || | 471 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || |
476 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { | 472 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { |
477 | text += QObject::tr( "<br><b>Work Address:</b>" ); | 473 | text += QObject::tr( "<br><b>Work Address:</b>" ); |
478 | marker = true; | 474 | marker = true; |
479 | } | 475 | } |
480 | 476 | ||
481 | if ( !(value = businessStreet()).isEmpty() ){ | 477 | if ( !(value = businessStreet()).isEmpty() ){ |
482 | text += "<br>" + Qtopia::escapeString(value); | 478 | text += "<br>" + Qtopia::escapeString(value); |
483 | marker = true; | 479 | marker = true; |
484 | } | 480 | } |
485 | 481 | ||
486 | switch( addressformat ){ | 482 | switch( addressformat ){ |
487 | case Zip_City_State:{ // Zip_Code City, State | 483 | case Zip_City_State:{ // Zip_Code City, State |
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp index 0f05b65..fcf3b26 100644 --- a/libopie2/opiepim/ocontact.cpp +++ b/libopie2/opiepim/ocontact.cpp | |||
@@ -427,61 +427,57 @@ QMap<int, QString> OContact::toMap() const | |||
427 | if ( !cats.isEmpty() ) | 427 | if ( !cats.isEmpty() ) |
428 | map.insert( Qtopia::AddressCategory, cats ); | 428 | map.insert( Qtopia::AddressCategory, cats ); |
429 | return map; | 429 | return map; |
430 | } | 430 | } |
431 | 431 | ||
432 | /*! | 432 | /*! |
433 | Returns a rich text formatted QString representing the contents the contact. | 433 | Returns a rich text formatted QString representing the contents the contact. |
434 | */ | 434 | */ |
435 | QString OContact::toRichText() const | 435 | QString OContact::toRichText() const |
436 | { | 436 | { |
437 | QString text; | 437 | QString text; |
438 | QString value, comp, state; | 438 | QString value, comp, state; |
439 | QString str; | 439 | QString str; |
440 | bool marker = false; | 440 | bool marker = false; |
441 | 441 | ||
442 | Config cfg("qpe"); | 442 | Config cfg("qpe"); |
443 | cfg.setGroup("Appearance"); | 443 | cfg.setGroup("Appearance"); |
444 | int addressformat = cfg.readNumEntry( "AddressFormat", Zip_City_State ); | 444 | int addressformat = cfg.readNumEntry( "AddressFormat", Zip_City_State ); |
445 | 445 | ||
446 | // name, jobtitle and company | 446 | // name, jobtitle and company |
447 | if ( !(value = fullName()).isEmpty() ) | 447 | if ( !(value = fullName()).isEmpty() ) |
448 | text += "<b><h3><img src=\"addressbook/AddressBook\"> " + Qtopia::escapeString(value) + "</h3></b>"; | 448 | text += "<b><h3><img src=\"addressbook/AddressBook\"> " + Qtopia::escapeString(value) + "</h3></b>"; |
449 | 449 | ||
450 | if ( !(value = jobTitle()).isEmpty() ) | 450 | if ( !(value = jobTitle()).isEmpty() ) |
451 | text += Qtopia::escapeString(value); | 451 | text += Qtopia::escapeString(value) + " "; |
452 | 452 | ||
453 | comp = company(); | 453 | comp = company(); |
454 | if ( !(value = department()).isEmpty() ) { | 454 | if ( !(value = department()).isEmpty() ) { |
455 | text += Qtopia::escapeString(value); | 455 | text += Qtopia::escapeString(value); |
456 | if ( comp ) | 456 | if ( comp ) |
457 | text += ", "; | 457 | text += ", " + Qtopia::escapeString(comp); |
458 | else | 458 | }else if ( comp ) |
459 | text += "<br>"; | 459 | text += "<br>" + Qtopia::escapeString(comp); |
460 | } | ||
461 | if ( !comp.isEmpty() ) | ||
462 | text += Qtopia::escapeString(comp); | ||
463 | |||
464 | text += "<br><hr>"; | 460 | text += "<br><hr>"; |
465 | 461 | ||
466 | // defailt email | 462 | // defailt email |
467 | QString defEmail = defaultEmail(); | 463 | QString defEmail = defaultEmail(); |
468 | if ( !defEmail.isEmpty() ){ | 464 | if ( !defEmail.isEmpty() ){ |
469 | text += "<b><img src=\"addressbook/email\"> " + QObject::tr("Default Email: ") + "</b>" | 465 | text += "<b><img src=\"addressbook/email\"> " + QObject::tr("Default Email: ") + "</b>" |
470 | + Qtopia::escapeString(defEmail); | 466 | + Qtopia::escapeString(defEmail); |
471 | marker = true; | 467 | marker = true; |
472 | } | 468 | } |
473 | 469 | ||
474 | // business address | 470 | // business address |
475 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || | 471 | if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || |
476 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { | 472 | !businessZip().isEmpty() || !businessCountry().isEmpty() ) { |
477 | text += QObject::tr( "<br><b>Work Address:</b>" ); | 473 | text += QObject::tr( "<br><b>Work Address:</b>" ); |
478 | marker = true; | 474 | marker = true; |
479 | } | 475 | } |
480 | 476 | ||
481 | if ( !(value = businessStreet()).isEmpty() ){ | 477 | if ( !(value = businessStreet()).isEmpty() ){ |
482 | text += "<br>" + Qtopia::escapeString(value); | 478 | text += "<br>" + Qtopia::escapeString(value); |
483 | marker = true; | 479 | marker = true; |
484 | } | 480 | } |
485 | 481 | ||
486 | switch( addressformat ){ | 482 | switch( addressformat ){ |
487 | case Zip_City_State:{ // Zip_Code City, State | 483 | case Zip_City_State:{ // Zip_Code City, State |