summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt6
-rw-r--r--kabc/addressee.cpp25
-rw-r--r--kabc/addressee.h5
-rw-r--r--kabc/field.cpp20
-rw-r--r--kabc/phonenumber.cpp13
-rw-r--r--kaddressbook/views/kaddressbooktableview.cpp2
7 files changed, 61 insertions, 12 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 53eb428..bc0c62a 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -5,2 +5,4 @@ Info about the changes in new versions of KDE-Pim/Pi
5And again fixed some bugs. 5And again fixed some bugs.
6Added two more fields to the KA/Pi view config:
7A "Mobile (home)" and a "Mobile (work)" field.
6 8
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index e54e140..f67a34d 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -755,5 +755,5 @@
755{ "%1 contacts changed!","%1 Kontakte geändert!" }, 755{ "%1 contacts changed!","%1 Kontakte geändert!" },
756{ "","" }, 756{ "Mobile (home)","Handy (Arbeit)" },
757{ "","" }, 757{ "Mobile (work)","Handy (Privat)" },
758{ "","" }, 758{ "Def.Formatted Name","Def. Format. Name" },
759{ "","" }, 759{ "","" },
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index 39d14bb..7f592e9 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -53,2 +53,3 @@ struct Addressee::AddresseeData : public KShared
53 QString formattedName; 53 QString formattedName;
54 QString defaultFormattedName;
54 QString familyName; 55 QString familyName;
@@ -749,2 +750,9 @@ void Addressee::setFormattedName( const QString &formattedName )
749} 750}
751void Addressee::setDefaultFormattedName( const QString &formattedName )
752{
753 if ( formattedName == mData->defaultFormattedName ) return;
754 detach();
755 mData->empty = false;
756 mData->defaultFormattedName = formattedName;
757}
750 758
@@ -754,2 +762,6 @@ QString Addressee::formattedName() const
754} 762}
763QString Addressee::defaultFormattedName() const
764{
765 return mData->defaultFormattedName;
766}
755 767
@@ -760,2 +772,7 @@ QString Addressee::formattedNameLabel()
760 772
773QString Addressee::defaultFormattedNameLabel()
774{
775 return i18n("Def.Formatted Name");
776}
777
761 778
@@ -982,2 +999,10 @@ QString Addressee::mobilePhoneLabel()
982} 999}
1000QString Addressee::mobileWorkPhoneLabel()
1001{
1002 return i18n("Mobile (work)");
1003}
1004QString Addressee::mobileHomePhoneLabel()
1005{
1006 return i18n("Mobile (home)");
1007}
983 1008
diff --git a/kabc/addressee.h b/kabc/addressee.h
index 8051fec..0d688f8 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -156,2 +156,3 @@ class Addressee
156 void setFormattedName( const QString &formattedName ); 156 void setFormattedName( const QString &formattedName );
157 void setDefaultFormattedName( const QString &formattedName );
157 /** 158 /**
@@ -160,2 +161,3 @@ class Addressee
160 QString formattedName() const; 161 QString formattedName() const;
162 QString defaultFormattedName() const;
161 /** 163 /**
@@ -164,2 +166,3 @@ class Addressee
164 static QString formattedNameLabel(); 166 static QString formattedNameLabel();
167 static QString defaultFormattedNameLabel();
165 168
@@ -330,2 +333,4 @@ class Addressee
330 static QString mobilePhoneLabel(); 333 static QString mobilePhoneLabel();
334 static QString mobileWorkPhoneLabel();
335 static QString mobileHomePhoneLabel();
331 336
diff --git a/kabc/field.cpp b/kabc/field.cpp
index 89d0b77..5c561c3 100644
--- a/kabc/field.cpp
+++ b/kabc/field.cpp
@@ -88,3 +88,6 @@ class Field::FieldImpl
88 Resource, 88 Resource,
89 Sip 89 Sip,
90 DefaultFormattedName,
91 MobileWorkPhone,
92 MobileHomePhone
90 }; 93 };
@@ -128,2 +131,4 @@ QString Field::label()
128 return Addressee::formattedNameLabel(); 131 return Addressee::formattedNameLabel();
132 case FieldImpl::DefaultFormattedName:
133 return Addressee::defaultFormattedNameLabel();
129 case FieldImpl::FamilyName: 134 case FieldImpl::FamilyName:
@@ -172,2 +177,6 @@ QString Field::label()
172 return Addressee::mobilePhoneLabel(); 177 return Addressee::mobilePhoneLabel();
178 case FieldImpl::MobileHomePhone:
179 return Addressee::mobileHomePhoneLabel();
180 case FieldImpl::MobileWorkPhone:
181 return Addressee::mobileWorkPhoneLabel();
173 case FieldImpl::HomeFax: 182 case FieldImpl::HomeFax:
@@ -241,2 +250,4 @@ QString Field::value( const KABC::Addressee &a )
241 return a.formattedName(); 250 return a.formattedName();
251 case FieldImpl::DefaultFormattedName:
252 return a.defaultFormattedName();
242 case FieldImpl::FamilyName: 253 case FieldImpl::FamilyName:
@@ -290,2 +301,6 @@ QString Field::value( const KABC::Addressee &a )
290 return a.phoneNumber( PhoneNumber::Cell ).number(); 301 return a.phoneNumber( PhoneNumber::Cell ).number();
302 case FieldImpl::MobileWorkPhone:
303 return a.phoneNumber( PhoneNumber::Cell | PhoneNumber::Work ).number();
304 case FieldImpl::MobileHomePhone:
305 return a.phoneNumber( PhoneNumber::Cell | PhoneNumber::Home ).number();
291 case FieldImpl::HomeFax: 306 case FieldImpl::HomeFax:
@@ -395,2 +410,3 @@ Field::List Field::allFields()
395 createField( FieldImpl::FormattedName, Frequent ); 410 createField( FieldImpl::FormattedName, Frequent );
411 createField( FieldImpl::DefaultFormattedName, Frequent );
396 createField( FieldImpl::FamilyName, Frequent ); 412 createField( FieldImpl::FamilyName, Frequent );
@@ -418,2 +434,4 @@ Field::List Field::allFields()
418 createField( FieldImpl::MobilePhone, Frequent ); 434 createField( FieldImpl::MobilePhone, Frequent );
435 createField( FieldImpl::MobileHomePhone, Frequent );
436 createField( FieldImpl::MobileWorkPhone, Frequent );
419 createField( FieldImpl::HomeFax ); 437 createField( FieldImpl::HomeFax );
diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp
index 041effc..4c6231d 100644
--- a/kabc/phonenumber.cpp
+++ b/kabc/phonenumber.cpp
@@ -179,12 +179,11 @@ QString PhoneNumber::typeLabel( int type )
179 179
180
181 if ((type & Cell) == Cell)
182 typeString += i18n("Mobile") +" ";
180 if ((type & Home) == Home) 183 if ((type & Home) == Home)
181 typeString += i18n("Home"); 184 typeString += i18n("Home")+" ";
182 else if ((type & Work) == Work) 185 else if ((type & Work) == Work)
183 typeString += i18n("Work"); 186 typeString += i18n("Work")+" ";
184 187
185 if (!typeString.isEmpty()) 188 if ((type & Sip) == Sip)
186 typeString += " ";
187 if ((type & Cell) == Cell)
188 typeString += i18n("Mobile") +" ";
189 if ((type & Sip) == Sip)
190 typeString += i18n("SIP")+" "; 189 typeString += i18n("SIP")+" ";
diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp
index e322473..565cd1d 100644
--- a/kaddressbook/views/kaddressbooktableview.cpp
+++ b/kaddressbook/views/kaddressbooktableview.cpp
@@ -188,3 +188,3 @@ void KAddressBookTableView::doSearch( const QString& s, KABC::Field *field )
188 // of items. 188 // of items.
189 mListView->repaint(); 189 //mListView->repaint();
190 if ( mListView->firstChild() ) { 190 if ( mListView->firstChild() ) {