summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rw-r--r--kabc/addresseedialog.cpp18
-rw-r--r--kabc/addresseedialog.h2
3 files changed, 18 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 0ebd853..c4557ef 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -11,4 +11,6 @@ Fixed some updating problems when changing the filter.
KA/Pi:
In the addressee selection dialog now the formatted name is shown, if not empty.
+Added a column "category" to the addressee selection dialog to make it possible to sort addressees after category.
+Now in the addressee selection dialog a selected contact is remove with a single click from the selected list.
Fixed in the file selector on the Zaurus the problem that symbolic links to files/dirs were ignored.
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp
index e89584d..3e7b72c 100644
--- a/kabc/addresseedialog.cpp
+++ b/kabc/addresseedialog.cpp
@@ -45,4 +45,5 @@ AddresseeItem::AddresseeItem( QListView *parent, const Addressee &addressee ) :
setText( Name,addressee.realName());
setText( Email, addressee.preferredEmail() );
+ setText( Category, addressee.categories().join(";") );
}
@@ -81,4 +82,5 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
mAddresseeList->addColumn( i18n("Name") );
mAddresseeList->addColumn( i18n("Email") );
+ mAddresseeList->addColumn( i18n("Category") );
mAddresseeList->setAllColumnsShowFocus( true );
mAddresseeList->setFullWidth( true );
@@ -87,10 +89,13 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
SLOT( slotOk() ) );
- mAddresseeEdit = new QLineEdit( listWidget );
+ QHBox* searchBox = new QHBox ( listWidget );
+ mAddresseeEdit = new QLineEdit( searchBox );
connect( mAddresseeEdit, SIGNAL( returnPressed() ),
SLOT( loadAddressBook() ) );
mAddresseeEdit->setFocus();
+ QPushButton *searchButton = new QPushButton( i18n("Search!"), searchBox );
+ connect ( searchButton, SIGNAL( clicked() ), SLOT( loadAddressBook() ) );
- listLayout->addWidget( mAddresseeEdit );
+ listLayout->addWidget( searchBox );
if ( mMultiple ) {
@@ -108,10 +113,16 @@ AddresseeDialog::AddresseeDialog( QWidget *parent, bool multiple ) :
mSelectedList->setAllColumnsShowFocus( true );
mSelectedList->setFullWidth( true );
- connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ),
+ //connect( mSelectedList, SIGNAL( doubleClicked( QListViewItem * ) ),
+ // SLOT( removeSelected() ) );
+ connect( mSelectedList, SIGNAL( clicked( QListViewItem * ) ),
+ SLOT( removeSelected() ) );
+ connect( mSelectedList, SIGNAL( returnPressed( QListViewItem *) ),
SLOT( removeSelected() ) );
+#if 0
QPushButton *unselectButton = new QPushButton( i18n("Unselect"), selectedGroup );
connect ( unselectButton, SIGNAL( clicked() ), SLOT( removeSelected() ) );
+#endif
connect( mAddresseeList, SIGNAL( clicked( QListViewItem * ) ),
SLOT( addSelected( QListViewItem * ) ) );
@@ -165,4 +176,5 @@ void AddresseeDialog::loadAddressBook()
QString name = (*it).realName();
name += (*it).preferredEmail();
+ name += (*it).categories().join(";");
#if QT_VERSION >= 0x030000
if (re.search(name) != -1)
diff --git a/kabc/addresseedialog.h b/kabc/addresseedialog.h
index 99c74bd..6fab62d 100644
--- a/kabc/addresseedialog.h
+++ b/kabc/addresseedialog.h
@@ -44,5 +44,5 @@ class AddresseeItem : public QListViewItem
@li @p Email - Email in Addressee
*/
- enum columns { Name = 0, Email = 1 };
+ enum columns { Name = 0, Email = 1,Category = 2 };
/**