[evolution-data-server/gnome-3-0] Bug #659184 - Contacts calendar	backend doesn't show events
- From: Milan Crha <mcrha src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [evolution-data-server/gnome-3-0] Bug #659184 - Contacts calendar	backend doesn't show events
 
- Date: Mon, 19 Sep 2011 09:49:19 +0000 (UTC)
 
commit 321859db29b5d461c8918c26c5bbbe57781f0ed2
Author: Milan Crha <mcrha redhat com>
Date:   Mon Sep 19 11:48:11 2011 +0200
    Bug #659184 - Contacts calendar backend doesn't show events
 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 f83e4c7..7a0177a 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;
 			}
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]