diff options
author | Felix Kaser <f.kaser@gmx.net> | 2010-06-08 23:25:12 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2010-06-09 19:23:15 +0800 |
commit | 0cb1c94b09fa663adbabe8b8869a6747524a9b3e (patch) | |
tree | 08290ab7ed78660be06529d4aa5d7e24bfb1ab66 /src/empathy-main-window.c | |
parent | 4331e1a45060bac43c4083df8ca22f6be7361d92 (diff) | |
download | gsoc2013-empathy-0cb1c94b09fa663adbabe8b8869a6747524a9b3e.tar gsoc2013-empathy-0cb1c94b09fa663adbabe8b8869a6747524a9b3e.tar.gz gsoc2013-empathy-0cb1c94b09fa663adbabe8b8869a6747524a9b3e.tar.bz2 gsoc2013-empathy-0cb1c94b09fa663adbabe8b8869a6747524a9b3e.tar.lz gsoc2013-empathy-0cb1c94b09fa663adbabe8b8869a6747524a9b3e.tar.xz gsoc2013-empathy-0cb1c94b09fa663adbabe8b8869a6747524a9b3e.tar.zst gsoc2013-empathy-0cb1c94b09fa663adbabe8b8869a6747524a9b3e.zip |
Use EmpathyLiveSearch in main window's contact list
Diffstat (limited to 'src/empathy-main-window.c')
-rw-r--r-- | src/empathy-main-window.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c index bf397de9d..998c024fe 100644 --- a/src/empathy-main-window.c +++ b/src/empathy-main-window.c @@ -44,6 +44,7 @@ #include <libempathy-gtk/empathy-contact-dialogs.h> #include <libempathy-gtk/empathy-contact-list-store.h> #include <libempathy-gtk/empathy-contact-list-view.h> +#include <libempathy-gtk/empathy-live-search.h> #include <libempathy-gtk/empathy-geometry.h> #include <libempathy-gtk/empathy-gtk-enum-types.h> #include <libempathy-gtk/empathy-new-message-dialog.h> @@ -97,6 +98,7 @@ typedef struct { GtkWidget *presence_toolbar; GtkWidget *presence_chooser; GtkWidget *errors_vbox; + GtkWidget *search_bar; GtkToggleAction *show_protocols; GtkRadioAction *sort_by_name; @@ -292,7 +294,7 @@ main_window_row_activated_cb (EmpathyContactListView *view, GtkTreeIter iter; GSList *events, *l; - model = GTK_TREE_MODEL (window->list_store); + model = gtk_tree_view_get_model (GTK_TREE_VIEW (window->list_view)); gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get (model, &iter, EMPATHY_CONTACT_LIST_STORE_COL_CONTACT, &contact, @@ -1516,9 +1518,11 @@ empathy_main_window_show (void) window->list_view = empathy_contact_list_view_new (window->list_store, EMPATHY_CONTACT_LIST_FEATURE_ALL, EMPATHY_CONTACT_FEATURE_ALL); + window->butterfly_log_migration_members_changed_id = g_signal_connect ( list_iface, "members-changed", G_CALLBACK (main_window_members_changed_cb), window); + g_object_unref (list_iface); gtk_widget_show (GTK_WIDGET (window->list_view)); @@ -1528,6 +1532,14 @@ empathy_main_window_show (void) G_CALLBACK (main_window_row_activated_cb), window); + /* Set up search bar */ + window->search_bar = empathy_live_search_new ( + GTK_WIDGET (window->list_view)); + empathy_contact_list_view_set_live_search (window->list_view, + EMPATHY_LIVE_SEARCH (window->search_bar)); + gtk_box_pack_start (GTK_BOX (window->main_vbox), window->search_bar, + FALSE, TRUE, 0); + /* Load user-defined accelerators. */ main_window_accels_load (); |