aboutsummaryrefslogtreecommitdiffstats
path: root/tests/interactive/test-empathy-roster-view.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-11 21:30:10 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-14 15:21:45 +0800
commitea95d2c328587a287cd3854683967f097241c063 (patch)
treeb48026e1c0631149a4e9123d973bb68c43e368be /tests/interactive/test-empathy-roster-view.c
parent44ca1d97c09703fd2738b6169d36aea69280dbb2 (diff)
downloadgsoc2013-empathy-ea95d2c328587a287cd3854683967f097241c063.tar
gsoc2013-empathy-ea95d2c328587a287cd3854683967f097241c063.tar.gz
gsoc2013-empathy-ea95d2c328587a287cd3854683967f097241c063.tar.bz2
gsoc2013-empathy-ea95d2c328587a287cd3854683967f097241c063.tar.lz
gsoc2013-empathy-ea95d2c328587a287cd3854683967f097241c063.tar.xz
gsoc2013-empathy-ea95d2c328587a287cd3854683967f097241c063.tar.zst
gsoc2013-empathy-ea95d2c328587a287cd3854683967f097241c063.zip
add test-empathy-roster-view
Diffstat (limited to 'tests/interactive/test-empathy-roster-view.c')
-rw-r--r--tests/interactive/test-empathy-roster-view.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/interactive/test-empathy-roster-view.c b/tests/interactive/test-empathy-roster-view.c
new file mode 100644
index 000000000..20515d9e6
--- /dev/null
+++ b/tests/interactive/test-empathy-roster-view.c
@@ -0,0 +1,43 @@
+#include <config.h>
+
+#include <libempathy-gtk/empathy-roster-view.h>
+#include <libempathy-gtk/empathy-ui-utils.h>
+
+int
+main (int argc,
+ char **argv)
+{
+ GtkWidget *window, *view, *scrolled;
+ EmpathyIndividualManager *mgr;
+
+ gtk_init (&argc, &argv);
+ empathy_gtk_init ();
+
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ empathy_set_css_provider (window);
+
+ mgr = empathy_individual_manager_dup_singleton ();
+
+ view = empathy_roster_view_new (mgr);
+
+ g_object_unref (mgr);
+
+ 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_window_set_default_size (GTK_WINDOW (window), 300, 600);
+ gtk_widget_show_all (window);
+
+ g_signal_connect_swapped (window, "destroy",
+ G_CALLBACK (gtk_main_quit), NULL);
+
+ gtk_main ();
+
+ return 0;
+}