summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abview.cpp20
1 files changed, 15 insertions, 5 deletions
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
@@ -156,13 +156,23 @@ 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;
updateView( true );