aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-08-18 10:28:41 +0800
committerChris Toshok <toshok@src.gnome.org>2001-08-18 10:28:41 +0800
commited62703ead5d7696c50d89d98c419a1f2e2597b9 (patch)
tree639b3db8e1fb92b5d9666089421eefefc1c0f561 /addressbook
parent613090ed2747c4d5885bca15d54c0c17300817ee (diff)
downloadgsoc2013-evolution-ed62703ead5d7696c50d89d98c419a1f2e2597b9.tar.gz
gsoc2013-evolution-ed62703ead5d7696c50d89d98c419a1f2e2597b9.tar.zst
gsoc2013-evolution-ed62703ead5d7696c50d89d98c419a1f2e2597b9.zip
call e_sexp_encode_string on the search string the user types in so it
2001-08-17 Chris Toshok <toshok@ximian.com> * gui/component/addressbook.c (addressbook_query_changed): call e_sexp_encode_string on the search string the user types in so it doesn't break sexp parsing in the wombat. svn path=/trunk/; revision=12190
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog6
-rw-r--r--addressbook/gui/component/addressbook.c16
2 files changed, 16 insertions, 6 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 769c804373..467585c76c 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,9 @@
+2001-08-17 Chris Toshok <toshok@ximian.com>
+
+ * gui/component/addressbook.c (addressbook_query_changed): call
+ e_sexp_encode_string on the search string the user types in so it
+ doesn't break sexp parsing in the wombat.
+
2001-08-17 Damon Chaplin <damon@ximian.com>
* gui/component/addressbook.c: changed to new print icon.
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index b849f28b72..8aeeb0d032 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -22,6 +22,7 @@
#include <gal/widgets/e-unicode.h>
#include "e-util/e-categories-master-list-wombat.h"
+#include "e-util/e-sexp.h"
#include "select-names/e-select-names.h"
#include "select-names/e-select-names-manager.h"
@@ -684,18 +685,20 @@ addressbook_query_changed (ESearchBar *esb, AddressbookView *view)
}
else {
if ((search_word && strlen (search_word)) || search_type == ESB_CATEGORY) {
+ GString *s = g_string_new ("");
+ e_sexp_encode_string (s, search_word);
switch (search_type) {
case ESB_ANY:
- search_query = g_strdup_printf ("(contains \"x-evolution-any-field\" \"%s\")",
- search_word);
+ search_query = g_strdup_printf ("(contains \"x-evolution-any-field\" %s)",
+ s->str);
break;
case ESB_FULL_NAME:
- search_query = g_strdup_printf ("(contains \"full_name\" \"%s\")",
- search_word);
+ search_query = g_strdup_printf ("(contains \"full_name\" %s)",
+ s->str);
break;
case ESB_EMAIL:
- search_query = g_strdup_printf ("(contains \"email\" \"%s\")",
- search_word);
+ search_query = g_strdup_printf ("(contains \"email\" %s)",
+ s->str);
break;
case ESB_CATEGORY:
subid = e_search_bar_get_subitem_id (esb);
@@ -713,6 +716,7 @@ addressbook_query_changed (ESearchBar *esb, AddressbookView *view)
search_query = g_strdup ("(contains \"full_name\" \"\")");
break;
}
+ g_string_free (s, TRUE);
} else
search_query = g_strdup ("(contains \"full_name\" \"\")");