diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-05-11 21:30:10 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-06-14 15:21:45 +0800 |
commit | ea95d2c328587a287cd3854683967f097241c063 (patch) | |
tree | b48026e1c0631149a4e9123d973bb68c43e368be /tests | |
parent | 44ca1d97c09703fd2738b6169d36aea69280dbb2 (diff) | |
download | gsoc2013-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')
-rw-r--r-- | tests/interactive/.gitignore | 1 | ||||
-rw-r--r-- | tests/interactive/Makefile.am | 4 | ||||
-rw-r--r-- | tests/interactive/test-empathy-roster-view.c | 43 |
3 files changed, 47 insertions, 1 deletions
diff --git a/tests/interactive/.gitignore b/tests/interactive/.gitignore index 535570e16..0ca660767 100644 --- a/tests/interactive/.gitignore +++ b/tests/interactive/.gitignore @@ -10,3 +10,4 @@ test-empathy-status-preset-dialog test-empathy-protocol-chooser test-empathy-account-chooser test-empathy-calendar-button +test-empathy-roster-view diff --git a/tests/interactive/Makefile.am b/tests/interactive/Makefile.am index ba82180d5..d396f3908 100644 --- a/tests/interactive/Makefile.am +++ b/tests/interactive/Makefile.am @@ -18,7 +18,8 @@ noinst_PROGRAMS = \ test-empathy-status-preset-dialog \ test-empathy-protocol-chooser \ test-empathy-account-chooser \ - test-empathy-calendar-button + test-empathy-calendar-button \ + test-empathy-roster-view empathy_logs_SOURCES = empathy-logs.c test_empathy_contact_blocking_dialog_SOURCES = test-empathy-contact-blocking-dialog.c @@ -27,3 +28,4 @@ test_empathy_status_preset_dialog_SOURCES = test-empathy-status-preset-dialog.c test_empathy_protocol_chooser_SOURCES = test-empathy-protocol-chooser.c test_empathy_account_chooser_SOURCES = test-empathy-account-chooser.c test_empathy_calendar_button_SOURCES = test-empathy-calendar-button.c +test_empathy_roster_view_SOURCES = test-empathy-roster-view.c 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; +} |