[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    [Bug 77214] KMail addressbook lookup duplicated entries
From:       Tobias "König" <tokoe () kde ! org>
Date:       2004-07-02 15:48:53
Message-ID: 20040702154853.4780.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
      
http://bugs.kde.org/show_bug.cgi?id=77214      
tokoe kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From tokoe kde org  2004-07-02 17:48 -------
CVS commit by tokoe: 

Fixed the duplicated entries in categories. That salves also #77214.

CCMAIL:77214-done bugs kde org


  M +20 -11    addressesdialog.cpp   1.31
  M +1 -1      addressesdialog.h   1.14


--- kdepim/libkdepim/addressesdialog.cpp  #1.30:1.31
 @ -570,9 +570,10  @ AddressesDialog::initConnections()
 
 void
-AddressesDialog::addAddresseeToAvailable( const KABC::Addressee& addr, \
AddresseeViewItem* defaultParent ) +AddressesDialog::addAddresseeToAvailable( const \
KABC::Addressee& addr, AddresseeViewItem* defaultParent, bool useCategory )  {
   if ( addr.preferredEmail().isEmpty() )
     return;
 
+  if ( useCategory ) {
   QStringList categories = addr.categories();
 
 @ -586,6 +587,14  @ AddressesDialog::addAddresseeToAvailable
             this, SLOT(availableAddressSelected(AddresseeViewItem*, bool)));
   }
+  }
 
-  if ( defaultParent && categories.isEmpty() ) { // only non-categorized items here
+  bool noCategory = false;
+  if ( useCategory ) {
+    if ( addr.categories().isEmpty() )
+      noCategory = true;
+  } else
+    noCategory = true;
+
+  if ( defaultParent && noCategory ) { // only non-categorized items here
     AddresseeViewItem* addressee = new AddresseeViewItem( defaultParent, addr );
     connect(addressee, SIGNAL(addressSelected(AddresseeViewItem*, bool)),
 @ -974,5 +983,5  @ AddressesDialog::addDistributionLists()
     KABC::DistributionList::Entry::List::Iterator itemIt;
     for ( itemIt = entries.begin(); itemIt != entries.end(); ++itemIt )
-      addAddresseeToAvailable( (*itemIt).addressee, item );
+      addAddresseeToAvailable( (*itemIt).addressee, item, false );
   }
 }

--- kdepim/libkdepim/addressesdialog.h  #1.13:1.14
 @ -186,5 +186,5  @ namespace KPIM {
     void addDistributionLists();
     void addAddresseeToAvailable( const KABC::Addressee& addr,
-                                  AddresseeViewItem* defaultParent=0 );
+                                  AddresseeViewItem* defaultParent=0, bool \
useCategory=true );  void addAddresseeToSelected( const KABC::Addressee& addr,
                                  AddresseeViewItem* defaultParent=0 );
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic