summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/abview.cpp
authoreilers <eilers>2004-12-20 14:19:24 (UTC)
committer eilers <eilers>2004-12-20 14:19:24 (UTC)
commit29f05e7138a05c2c32cad8b40fd432cd383964a9 (patch) (side-by-side diff)
tree2f80ace57f99ce24ac8c1e8a556c08e07ca18019 /core/pim/addressbook/abview.cpp
parent18e47153532d016d878f47e0ce11cb1a9716218e (diff)
downloadopie-29f05e7138a05c2c32cad8b40fd432cd383964a9.zip
opie-29f05e7138a05c2c32cad8b40fd432cd383964a9.tar.gz
opie-29f05e7138a05c2c32cad8b40fd432cd383964a9.tar.bz2
Fix for Bug #1269 and use of new sorted of the pim libary
Diffstat (limited to 'core/pim/addressbook/abview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/abview.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp
index 7abb45c..6be19f8 100644
--- a/core/pim/addressbook/abview.cpp
+++ b/core/pim/addressbook/abview.cpp
@@ -157,14 +157,22 @@ void AbView::load()
// Letter Search is stopped at this place
emit signalClearLetterPicker();
- if ( m_inPersonal )
- // VCard Backend does not sort..
- m_list = m_contactdb->allRecords();
- else{
- m_list = m_contactdb->sorted( true, 0, 0, 0 );
- if ( m_curr_category != -1 )
- clearForCategory();
+ if ( m_curr_category == 0 ) {
+ // Show unfiled
+ m_list = m_contactdb->sorted( true, Opie::OPimContactAccess::SortFileAsName,
+ Opie::OPimContactAccess::DoNotShowWithCategory, 0 );
+ } else if ( m_curr_category != -1 ){
+ // Just show selected category
+ m_list = m_contactdb->sorted( true, Opie::OPimContactAccess::SortFileAsName,
+ Opie::OPimBase::FilterCategory, m_curr_category );
+ } else {
+ // Show all categories
+ m_list = m_contactdb->sorted( true, Opie::OPimContactAccess::SortFileAsName,
+ Opie::OPimBase::FilterOff, 0 );
}
+
+// if ( m_curr_category != -1 )
+// clearForCategory();
odebug << "Number of contacts: " << m_list.count() << oendl;
@@ -237,7 +245,10 @@ void AbView::setShowByLetter( char c, AbConfig::LPSearchMode mode )
}else{
// If the current Backend is unable to solve the query, we will
// ignore the request ..
- if ( ! m_contactdb->hasQuerySettings( Opie::OPimContactAccess::WildCards | Opie::OPimContactAccess::IgnoreCase ) ){
+ if ( ! m_contactdb->hasQuerySettings( Opie::OPimContactAccess::WildCards |
+ Opie::OPimContactAccess::IgnoreCase ) ){
+ owarn << "Tried to access queryByExample which is not supported by the current backend!!" << oendl;
+ owarn << "I have to ignore this access!" << oendl;
return;
}