summaryrefslogtreecommitdiff
authoreilers <eilers>2003-08-06 12:21:16 (UTC)
committer eilers <eilers>2003-08-06 12:21:16 (UTC)
commitba25812361114b7cf059a3a1fb3aed42f8a7ebde (patch) (side-by-side diff)
treea3f2fa10c70a2e4697ae4298260b4f5da54750f0
parentf1d5295227f5f15ad5e2a9d180fdbce18568cb71 (diff)
downloadopie-ba25812361114b7cf059a3a1fb3aed42f8a7ebde.zip
opie-ba25812361114b7cf059a3a1fb3aed42f8a7ebde.tar.gz
opie-ba25812361114b7cf059a3a1fb3aed42f8a7ebde.tar.bz2
Cardview update: It is more compressed. Pending: Add pricture for work- and home address..
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/ocontact.cpp18
-rw-r--r--libopie2/opiepim/ocontact.cpp18
2 files changed, 18 insertions, 18 deletions
diff --git a/libopie/pim/ocontact.cpp b/libopie/pim/ocontact.cpp
index 3473baa..e34feeb 100644
--- a/libopie/pim/ocontact.cpp
+++ b/libopie/pim/ocontact.cpp
@@ -465,45 +465,45 @@ QString OContact::toRichText() const
// defailt email
QString defEmail = defaultEmail();
if ( !defEmail.isEmpty() ){
text += "<b><img src=\"addressbook/email\"> " + QObject::tr("Default Email: ") + "</b>"
+ Qtopia::escapeString(defEmail);
marker = true;
}
// business address
if ( !businessStreet().isEmpty() || !businessCity().isEmpty() ||
!businessZip().isEmpty() || !businessCountry().isEmpty() ) {
- text += QObject::tr( "<br><br><b>Work Address:</b>" );
+ text += QObject::tr( "<br><b>Work Address:</b>" );
marker = true;
}
if ( !(value = businessStreet()).isEmpty() ){
text += "<br>" + Qtopia::escapeString(value);
marker = true;
}
switch( addressformat ){
case Zip_City_State:{ // Zip_Code City, State
state = businessState();
if ( !(value = businessZip()).isEmpty() ){
text += "<br>" + Qtopia::escapeString(value) + " ";
marker = true;
- } else
- text += "<br>";
-
+ }
if ( !(value = businessCity()).isEmpty() ) {
marker = true;
+ if ( businessZip().isEmpty() && !businessStreet().isEmpty() )
+ text += "<br>";
text += Qtopia::escapeString(value);
if ( state )
text += ", " + Qtopia::escapeString(state);
} else if ( !state.isEmpty() ){
text += "<br>" + Qtopia::escapeString(state);
marker = true;
}
break;
}
case City_State_Zip:{ // City, State Zip_Code
state = businessState();
if ( !(value = businessCity()).isEmpty() ) {
@@ -557,49 +557,49 @@ QString OContact::toRichText() const
if ( !str.isEmpty() ){
text += "<br><b><img src=\"addressbook/mobilework\"> " + QObject::tr("Business Mobile: ") + "</b>"
+ Qtopia::escapeString(str);
marker = true;
}
str = businessPager();
if ( !str.isEmpty() ){
text += "<br><b>" + QObject::tr("Business Pager: ") + "</b>"
+ Qtopia::escapeString(str);
marker = true;
}
- text += "<br>";
+ // text += "<br>";
// home address
if ( !homeStreet().isEmpty() || !homeCity().isEmpty() ||
!homeZip().isEmpty() || !homeCountry().isEmpty() ) {
- text += QObject::tr( "<br><br><b>Home Address:</b>" );
+ text += QObject::tr( "<br><b>Home Address:</b>" );
marker = true;
}
if ( !(value = homeStreet()).isEmpty() ){
text += "<br>" + Qtopia::escapeString(value);
marker = true;
}
switch( addressformat ){
case Zip_City_State:{ // Zip_Code City, State
state = homeState();
if ( !(value = homeZip()).isEmpty() ){
text += "<br>" + Qtopia::escapeString(value) + " ";
marker = true;
- } else
- text += "<br>";
-
+ }
if ( !(value = homeCity()).isEmpty() ) {
marker = true;
+ if ( homeZip().isEmpty() && !homeStreet().isEmpty() )
+ text += "<br>";
text += Qtopia::escapeString(value);
if ( !state.isEmpty() )
text += ", " + Qtopia::escapeString(state);
} else if (!state.isEmpty()) {
text += "<br>" + Qtopia::escapeString(state);
marker = true;
}
break;
}
case City_State_Zip:{ // City, State Zip_Code
state = homeState();
if ( !(value = homeCity()).isEmpty() ) {
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp
index 3473baa..e34feeb 100644
--- a/libopie2/opiepim/ocontact.cpp
+++ b/libopie2/opiepim/ocontact.cpp
@@ -465,45 +465,45 @@ QString OContact::toRichText() const
// defailt email
QString defEmail = defaultEmail();
if ( !defEmail.isEmpty() ){
text += "<b><img src=\"addressbook/email\"> " + QObject::tr("Default Email: ") + "</b>"
+ Qtopia::escapeString(defEmail);
marker = true;
}
// business address
if ( !businessStreet().isEmpty() || !businessCity().isEmpty() ||
!businessZip().isEmpty() || !businessCountry().isEmpty() ) {
- text += QObject::tr( "<br><br><b>Work Address:</b>" );
+ text += QObject::tr( "<br><b>Work Address:</b>" );
marker = true;
}
if ( !(value = businessStreet()).isEmpty() ){
text += "<br>" + Qtopia::escapeString(value);
marker = true;
}
switch( addressformat ){
case Zip_City_State:{ // Zip_Code City, State
state = businessState();
if ( !(value = businessZip()).isEmpty() ){
text += "<br>" + Qtopia::escapeString(value) + " ";
marker = true;
- } else
- text += "<br>";
-
+ }
if ( !(value = businessCity()).isEmpty() ) {
marker = true;
+ if ( businessZip().isEmpty() && !businessStreet().isEmpty() )
+ text += "<br>";
text += Qtopia::escapeString(value);
if ( state )
text += ", " + Qtopia::escapeString(state);
} else if ( !state.isEmpty() ){
text += "<br>" + Qtopia::escapeString(state);
marker = true;
}
break;
}
case City_State_Zip:{ // City, State Zip_Code
state = businessState();
if ( !(value = businessCity()).isEmpty() ) {
@@ -557,49 +557,49 @@ QString OContact::toRichText() const
if ( !str.isEmpty() ){
text += "<br><b><img src=\"addressbook/mobilework\"> " + QObject::tr("Business Mobile: ") + "</b>"
+ Qtopia::escapeString(str);
marker = true;
}
str = businessPager();
if ( !str.isEmpty() ){
text += "<br><b>" + QObject::tr("Business Pager: ") + "</b>"
+ Qtopia::escapeString(str);
marker = true;
}
- text += "<br>";
+ // text += "<br>";
// home address
if ( !homeStreet().isEmpty() || !homeCity().isEmpty() ||
!homeZip().isEmpty() || !homeCountry().isEmpty() ) {
- text += QObject::tr( "<br><br><b>Home Address:</b>" );
+ text += QObject::tr( "<br><b>Home Address:</b>" );
marker = true;
}
if ( !(value = homeStreet()).isEmpty() ){
text += "<br>" + Qtopia::escapeString(value);
marker = true;
}
switch( addressformat ){
case Zip_City_State:{ // Zip_Code City, State
state = homeState();
if ( !(value = homeZip()).isEmpty() ){
text += "<br>" + Qtopia::escapeString(value) + " ";
marker = true;
- } else
- text += "<br>";
-
+ }
if ( !(value = homeCity()).isEmpty() ) {
marker = true;
+ if ( homeZip().isEmpty() && !homeStreet().isEmpty() )
+ text += "<br>";
text += Qtopia::escapeString(value);
if ( !state.isEmpty() )
text += ", " + Qtopia::escapeString(state);
} else if (!state.isEmpty()) {
text += "<br>" + Qtopia::escapeString(state);
marker = true;
}
break;
}
case City_State_Zip:{ // City, State Zip_Code
state = homeState();
if ( !(value = homeCity()).isEmpty() ) {