From e8df4b3938c8f97aa958708a56794797f16b24c7 Mon Sep 17 00:00:00 2001 From: eilers Date: Fri, 18 Mar 2005 16:06:14 +0000 Subject: Fixing problem with categories: "unfiled" and "all" show the same list. Previous patch removed correct use of the pim backend. Therefore I had reimplemented it. --- diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp index 34035fd..8a2db96 100644 --- a/core/pim/addressbook/abview.cpp +++ b/core/pim/addressbook/abview.cpp @@ -157,11 +157,21 @@ void AbView::load() // Letter Search is stopped at this place emit signalClearLetterPicker(); - m_list = m_contactdb->sorted( true, Opie::OPimContactAccess::SortFileAsName, - Opie::OPimContactAccess::FilterCategory, m_curr_category ); - -// if ( m_curr_category != -1 ) -// clearForCategory(); + odebug << "selected Category: " << m_curr_category << oendl; + + if ( m_curr_category == -1 ) { + // Show just unfiled contacts + m_list = m_contactdb->sorted( true, Opie::OPimContactAccess::SortFileAsName, + Opie::OPimContactAccess::DoNotShowWithCategory, 0 ); + } else if ( m_curr_category == 0 ){ + // Just show all contacts + m_list = m_contactdb->sorted( true, Opie::OPimContactAccess::SortFileAsName, + Opie::OPimBase::FilterOff, 0 ); + } else { + // Show contacts with given categories + m_list = m_contactdb->sorted( true, Opie::OPimContactAccess::SortFileAsName, + Opie::OPimBase::FilterCategory, m_curr_category ); + } odebug << "Number of contacts: " << m_list.count() << oendl; -- cgit v0.9.0.2