summaryrefslogtreecommitdiff
path: root/core/pim/addressbook/abtable.cpp
authoreilers <eilers>2002-10-19 17:54:00 (UTC)
committer eilers <eilers>2002-10-19 17:54:00 (UTC)
commit8c9e2e893540c0a405637f10ac2f656df69991a7 (patch) (side-by-side diff)
treeec9841bdd08c95ef1dc4e1a239d7736e760c2a46 /core/pim/addressbook/abtable.cpp
parentccdf857edfb52f788c5b00440cce24d1bced2a18 (diff)
downloadopie-8c9e2e893540c0a405637f10ac2f656df69991a7.zip
opie-8c9e2e893540c0a405637f10ac2f656df69991a7.tar.gz
opie-8c9e2e893540c0a405637f10ac2f656df69991a7.tar.bz2
New find widget works. Settings moved into a config dialog.
Diffstat (limited to 'core/pim/addressbook/abtable.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/addressbook/abtable.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp
index 9297d6a..97f4a8f 100644
--- a/core/pim/addressbook/abtable.cpp
+++ b/core/pim/addressbook/abtable.cpp
@@ -130,3 +130,3 @@ AbTable::AbTable( const QValueList<int> *order, QWidget *parent, const char *nam
intFields( order ),
- currFindRow( -2 ),
+ currFindRow( -1 ),
mCat( 0 ),
@@ -640,6 +640,9 @@ void AbTable::slotDoFind( const QString &findString, bool caseSensitive,
int category = 0;
+
+ // Use the current Category if nothing else selected
if ( cat.isEmpty() )
- category = -2; // mCat.id("Contacts", "All");
- else
+ category = mCat.id( "Contacts", showCat );
+ else{
category = mCat.id("Contacts", cat );
+ }
@@ -648,3 +651,4 @@ void AbTable::slotDoFind( const QString &findString, bool caseSensitive,
if ( currFindRow < -1 )
- currFindRow = currentRow() - 1;
+ currFindRow = - 1;
+
clearSelection( TRUE );
@@ -661,3 +665,2 @@ void AbTable::slotDoFind( const QString &findString, bool caseSensitive,
if ( contactCompare( contactList[ati], r, category ) )
- //if ( contactCompare( contactList[row], r, category ) )
break;
@@ -668,3 +671,2 @@ void AbTable::slotDoFind( const QString &findString, bool caseSensitive,
if ( contactCompare( contactList[ati], r, category ) )
- //if ( contactCompare( contactList[row], r, category ) )
break;
@@ -690,3 +692,3 @@ void AbTable::slotDoFind( const QString &findString, bool caseSensitive,
addSelection( foundSelection );
- setCurrentCell( currFindRow, numCols() - 1 );
+ setCurrentCell( currFindRow, 0 /* numCols() - 1 */ );
wrapAround = true;
@@ -702,3 +704,3 @@ static bool contactCompare( const OContact &cnt, const QRegExp &r, int category
returnMe = false;
- if ( (category == -1 && cats.count() == 0) || category == -2 )
+ if ( (cats.count() == 0) || (category == 0) )
returnMe = cnt.match( r );