summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-10-28 14:43:31 (UTC)
committer zautrix <zautrix>2005-10-28 14:43:31 (UTC)
commitab099bc1be027fe01dc252a9d7a0f8821e782d65 (patch) (side-by-side diff)
tree85bfb03f334da60dffcc52d54202f51d0f947e3f
parentcaaa030d8bc2aa82c53e5d30abc314b992d7226f (diff)
downloadkdepimpi-ab099bc1be027fe01dc252a9d7a0f8821e782d65.zip
kdepimpi-ab099bc1be027fe01dc252a9d7a0f8821e782d65.tar.gz
kdepimpi-ab099bc1be027fe01dc252a9d7a0f8821e782d65.tar.bz2
fixxxx
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 @@
{ "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();
}
+
}