-rw-r--r-- | bin/kdepim/kaddressbook/germantranslation.txt | 6 | ||||
-rw-r--r-- | kabc/addressee.cpp | 4 | ||||
-rw-r--r-- | kabc/addressee.h | 2 | ||||
-rw-r--r-- | kabc/field.cpp | 8 | ||||
-rw-r--r-- | kaddressbook/phoneeditwidget.cpp | 33 |
5 files changed, 36 insertions, 17 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt index f12f880..06f25e9 100644 --- a/bin/kdepim/kaddressbook/germantranslation.txt +++ b/bin/kdepim/kaddressbook/germantranslation.txt @@ -402,3 +402,3 @@ { "Messenger","Messenger" },
-{ "Other","Anderes" },
+{ "Other","Sonstiges" },
{ "Video","Video" },
@@ -826,3 +826,3 @@ { "Callback","Rückruf" },
-{ "Fax (Other)","Fax (Anderes)" },
+{ "Fax (Other)","Fax (Sonst.)" },
{ "Primary","Bevorzugt" },
@@ -831,3 +831,3 @@ { "Format.n.:","Format.N.:" },
-{ "","" },
+{ "Other Phone","Sonst. Telefon" },
{ "","" },
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 789a694..0d8e8e8 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -1097,2 +1097,6 @@ QString Addressee::pagerLabel() } +QString Addressee::otherPhoneLabel() +{ + return i18n("Other Phone"); +} diff --git a/kabc/addressee.h b/kabc/addressee.h index 0c488eb..fcadda6 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h @@ -360,3 +360,3 @@ class Addressee static QString pagerLabel(); - + static QString otherPhoneLabel(); /** diff --git a/kabc/field.cpp b/kabc/field.cpp index 20885de..6f2b307 100644 --- a/kabc/field.cpp +++ b/kabc/field.cpp @@ -90,3 +90,4 @@ class Field::FieldImpl MobileWorkPhone, - MobileHomePhone + MobileHomePhone, + OtherPhone }; @@ -208,2 +209,4 @@ QString Field::label() return Addressee::sipLabel(); + case FieldImpl::OtherPhone: + return Addressee::otherPhoneLabel(); case FieldImpl::CustomField: @@ -312,2 +315,4 @@ QString Field::value( const KABC::Addressee &a ) return a.phoneNumber( PhoneNumber::Pcs | PhoneNumber::Pref ).number(); + case FieldImpl::OtherPhone: + return a.phoneNumber( PhoneNumber::Voice ).number(); case FieldImpl::HomeAddressStreet: @@ -444,2 +449,3 @@ Field::List Field::allFields() createField( FieldImpl::Sip ); + createField( FieldImpl::OtherPhone ); } diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp index 9e7e221..66f0a5e 100644 --- a/kaddressbook/phoneeditwidget.cpp +++ b/kaddressbook/phoneeditwidget.cpp @@ -170,18 +170,27 @@ void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &li ) mTypeNumberEditList.clear(); - KABC::PhoneNumber::List::Iterator it; - KABC::PhoneNumber::List list = li; - PhoneTypeNumberEdit* edit = 0;//mTypeNumberEditList.first(); + KABC::PhoneNumber::List::Iterator it; + KABC::PhoneNumber::List list2 = li; + KABC::PhoneNumber::List list ; + + PhoneNumber::TypeList tList = PhoneNumber::supportedTypeList(); + int i = 0; + int max = tList.count(); + while ( i < max-1 ) { + for ( it = list2.begin(); it != list2.end(); ++it ) { + if ( (*it).type() == tList[i] ) { + list.append( (*it ) ); + break; + } + } + ++i; + } + for ( it = list2.begin(); it != list2.end(); ++it ) { + if ( (*it).type() == tList[ max-1 ] ) + list.append( (*it ) ); + } for ( it = list.begin(); it != list.end(); ++it ) { - if ( edit ) { - edit->setPhoneNumber( (*it ) ); - edit = mTypeNumberEditList.next(); - } else { PhoneTypeNumberEdit* editNew = appendEditCombo(); editNew->setPhoneNumber( (*it ) ); - } - } - while ( edit ) { - edit->hide(); - edit = mTypeNumberEditList.next(); } + } |