summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt6
-rw-r--r--kabc/addressee.cpp4
-rw-r--r--kabc/addressee.h2
-rw-r--r--kabc/field.cpp8
-rw-r--r--kaddressbook/phoneeditwidget.cpp33
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 @@
402{ "Messenger","Messenger" }, 402{ "Messenger","Messenger" },
403{ "Other","Anderes" }, 403{ "Other","Sonstiges" },
404{ "Video","Video" }, 404{ "Video","Video" },
@@ -826,3 +826,3 @@
826{ "Callback","Rückruf" }, 826{ "Callback","Rückruf" },
827{ "Fax (Other)","Fax (Anderes)" }, 827{ "Fax (Other)","Fax (Sonst.)" },
828{ "Primary","Bevorzugt" }, 828{ "Primary","Bevorzugt" },
@@ -831,3 +831,3 @@
831{ "Format.n.:","Format.N.:" }, 831{ "Format.n.:","Format.N.:" },
832{ "","" }, 832{ "Other Phone","Sonst. Telefon" },
833{ "","" }, 833{ "","" },
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()
1097} 1097}
1098QString Addressee::otherPhoneLabel()
1099{
1100 return i18n("Other Phone");
1101}
1098 1102
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
360 static QString pagerLabel(); 360 static QString pagerLabel();
361 361 static QString otherPhoneLabel();
362 /** 362 /**
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
90 MobileWorkPhone, 90 MobileWorkPhone,
91 MobileHomePhone 91 MobileHomePhone,
92 OtherPhone
92 }; 93 };
@@ -208,2 +209,4 @@ QString Field::label()
208 return Addressee::sipLabel(); 209 return Addressee::sipLabel();
210 case FieldImpl::OtherPhone:
211 return Addressee::otherPhoneLabel();
209 case FieldImpl::CustomField: 212 case FieldImpl::CustomField:
@@ -312,2 +315,4 @@ QString Field::value( const KABC::Addressee &a )
312 return a.phoneNumber( PhoneNumber::Pcs | PhoneNumber::Pref ).number(); 315 return a.phoneNumber( PhoneNumber::Pcs | PhoneNumber::Pref ).number();
316 case FieldImpl::OtherPhone:
317 return a.phoneNumber( PhoneNumber::Voice ).number();
313 case FieldImpl::HomeAddressStreet: 318 case FieldImpl::HomeAddressStreet:
@@ -444,2 +449,3 @@ Field::List Field::allFields()
444 createField( FieldImpl::Sip ); 449 createField( FieldImpl::Sip );
450 createField( FieldImpl::OtherPhone );
445 } 451 }
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 )
170 mTypeNumberEditList.clear(); 170 mTypeNumberEditList.clear();
171 KABC::PhoneNumber::List::Iterator it; 171 KABC::PhoneNumber::List::Iterator it;
172 KABC::PhoneNumber::List list = li; 172 KABC::PhoneNumber::List list2 = li;
173 PhoneTypeNumberEdit* edit = 0;//mTypeNumberEditList.first(); 173 KABC::PhoneNumber::List list ;
174
175 PhoneNumber::TypeList tList = PhoneNumber::supportedTypeList();
176 int i = 0;
177 int max = tList.count();
178 while ( i < max-1 ) {
179 for ( it = list2.begin(); it != list2.end(); ++it ) {
180 if ( (*it).type() == tList[i] ) {
181 list.append( (*it ) );
182 break;
183 }
184 }
185 ++i;
186 }
187 for ( it = list2.begin(); it != list2.end(); ++it ) {
188 if ( (*it).type() == tList[ max-1 ] )
189 list.append( (*it ) );
190 }
174 for ( it = list.begin(); it != list.end(); ++it ) { 191 for ( it = list.begin(); it != list.end(); ++it ) {
175 if ( edit ) {
176 edit->setPhoneNumber( (*it ) );
177 edit = mTypeNumberEditList.next();
178 } else {
179 PhoneTypeNumberEdit* editNew = appendEditCombo(); 192 PhoneTypeNumberEdit* editNew = appendEditCombo();
180 editNew->setPhoneNumber( (*it ) ); 193 editNew->setPhoneNumber( (*it ) );
181 }
182 }
183 while ( edit ) {
184 edit->hide();
185 edit = mTypeNumberEditList.next();
186 } 194 }
195
187} 196}