[empathy] Use the special "" search field if the CM supports it



commit 3c2728fb0e70803085f699538c115b4c41b0b869
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 ce5c578..4468e95 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]