[empathy/gnome-2-34] Use the special "" search field if the CM supports it



commit 0f5a0cf61fe7de389b5840308bfc782a1347ade5
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Mon Mar 7 11:26:05 2011 +0000

    Use the special "" search field if the CM supports it

 libempathy-gtk/empathy-contact-search-dialog.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-search-dialog.c b/libempathy-gtk/empathy-contact-search-dialog.c
index e0922cc..b88e930 100644
--- a/libempathy-gtk/empathy-contact-search-dialog.c
+++ b/libempathy-gtk/empathy-contact-search-dialog.c
@@ -104,7 +104,11 @@ on_searcher_reset (GObject *source_object,
   search = g_hash_table_new (g_str_hash, g_str_equal);
 
   search_criteria = gtk_entry_get_text (GTK_ENTRY (priv->search_entry));
-  g_hash_table_insert (search, "fn", (gpointer) search_criteria);
+
+  if (tp_strv_contains (tp_contact_search_get_search_keys (searcher), ""))
+    g_hash_table_insert (search, "", (gpointer) search_criteria);
+  else
+    g_hash_table_insert (search, "fn", (gpointer) search_criteria);
 
   gtk_list_store_clear (priv->store);
   tp_contact_search_start (priv->searcher, search);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]