-rw-r--r-- | kabc/addressee.cpp | 4 | ||||
-rw-r--r-- | kabc/addressee.h | 2 | ||||
-rw-r--r-- | kabc/field.cpp | 8 |
3 files changed, 12 insertions, 2 deletions
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 789a694..0d8e8e8 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -1086,24 +1086,28 @@ QString Addressee::carPhoneLabel() QString Addressee::isdnLabel() { return i18n("ISDN"); } QString Addressee::pagerLabel() { return i18n("Pager"); } +QString Addressee::otherPhoneLabel() +{ + return i18n("Other Phone"); +} QString Addressee::sipLabel() { return i18n("SIP"); } QString Addressee::emailLabel() { return i18n("Email Address"); } diff --git a/kabc/addressee.h b/kabc/addressee.h index 0c488eb..fcadda6 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h @@ -349,25 +349,25 @@ class Addressee */ static QString carPhoneLabel(); /** Return translated label for isdn field. */ static QString isdnLabel(); /** Return translated label for pager field. */ static QString pagerLabel(); - + static QString otherPhoneLabel(); /** Return translated label for sip field. */ static QString sipLabel(); /** Return translated label for email field. */ static QString emailLabel(); /** Set mail client. diff --git a/kabc/field.cpp b/kabc/field.cpp index 20885de..6f2b307 100644 --- a/kabc/field.cpp +++ b/kabc/field.cpp @@ -79,25 +79,26 @@ class Field::FieldImpl Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, Url, Resource, Sip, MobileWorkPhone, - MobileHomePhone + MobileHomePhone, + OtherPhone }; int fieldId() { return mFieldId; } int category() { return mCategory; } QString label() { return mLabel; } QString key() { return mKey; } QString app() { return mApp; } private: int mFieldId; int mCategory; @@ -197,24 +198,26 @@ QString Field::label() case FieldImpl::Organization: return Addressee::organizationLabel(); case FieldImpl::Note: return Addressee::noteLabel(); case FieldImpl::Url: return Addressee::urlLabel(); case FieldImpl::Resource: return Addressee::resourceLabel(); case FieldImpl::Category: return Addressee::categoryLabel(); case FieldImpl::Sip: return Addressee::sipLabel(); + case FieldImpl::OtherPhone: + return Addressee::otherPhoneLabel(); case FieldImpl::CustomField: return mImpl->label(); default: return i18n("Unknown Field"); } } int Field::category() { return mImpl->category(); } @@ -301,24 +304,26 @@ QString Field::value( const KABC::Addressee &a ) case FieldImpl::HomeFax: return a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ).number(); case FieldImpl::BusinessFax: return a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ).number(); case FieldImpl::CarPhone: return a.phoneNumber( PhoneNumber::Car ).number(); case FieldImpl::Isdn: return a.phoneNumber( PhoneNumber::Isdn ).number(); case FieldImpl::Pager: return a.phoneNumber( PhoneNumber::Pager ).number(); case FieldImpl::Sip: return a.phoneNumber( PhoneNumber::Pcs | PhoneNumber::Pref ).number(); + case FieldImpl::OtherPhone: + return a.phoneNumber( PhoneNumber::Voice ).number(); case FieldImpl::HomeAddressStreet: return a.address( Address::Home ).street(); case FieldImpl::HomeAddressLocality: return a.address( Address::Home ).locality(); case FieldImpl::HomeAddressRegion: return a.address( Address::Home ).region(); case FieldImpl::HomeAddressPostalCode: return a.address( Address::Home ).postalCode(); case FieldImpl::HomeAddressCountry: return a.address( Address::Home ).country(); case FieldImpl::BusinessAddressStreet: return a.address( Address::Work ).street(); @@ -433,24 +438,25 @@ Field::List Field::allFields() createField( FieldImpl::CarPhone ); createField( FieldImpl::Isdn ); createField( FieldImpl::Pager ); createField( FieldImpl::Email, Email|Frequent ); createField( FieldImpl::Mailer, Email ); createField( FieldImpl::Title, Organization ); createField( FieldImpl::Role, Organization ); createField( FieldImpl::Organization, Organization ); createField( FieldImpl::Note ); createField( FieldImpl::Url ); createField( FieldImpl::Resource ); createField( FieldImpl::Sip ); + createField( FieldImpl::OtherPhone ); } return mAllFields; } Field::List Field::defaultFields() { if ( mDefaultFields.isEmpty() ) { createDefaultField( FieldImpl::GivenName ); createDefaultField( FieldImpl::FamilyName ); createDefaultField( FieldImpl::Email ); } |