-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 @@ -387,33 +387,33 @@ { "Parcel","Paket" },
{ "Edit Contact Name","Ändere Kontakt Name" },
{ "Honorific prefixes:","Namensprefixes:" },
{ "Given name:","Vorname:" },
{ "Additional names:","Mittelnamen:" },
{ "Family names:","Nachname:" },
{ "Honorific suffixes:","Namenssuffixe:" },
{ "Parse name automatically","Setze Namen automatisch" },
{ "Edit Phone Numbers","Bearbeite Telefonnummern" },
{ "Number","Nummer" },
{ "Type","Typ" },
{ "Edit Phone Number","Bearbeite Telefonnummer" },
{ "Number:","Nummer:" },
{ "This is the preferred phone number","Dies ist die bevorzugte Telefonnummer" },
{ "Types","Typen" },
{ "Messenger","Messenger" },
-{ "Other","Anderes" },
+{ "Other","Sonstiges" },
{ "Video","Video" },
{ "Mailbox","Mailbox" },
{ "Modem","Modem" },
{ "Car","Auto" },
{ "PCS","PCS" },
{ "Category","Kategorie" },
{ "Select Categories","Wähle Kategorien" },
{ " &Deselect All "," &Deselektiere alle " },
{ " &Edit Categories "," B&earbeite Kategorien " },
{ "&OK","&OK" },
{ "&Cancel","Abbre&chen" },
{ "Configure","Konfiguriere" },
{ "Default","Voreinstellungen" },
{ "Addressbook","Adressbuch" },
{ "Details view font","Schriftart Detailansicht" },
{ "phone:123","phone:123" },
@@ -811,27 +811,27 @@ { "Do you really\nwant to delete the\nsetected contact(s)?\n\n","Möchten Sie wirklich\ndie ausgewählten\nKontakte löschen?\n\n" },
{ "%1 contacts\nsuccessfully\nimported.","%1 Kontakte\nerfolgreich\nimportiert." },
{ "Import this contact?","Importiere diesen Kontakt?" },
{ "Import all!","Importiere alle!" },
{ "Loading addressbook data ... please wait","Lade Adressbuchdaten ... bitte warten" },
{ "Import Format","Import Format" },
{ "Select import format!\nDefault and standard is Utf8.\nLatin1 may be the right\nfor some West Europian languages.","Wähle Import Format!\nDefault und Standard ist Utf8.\nLatin1 kann das richtige für\nWesteuropäische Sprachen sein." },
{ "Home2","Privat2" },
{ "Work2","Arbeit2" },
{ "Fax (Work)","Fax (Arbeit)" },
{ "Fax (Home)","Fax (Privat)" },
{ "Assistent","Sekretär(in)" },
{ "Company","Firma" },
{ "Mobile2 (Work)","Handy2 (Arbeit)" },
{ "Mobile2 (Car)","Handy2 (Auto)" },
{ "Callback","Rückruf" },
-{ "Fax (Other)","Fax (Anderes)" },
+{ "Fax (Other)","Fax (Sonst.)" },
{ "Primary","Bevorzugt" },
{ "Mobile (Home)","Handy (Privat)" },
{ "Unfiled","Nicht zugeordnet" },
{ "Format.n.:","Format.N.:" },
-{ "","" },
+{ "Other Phone","Sonst. Telefon" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
\ No newline at end of file diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp index 789a694..0d8e8e8 100644 --- a/kabc/addressee.cpp +++ b/kabc/addressee.cpp @@ -1082,32 +1082,36 @@ QString Addressee::businessFaxLabel() QString Addressee::carPhoneLabel() { return i18n("Mobile2 (Car)"); } 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"); } void Addressee::setMailer( const QString &mailer ) { if ( mailer == mData->mailer ) return; detach(); diff --git a/kabc/addressee.h b/kabc/addressee.h index 0c488eb..fcadda6 100644 --- a/kabc/addressee.h +++ b/kabc/addressee.h @@ -345,33 +345,33 @@ class Addressee static QString businessFaxLabel(); /** Return translated label for carPhone field. */ 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. */ void setMailer( const QString &mailer ); /** Return mail client. diff --git a/kabc/field.cpp b/kabc/field.cpp index 20885de..6f2b307 100644 --- a/kabc/field.cpp +++ b/kabc/field.cpp @@ -75,33 +75,34 @@ class Field::FieldImpl MobilePhone, HomeFax, BusinessFax, CarPhone, 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; QString mLabel; QString mKey; QString mApp; @@ -193,32 +194,34 @@ QString Field::label() case FieldImpl::Title: return Addressee::titleLabel(); case FieldImpl::Role: return Addressee::roleLabel(); 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(); } QString Field::categoryLabel( int category ) { switch ( category ) { case All: @@ -297,32 +300,34 @@ QString Field::value( const KABC::Addressee &a ) case FieldImpl::MobileWorkPhone: return a.phoneNumber( PhoneNumber::Car ).number(); case FieldImpl::MobileHomePhone: return a.phoneNumber( PhoneNumber::Cell ).number(); 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(); case FieldImpl::BusinessAddressLocality: return a.address( Address::Work ).locality(); case FieldImpl::BusinessAddressRegion: return a.address( Address::Work ).region(); @@ -429,32 +434,33 @@ Field::List Field::allFields() createField( FieldImpl::MobileHomePhone, Frequent ); createField( FieldImpl::MobileWorkPhone, Frequent ); createField( FieldImpl::HomeFax ); createField( FieldImpl::BusinessFax ); 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 ); } return mDefaultFields; } diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp index 9e7e221..66f0a5e 100644 --- a/kaddressbook/phoneeditwidget.cpp +++ b/kaddressbook/phoneeditwidget.cpp @@ -155,48 +155,57 @@ void PhoneEditWidget::deleteEdit( PhoneTypeNumberEdit* ew ) mPendingDelete = ew; QTimer::singleShot( 0, this, SLOT ( pendingDelete() ) ); } void PhoneEditWidget::pendingDelete() { mTypeNumberEditList.removeRef( mPendingDelete ); emit modified(); } void PhoneEditWidget::setPhoneNumbers( const KABC::PhoneNumber::List &li ) { if ( li.isEmpty() ) { setDefaults(); return; } 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(); } + } KABC::PhoneNumber::List PhoneEditWidget::phoneNumbers() { KABC::PhoneNumber::List retList; PhoneTypeNumberEdit* edit = mTypeNumberEditList.first(); while ( edit ) { if ( edit->isValid() ) { retList.append( edit->phoneNumber()); } edit = mTypeNumberEditList.next(); } return retList; } |