diff options
author | Milan Crha <mcrha@redhat.com> | 2011-09-19 11:48:11 +0200 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-09-19 11:48:11 +0200 |
commit | 321859db29b5d461c8918c26c5bbbe57781f0ed2 (patch) | |
tree | 032048667ac8b6a20ee143b72091d59fc81c765b | |
parent | 293b25c278235627b925c453e7b8424f0f2412f5 (diff) | |
download | evolution-data-server-321859db29b5d461c8918c26c5bbbe57781f0ed2.tar.gz |
Bug #659184 - Contacts calendar backend doesn't show events
-rw-r--r-- | addressbook/libedata-book/e-book-backend-sexp.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/addressbook/libedata-book/e-book-backend-sexp.c b/addressbook/libedata-book/e-book-backend-sexp.c index f83e4c7bd..7a0177af8 100644 --- a/addressbook/libedata-book/e-book-backend-sexp.c +++ b/addressbook/libedata-book/e-book-backend-sexp.c @@ -390,6 +390,11 @@ entry_compare (SearchContext *ctx, struct _ESExp *f, truth = compare_date (date, argv[1]->value.string, compare); e_contact_date_free (date); } + } else { + g_warn_if_reached (); + + saw_any = FALSE; + break; } /* if we're looking at all fields and find a match, @@ -767,9 +772,23 @@ func_exists (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer d truth = TRUE; } else if (info->prop_type == PROP_TYPE_LIST) { - /* the special searches that match any of the list elements */ + /* the special searches that match any of the list elements */ truth = info->list_compare (ctx->contact, "", exists_helper); } + else if (info->prop_type == PROP_TYPE_DATE) { + EContactDate *date; + + date = e_contact_get (ctx->contact, info->field_id); + + if (date) { + truth = TRUE; + e_contact_date_free (date); + } + } else { + g_warn_if_reached (); + + saw_any = FALSE; + } break; } |