Bug 733107: Search for reconcile status doesn't work right.

This commit is contained in:
Mike Alexander 2014-07-13 01:57:34 -04:00
parent 2952df937c
commit 359327e942
2 changed files with 5 additions and 8 deletions

View File

@ -108,7 +108,7 @@ gnc_search_reconciled_class_init (GNCSearchReconciledClass *class)
static void static void
gnc_search_reconciled_init (GNCSearchReconciled *o) gnc_search_reconciled_init (GNCSearchReconciled *o)
{ {
o->how = QOF_COMPARE_EQUAL; o->how = QOF_CHAR_MATCH_ANY;;
o->value = CLEARED_NO; o->value = CLEARED_NO;
} }
@ -145,7 +145,7 @@ gnc_search_reconciled_set_value (GNCSearchReconciled *fi, cleared_match_t value)
} }
void 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 (fi);
g_return_if_fail (IS_GNCSEARCH_RECONCILED (fi)); g_return_if_fail (IS_GNCSEARCH_RECONCILED (fi));
@ -248,7 +248,6 @@ static QofQueryPredData* gncs_get_predicate (GNCSearchCoreType *fe)
char chars[6]; char chars[6];
cleared_match_t value; cleared_match_t value;
int i; int i;
QofCharMatch cmatch_how = QOF_CHAR_MATCH_NONE;
g_return_val_if_fail (fi, NULL); g_return_val_if_fail (fi, NULL);
g_return_val_if_fail (IS_GNCSEARCH_RECONCILED (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++] = VREC;
chars[i] = '\0'; chars[i] = '\0';
if (fi->how == QOF_COMPARE_EQUAL) return qof_query_char_predicate (fi->how, chars);
cmatch_how = QOF_CHAR_MATCH_ANY;
return qof_query_char_predicate (cmatch_how, chars);
} }
static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe) static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe)

View File

@ -37,7 +37,7 @@ struct _GNCSearchReconciled
{ {
GNCSearchCoreType parent; GNCSearchCoreType parent;
QofQueryCompare how; QofCharMatch how;
cleared_match_t value; cleared_match_t value;
}; };
@ -55,6 +55,6 @@ GNCSearchReconciled *gnc_search_reconciled_new (void);
/* methods */ /* methods */
void gnc_search_reconciled_set_value(GNCSearchReconciled *fi, cleared_match_t value); 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 */ #endif /* ! _GNCSEARCH_RECONCILED_H */