summaryrefslogtreecommitdiffabout
Side-by-side diff
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
@@ -379,49 +379,49 @@
{ "Country:","Staat:" },
{ "This is the preferred address","Dies ist die bevorzugte Adresse" },
{ "New...","Neu..." },
{ "Change Type","Ändere Art" },
{ "Edit Address Type","Ändere Address Art" },
{ "Address Types","Address Art" },
{ "Domestic","Inland" },
{ "International","International" },
{ "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" },
{ "Search only after <return> key pressed","Suche nur nach <return> Taste" },
{ "Show edit dialog on single click","Zeige Edit Dialog bei Einzelklick" },
{ "Automatic name parsing for new contacts","Automa. Name Parsen für neue Kontakte" },
{ "Display List and Details at once (restart)","Zeige Liste und Details zusammen(neustart)" },
{ "Show exit confirmation","Vor dem Beenden nachfragen" },
{ "General","Allgemein" },
{ "Extensions (restart)","Extensions (restart)" },
{ "Description","Beschreibungen" },
@@ -803,35 +803,35 @@
{ "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" },
{ "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." },
{ "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" },
{ "Writing back file ...","Schreibe Datei zurück..." },
{ "Sending back file ...","Sende Datei zurück..." },
{ "Eeek, there I am ticklish!","Huch, da bin ich kitzlig!" },
{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" },
{ "...and %1 more\ncontact(s) selected","...und noch %1 Kontakte\n mehr ausgewählt" },
{ "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
@@ -1074,48 +1074,52 @@ QString Addressee::homeFaxLabel()
QString Addressee::businessFaxLabel()
{
return i18n("Fax (Work)");
}
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();
mData->empty = false;
mData->mailer = mailer;
}
QString Addressee::mailer() const
{
return mData->mailer;
}
diff --git a/kabc/addressee.h b/kabc/addressee.h
index 0c488eb..fcadda6 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -337,49 +337,49 @@ class Addressee
/**
Return translated label for homeFax field.
*/
static QString homeFaxLabel();
/**
Return translated label for businessFax field.
*/
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.
*/
QString mailer() const;
/**
Return translated label for mailer field.
*/
static QString mailerLabel();
/**
diff --git a/kabc/field.cpp b/kabc/field.cpp
index 20885de..6f2b307 100644
--- a/kabc/field.cpp
+++ b/kabc/field.cpp
@@ -67,49 +67,50 @@ class Field::FieldImpl
BusinessAddressStreet,
BusinessAddressLocality,
BusinessAddressRegion,
BusinessAddressPostalCode,
BusinessAddressCountry,
BusinessAddressLabel,
HomePhone,
BusinessPhone,
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;
};
Field::List Field::mAllFields;
Field::List Field::mDefaultFields;
Field::List Field::mCustomFields;
@@ -185,48 +186,50 @@ QString Field::label()
case FieldImpl::Isdn:
return Addressee::isdnLabel();
case FieldImpl::Pager:
return Addressee::pagerLabel();
case FieldImpl::Email:
return Addressee::emailLabel();
case FieldImpl::Mailer:
return Addressee::mailerLabel();
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:
return i18n("All");
case Frequent:
return i18n("Frequent");
case Address:
return i18n("Address");
case Email:
return i18n("Email");
case Personal:
@@ -289,48 +292,50 @@ QString Field::value( const KABC::Addressee &a )
case FieldImpl::Category:
return a.categories().join(",");
case FieldImpl::HomePhone:
return a.phoneNumber( PhoneNumber::Home| PhoneNumber::Pref ).number();
case FieldImpl::BusinessPhone:
return a.phoneNumber( PhoneNumber::Work| PhoneNumber::Pref ).number();
case FieldImpl::MobilePhone:
return a.phoneNumber( PhoneNumber::Cell ).number();
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();
case FieldImpl::BusinessAddressPostalCode:
return a.address( Address::Work ).postalCode();
case FieldImpl::BusinessAddressCountry:
return a.address( Address::Work ).country();
case FieldImpl::CustomField:
return a.custom( mImpl->app(), mImpl->key() );
default:
return QString::null;
@@ -421,48 +426,49 @@ Field::List Field::allFields()
createField( FieldImpl::BusinessAddressLocality, Address|Organization );
createField( FieldImpl::BusinessAddressRegion, Address|Organization );
createField( FieldImpl::BusinessAddressPostalCode, Address|Organization );
createField( FieldImpl::BusinessAddressCountry, Address|Organization );
createField( FieldImpl::BusinessAddressLabel, Address|Organization );
createField( FieldImpl::HomePhone, Personal|Frequent );
createField( FieldImpl::BusinessPhone, Organization|Frequent );
createField( FieldImpl::MobilePhone, Frequent );
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;
}
void Field::createField( int id, int category )
{
mAllFields.append( new Field( new FieldImpl( id, category ) ) );
}
void Field::createDefaultField( int id, int category )
{
mDefaultFields.append( new Field( new FieldImpl( id, category ) ) );
diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp
index 9e7e221..66f0a5e 100644
--- a/kaddressbook/phoneeditwidget.cpp
+++ b/kaddressbook/phoneeditwidget.cpp
@@ -147,64 +147,73 @@ PhoneTypeNumberEdit* PhoneEditWidget::appendEditCombo()
mainLayout->add( edit );
mTypeNumberEditList.append( edit );
return edit;
}
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;
}
#if 0
PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name )
: QWidget( parent, name )
{
QGridLayout *layout = new QGridLayout( this, 4, 1 );
//US layout->setSpacing( KDialog::spacingHint() );
layout->setSpacing( KDialogBase::spacingHintSmall() );