-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 // business address if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || !businessZip().isEmpty() || !businessCountry().isEmpty() ) { text += "<br>"; text += QObject::tr( "<b>Work Address:</b>" ); text += "<br>"; } if ( !(value = businessStreet()).isEmpty() ) text += Qtopia::escapeString(value) + "<br>"; state = businessState(); if ( !(value = businessCity()).isEmpty() ) { text += Qtopia::escapeString(value); if ( state ) text += ", " + Qtopia::escapeString(state); text += "<br>"; } else if ( !state.isEmpty() ) text += Qtopia::escapeString(state) + "<br>"; if ( !(value = businessZip()).isEmpty() ) text += Qtopia::escapeString(value) + "<br>"; if ( !(value = businessCountry()).isEmpty() ) text += Qtopia::escapeString(value) + "<br>"; // home address if ( !homeStreet().isEmpty() || !homeCity().isEmpty() || !homeZip().isEmpty() || !homeCountry().isEmpty() ) { text += "<br>"; text += QObject::tr( "<b>Home Address:</b>" ); text += "<br>"; } if ( !(value = homeStreet()).isEmpty() ) text += Qtopia::escapeString(value) + "<br>"; state = homeState(); if ( !(value = homeCity()).isEmpty() ) { text += Qtopia::escapeString(value); if ( !state.isEmpty() ) text += ", " + Qtopia::escapeString(state); text += "<br>"; } else if (!state.isEmpty()) text += Qtopia::escapeString(state) + "<br>"; if ( !(value = homeZip()).isEmpty() ) text += Qtopia::escapeString(value) + "<br>"; if ( !(value = homeCountry()).isEmpty() ) text += Qtopia::escapeString(value) + "<br>"; // the others... QString str; + QString defEmail = defaultEmail(); + if ( !defEmail.isEmpty() ) + text += "<b>" + QObject::tr("Default Email: ") + "</b>" + + Qtopia::escapeString(defEmail) + "<br>"; str = emails(); - if ( !str.isEmpty() ) - text += "<b>" + QObject::tr("Email Addresses: ") + "</b>" + if ( !str.isEmpty() && ( str != defEmail ) ) + text += "<b>" + QObject::tr("All Emails: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = homePhone(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Home Phone: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = homeFax(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Home Fax: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = homeMobile(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Home Mobile: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = homeWebpage(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Home Web Page: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = businessWebpage(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Business Web Page: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = office(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Office: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = businessPhone(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Business Phone: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = businessFax(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Business Fax: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = businessMobile(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Business Mobile: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = businessPager(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Business Pager: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = profession(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Profession: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = assistant(); if ( !str.isEmpty() ) 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 // business address if ( !businessStreet().isEmpty() || !businessCity().isEmpty() || !businessZip().isEmpty() || !businessCountry().isEmpty() ) { text += "<br>"; text += QObject::tr( "<b>Work Address:</b>" ); text += "<br>"; } if ( !(value = businessStreet()).isEmpty() ) text += Qtopia::escapeString(value) + "<br>"; state = businessState(); if ( !(value = businessCity()).isEmpty() ) { text += Qtopia::escapeString(value); if ( state ) text += ", " + Qtopia::escapeString(state); text += "<br>"; } else if ( !state.isEmpty() ) text += Qtopia::escapeString(state) + "<br>"; if ( !(value = businessZip()).isEmpty() ) text += Qtopia::escapeString(value) + "<br>"; if ( !(value = businessCountry()).isEmpty() ) text += Qtopia::escapeString(value) + "<br>"; // home address if ( !homeStreet().isEmpty() || !homeCity().isEmpty() || !homeZip().isEmpty() || !homeCountry().isEmpty() ) { text += "<br>"; text += QObject::tr( "<b>Home Address:</b>" ); text += "<br>"; } if ( !(value = homeStreet()).isEmpty() ) text += Qtopia::escapeString(value) + "<br>"; state = homeState(); if ( !(value = homeCity()).isEmpty() ) { text += Qtopia::escapeString(value); if ( !state.isEmpty() ) text += ", " + Qtopia::escapeString(state); text += "<br>"; } else if (!state.isEmpty()) text += Qtopia::escapeString(state) + "<br>"; if ( !(value = homeZip()).isEmpty() ) text += Qtopia::escapeString(value) + "<br>"; if ( !(value = homeCountry()).isEmpty() ) text += Qtopia::escapeString(value) + "<br>"; // the others... QString str; + QString defEmail = defaultEmail(); + if ( !defEmail.isEmpty() ) + text += "<b>" + QObject::tr("Default Email: ") + "</b>" + + Qtopia::escapeString(defEmail) + "<br>"; str = emails(); - if ( !str.isEmpty() ) - text += "<b>" + QObject::tr("Email Addresses: ") + "</b>" + if ( !str.isEmpty() && ( str != defEmail ) ) + text += "<b>" + QObject::tr("All Emails: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = homePhone(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Home Phone: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = homeFax(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Home Fax: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = homeMobile(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Home Mobile: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = homeWebpage(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Home Web Page: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = businessWebpage(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Business Web Page: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = office(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Office: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = businessPhone(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Business Phone: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = businessFax(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Business Fax: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = businessMobile(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Business Mobile: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = businessPager(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Business Pager: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = profession(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Profession: ") + "</b>" + Qtopia::escapeString(str) + "<br>"; str = assistant(); if ( !str.isEmpty() ) text += "<b>" + QObject::tr("Assistant: ") + "</b>" |