summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt4
-rw-r--r--kabc/addresseeview.cpp6
-rw-r--r--kaddressbook/xxportselectdialog.cpp12
3 files changed, 18 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 3532084..93edc59 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -7,6 +7,10 @@ Bugfix:
Fixed a problem with agenda popup on the desktop in KO/Pi.
Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
Added config option to not display completed todos in agenda view.
+Addressee view is now using the formatted name, if defined.
+That makes it possible to display "lastname, firstname" in that view now.
+To set the formatted name for all contacts, please use menu:
+Edit->Change->Set formatted name.
********** VERSION 2.1.4 ************
diff --git a/kabc/addresseeview.cpp b/kabc/addresseeview.cpp
index 9118c3d..667a5e2 100644
--- a/kabc/addresseeview.cpp
+++ b/kabc/addresseeview.cpp
@@ -43,6 +43,7 @@
#endif
+#include <qstylesheet.h>
#include "externalapphandler.h"
#include <kabc/addresseeview.h>
@@ -70,6 +71,7 @@ AddresseeView::AddresseeView( QWidget *parent, const char *name )
//US QStyleSheetItem *link = sheet->item( "a" );
//US link->setColor( KGlobalSettings::linkColor() );
+
}
void AddresseeView::printMe()
{
@@ -125,8 +127,12 @@ void AddresseeView::setAddressee( const KABC::Addressee& mAddressee )
setText( QString::null);
return;
}
+#if 0
QString name = ( mAddressee.assembledName().isEmpty() ?
mAddressee.formattedName() : mAddressee.assembledName() );
+#endif
+
+ QString name = mAddressee.realName();
QString dynamicPart;
diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp
index e134f97..278cab0 100644
--- a/kaddressbook/xxportselectdialog.cpp
+++ b/kaddressbook/xxportselectdialog.cpp
@@ -159,7 +159,8 @@ KABC::AddresseeList XXPortSelectDialog::contacts()
for ( it = selection.begin(); it != selection.end(); ++it ) {
KABC::Addressee addr = mCore->addressBook()->findByUid( *it );
if ( !addr.isEmpty() )
- list.append( addr );
+ if ( addr.uid().left( 19 ) != QString("last-syncAddressee-") )
+ list.append( addr );
}
} else if ( mUseFilters->isChecked() ) {
// find contacts that can pass selected filter
@@ -171,7 +172,8 @@ KABC::AddresseeList XXPortSelectDialog::contacts()
KABC::AddressBook::Iterator it;
for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it ) {
if ( (*filterIt).filterAddressee( *it ) )
- list.append( *it );
+ if ((*it).uid().left( 19 ) != QString("last-syncAddressee-") )
+ list.append( *it );
}
} else if ( mUseCategories->isChecked() ) {
QStringList categorieList = categories();
@@ -181,7 +183,8 @@ KABC::AddresseeList XXPortSelectDialog::contacts()
QStringList::Iterator tmpIt;
for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt )
if ( categorieList.contains( *tmpIt ) ) {
- list.append( *it );
+ if ((*it).uid().left( 19 ) != QString("last-syncAddressee-") )
+ list.append( *it );
break;
}
}
@@ -189,7 +192,8 @@ KABC::AddresseeList XXPortSelectDialog::contacts()
// create a string list of all entries:
KABC::AddressBook::Iterator it;
for ( it = mCore->addressBook()->begin(); it != mCore->addressBook()->end(); ++it )
- list.append( *it );
+ if ((*it).uid().left( 19 ) != QString("last-syncAddressee-") )
+ list.append( *it );
}
if ( mUseSorting ) {