[evolution-data-server/gnome-3-6] Bug #691477 - exists_vcard is not supported when parsing a query from string
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-6] Bug #691477 - exists_vcard is not supported when parsing a query from string
- Date: Fri, 11 Jan 2013 13:29:53 +0000 (UTC)
commit 412a69b783beaaa48b5c25d1171105b3f3f2fcce
Author: Milan Crha <mcrha redhat com>
Date: Fri Jan 11 14:29:25 2013 +0100
Bug #691477 - exists_vcard is not supported when parsing a query from string
addressbook/libebook/e-book-query.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/libebook/e-book-query.c b/addressbook/libebook/e-book-query.c
index fd507ab..74ff9c3 100644
--- a/addressbook/libebook/e-book-query.c
+++ b/addressbook/libebook/e-book-query.c
@@ -617,6 +617,26 @@ func_exists (struct _ESExp *f,
return r;
}
+static ESExpResult *
+func_exists_vcard (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
+{
+ GList **list = data;
+ ESExpResult *r;
+
+ if (argc == 1
+ && argv[0]->type == ESEXP_RES_STRING) {
+ *list = g_list_prepend (*list, e_book_query_vcard_field_exists (argv[0]->value.string));
+ }
+
+ r = e_sexp_result_new (f, ESEXP_RES_BOOL);
+ r->value.boolean = FALSE;
+
+ return r;
+}
+
/* 'builtin' functions */
static const struct {
const gchar *name;
@@ -632,6 +652,7 @@ static const struct {
{ "beginswith", func_beginswith, 0 },
{ "endswith", func_endswith, 0 },
{ "exists", func_exists, 0 },
+ { "exists_vcard", func_exists_vcard, 0 }
};
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]