summaryrefslogtreecommitdiffabout
path: root/kabc
Side-by-side diff
Diffstat (limited to 'kabc') (more/less context) (show whitespace changes)
-rw-r--r--kabc/address.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/kabc/address.cpp b/kabc/address.cpp
index 26e0b6a..c820a6c 100644
--- a/kabc/address.cpp
+++ b/kabc/address.cpp
@@ -281,24 +281,44 @@ QString Address::labelLabel()
Address::TypeList Address::typeList()
{
TypeList list;
list << Dom << Intl << Postal << Parcel << Home << Work << Pref;
return list;
}
QString Address::typeLabel( int type )
{
+ QString label;
+ if ( type & Dom )
+ label += i18n("Domestic")+" ";
+ if ( type & Intl )
+ label += i18n("International")+" ";
+ if ( type & Postal )
+ label += i18n("Postal")+" ";
+ if ( type & Parcel )
+ label += i18n("Parcel")+" ";
+ if ( type & Work )
+ label += i18n("Work Address", "Work")+" ";
+ if ( type & Home )
+ label += i18n("Home Address", "Home") +" ";
+ if ( type & Pref )
+ label += i18n("Preferred Address", "(p)");
+ if ( label.isEmpty() )
+ label = i18n("Other");
+ return label;
+
+#if 0
switch ( type ) {
case Dom:
return i18n("Domestic");
break;
case Intl:
return i18n("International");
break;
case Postal:
return i18n("Postal");
break;
case Parcel:
return i18n("Parcel");
@@ -307,24 +327,25 @@ QString Address::typeLabel( int type )
return i18n("Home Address", "Home");
break;
case Work:
return i18n("Work Address", "Work");
break;
case Pref:
return i18n("Preferred Address");
break;
default:
return i18n("Other");
break;
}
+#endif
}
void Address::dump() const
{
qDebug("Address::dump() +++++++++++++++++ ");
#if 0
kdDebug(5700) << " Address {" << endl;
kdDebug(5700) << " Id: " << id() << endl;
kdDebug(5700) << " Extended: " << extended() << endl;
kdDebug(5700) << " Street: " << street() << endl;
kdDebug(5700) << " Postal Code: " << postalCode() << endl;
kdDebug(5700) << " Locality: " << locality() << endl;