diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-04-05 21:59:47 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-04-05 23:00:59 +0800 |
commit | 8d08c9ce5b488f09be435db11fbf26bf33e8ea00 (patch) | |
tree | bdb451f41a6b3be28d34ca7e57a8f6045f14a8bd /tests/interactive/test-empathy-account-chooser.c | |
parent | 6637bf59307f771e97481141f6dfa60f246dcd86 (diff) | |
download | gsoc2013-empathy-8d08c9ce5b488f09be435db11fbf26bf33e8ea00.tar gsoc2013-empathy-8d08c9ce5b488f09be435db11fbf26bf33e8ea00.tar.gz gsoc2013-empathy-8d08c9ce5b488f09be435db11fbf26bf33e8ea00.tar.bz2 gsoc2013-empathy-8d08c9ce5b488f09be435db11fbf26bf33e8ea00.tar.lz gsoc2013-empathy-8d08c9ce5b488f09be435db11fbf26bf33e8ea00.tar.xz gsoc2013-empathy-8d08c9ce5b488f09be435db11fbf26bf33e8ea00.tar.zst gsoc2013-empathy-8d08c9ce5b488f09be435db11fbf26bf33e8ea00.zip |
add tests/interactive/test-empathy-account-chooser.c
Diffstat (limited to 'tests/interactive/test-empathy-account-chooser.c')
-rw-r--r-- | tests/interactive/test-empathy-account-chooser.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/interactive/test-empathy-account-chooser.c b/tests/interactive/test-empathy-account-chooser.c new file mode 100644 index 000000000..d2ce7ccbc --- /dev/null +++ b/tests/interactive/test-empathy-account-chooser.c @@ -0,0 +1,45 @@ +#include <config.h> + +#include <gtk/gtk.h> + +#include <libempathy-gtk/empathy-ui-utils.h> +#include <libempathy-gtk/empathy-account-chooser.h> + +static gboolean +filter_func (TpAccount *account, + gpointer user_data) +{ + g_assert (TP_IS_ACCOUNT (account)); + return TRUE; +} + +int +main (int argc, + char **argv) +{ + GtkWidget *window, *c; + + gtk_init (&argc, &argv); + empathy_gtk_init (); + + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + c = empathy_account_chooser_new (); + + empathy_account_chooser_set_has_all_option (EMPATHY_ACCOUNT_CHOOSER (c), + TRUE); + + empathy_account_chooser_set_filter (EMPATHY_ACCOUNT_CHOOSER (c), + filter_func, NULL); + + gtk_container_add (GTK_CONTAINER (window), c); + + /* gtk_window_set_default_size (GTK_WINDOW (window), 150, -1);*/ + gtk_widget_show_all (window); + + g_signal_connect_swapped (window, "destroy", + G_CALLBACK (gtk_main_quit), NULL); + + gtk_main (); + + return 0; +} |