aboutsummaryrefslogtreecommitdiffstats
path: root/tests/interactive
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-29 21:30:37 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-14 15:21:49 +0800
commit70a6130bdebf7a44753294f6363f905a5298ba3e (patch)
tree0d328e33e5fd4f9ce6ce7ba8bfae93d58cb9cd52 /tests/interactive
parent2216d828732d19a32e99a485d829504bfff7d224 (diff)
downloadgsoc2013-empathy-70a6130bdebf7a44753294f6363f905a5298ba3e.tar
gsoc2013-empathy-70a6130bdebf7a44753294f6363f905a5298ba3e.tar.gz
gsoc2013-empathy-70a6130bdebf7a44753294f6363f905a5298ba3e.tar.bz2
gsoc2013-empathy-70a6130bdebf7a44753294f6363f905a5298ba3e.tar.lz
gsoc2013-empathy-70a6130bdebf7a44753294f6363f905a5298ba3e.tar.xz
gsoc2013-empathy-70a6130bdebf7a44753294f6363f905a5298ba3e.tar.zst
gsoc2013-empathy-70a6130bdebf7a44753294f6363f905a5298ba3e.zip
roster-view: add live search support
Diffstat (limited to 'tests/interactive')
-rw-r--r--tests/interactive/test-empathy-roster-view.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/interactive/test-empathy-roster-view.c b/tests/interactive/test-empathy-roster-view.c
index 7c29634eb..5700c1518 100644
--- a/tests/interactive/test-empathy-roster-view.c
+++ b/tests/interactive/test-empathy-roster-view.c
@@ -17,7 +17,7 @@ int
main (int argc,
char **argv)
{
- GtkWidget *window, *view, *scrolled;
+ GtkWidget *window, *view, *scrolled, *box, *search;
EmpathyIndividualManager *mgr;
GError *error = NULL;
GOptionContext *context;
@@ -38,6 +38,8 @@ main (int argc,
empathy_set_css_provider (window);
+ box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
+
mgr = empathy_individual_manager_dup_singleton ();
view = empathy_roster_view_new (mgr);
@@ -47,13 +49,20 @@ main (int argc,
g_object_unref (mgr);
+ search = empathy_live_search_new (view);
+ empathy_roster_view_set_live_search (EMPATHY_ROSTER_VIEW (view),
+ EMPATHY_LIVE_SEARCH (search));
+
scrolled = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
egg_list_box_add_to_scrolled (EGG_LIST_BOX (view),
GTK_SCROLLED_WINDOW (scrolled));
- gtk_container_add (GTK_CONTAINER (window), scrolled);
+
+ gtk_box_pack_start (GTK_BOX (box), search, FALSE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (box), scrolled, TRUE, TRUE, 0);
+ gtk_container_add (GTK_CONTAINER (window), box);
gtk_window_set_default_size (GTK_WINDOW (window), 300, 600);
gtk_widget_show_all (window);