Version: (using KDE Devel) Installed from: Compiled sources Open the address selection dialog from the composer, click on the "Addressbook" button. KAddressBook starts. Click on "New Contact" in KAddressbook. Result: The "Recent Addresses" item in the left tree of the address selection dialog is magically removed.
Subject: kdepim/libkdepim CVS commit by tokoe: Update also the 'Recent addresses' group... That fixes #72758 CCMAIL:72758-done@bugs.kde.org M +20 -6 addressesdialog.cpp 1.23 M +1 -0 addressesdialog.h 1.10 --- kdepim/libkdepim/addressesdialog.cpp #1.22:1.23 @@ -67,4 +67,6 @@ struct AddressesDialog::AddressesDialogP QDict<AddresseeViewItem> groupDict; + + KABC::Addressee::List recentAddresses; }; // privates end @@ -273,5 +275,15 @@ AddressesDialog::setSelectedBCC( const Q void -AddressesDialog::setRecentAddresses( const KABC::Addressee::List& addr ) +AddressesDialog::setRecentAddresses( const KABC::Addressee::List& list ) +{ + d->recentAddresses = list; + + updateRecentAddresses(); + + checkForSingleAvailableGroup(); +} + +void +AddressesDialog::updateRecentAddresses() { static const QString &recentGroup = KGlobal::staticQString( i18n( "Recent Addresses" ) ); @@ -284,13 +297,11 @@ AddressesDialog::setRecentAddresses( con } - for( KABC::Addressee::List::ConstIterator it = addr.begin(); - it != addr.end(); ++it ) { + KABC::Addressee::List::ConstIterator it; + for ( it = d->recentAddresses.begin(); it != d->recentAddresses.end(); ++it ) addAddresseeToAvailable( *it, d->recent ); - } + if ( d->recent->childCount() > 0 ) { d->recent->setVisible( true ); } - - checkForSingleAvailableGroup(); } @@ -376,4 +387,7 @@ AddressesDialog::updateAvailableAddresse } + d->recent = 0; + updateRecentAddresses(); + addDistributionLists(); if ( d->personal->childCount() > 0 ) { --- kdepim/libkdepim/addressesdialog.h #1.9:1.10 @@ -178,4 +178,5 @@ namespace KPIM { // it is recursive, but should only ever recurse once so should be fine void unmapSelectedAddress(AddresseeViewItem* item); + void updateRecentAddresses(); struct AddressesDialogPrivate;