From 359327e9422869709e3108bfaee7ebf07d35673c Mon Sep 17 00:00:00 2001 From: Mike Alexander Date: Sun, 13 Jul 2014 01:57:34 -0400 Subject: [PATCH] Bug 733107: Search for reconcile status doesn't work right. --- src/gnome-search/search-reconciled.c | 9 +++------ src/gnome-search/search-reconciled.h | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/gnome-search/search-reconciled.c b/src/gnome-search/search-reconciled.c index 647d1ca391..76658cd1be 100644 --- a/src/gnome-search/search-reconciled.c +++ b/src/gnome-search/search-reconciled.c @@ -108,7 +108,7 @@ gnc_search_reconciled_class_init (GNCSearchReconciledClass *class) static void gnc_search_reconciled_init (GNCSearchReconciled *o) { - o->how = QOF_COMPARE_EQUAL; + o->how = QOF_CHAR_MATCH_ANY;; o->value = CLEARED_NO; } @@ -145,7 +145,7 @@ gnc_search_reconciled_set_value (GNCSearchReconciled *fi, cleared_match_t value) } void -gnc_search_reconciled_set_how (GNCSearchReconciled *fi, QofQueryCompare how) +gnc_search_reconciled_set_how (GNCSearchReconciled *fi, QofCharMatch how) { g_return_if_fail (fi); g_return_if_fail (IS_GNCSEARCH_RECONCILED (fi)); @@ -248,7 +248,6 @@ static QofQueryPredData* gncs_get_predicate (GNCSearchCoreType *fe) char chars[6]; cleared_match_t value; int i; - QofCharMatch cmatch_how = QOF_CHAR_MATCH_NONE; g_return_val_if_fail (fi, NULL); g_return_val_if_fail (IS_GNCSEARCH_RECONCILED (fi), NULL); @@ -270,9 +269,7 @@ static QofQueryPredData* gncs_get_predicate (GNCSearchCoreType *fe) chars[i++] = VREC; chars[i] = '\0'; - if (fi->how == QOF_COMPARE_EQUAL) - cmatch_how = QOF_CHAR_MATCH_ANY; - return qof_query_char_predicate (cmatch_how, chars); + return qof_query_char_predicate (fi->how, chars); } static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe) diff --git a/src/gnome-search/search-reconciled.h b/src/gnome-search/search-reconciled.h index 5366bb2fa4..cd14e39c07 100644 --- a/src/gnome-search/search-reconciled.h +++ b/src/gnome-search/search-reconciled.h @@ -37,7 +37,7 @@ struct _GNCSearchReconciled { GNCSearchCoreType parent; - QofQueryCompare how; + QofCharMatch how; cleared_match_t value; }; @@ -55,6 +55,6 @@ GNCSearchReconciled *gnc_search_reconciled_new (void); /* methods */ void gnc_search_reconciled_set_value(GNCSearchReconciled *fi, cleared_match_t value); -void gnc_search_reconciled_set_how (GNCSearchReconciled *fi, QofQueryCompare how); +void gnc_search_reconciled_set_how (GNCSearchReconciled *fi, QofCharMatch how); #endif /* ! _GNCSEARCH_RECONCILED_H */