diff options
Diffstat (limited to 'tests/interactive/test-empathy-roster-view.c')
-rw-r--r-- | tests/interactive/test-empathy-roster-view.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/interactive/test-empathy-roster-view.c b/tests/interactive/test-empathy-roster-view.c index 20515d9e6..f01b8b6ad 100644 --- a/tests/interactive/test-empathy-roster-view.c +++ b/tests/interactive/test-empathy-roster-view.c @@ -3,16 +3,35 @@ #include <libempathy-gtk/empathy-roster-view.h> #include <libempathy-gtk/empathy-ui-utils.h> +static gboolean show_offline = FALSE; + +static GOptionEntry entries[] = +{ + { "offline", 0, 0, G_OPTION_ARG_NONE, &show_offline, "Show offline contacts", NULL }, + { NULL } +}; + int main (int argc, char **argv) { GtkWidget *window, *view, *scrolled; EmpathyIndividualManager *mgr; + GError *error = NULL; + GOptionContext *context; gtk_init (&argc, &argv); empathy_gtk_init (); + context = g_option_context_new ("- test tree model performance"); + g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE); + g_option_context_add_group (context, gtk_get_option_group (TRUE)); + if (!g_option_context_parse (context, &argc, &argv, &error)) + { + g_print ("option parsing failed: %s\n", error->message); + return 1; + } + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); empathy_set_css_provider (window); @@ -21,6 +40,8 @@ main (int argc, view = empathy_roster_view_new (mgr); + empathy_roster_view_show_offline (EMPATHY_ROSTER_VIEW (view), show_offline); + g_object_unref (mgr); scrolled = gtk_scrolled_window_new (NULL, NULL); |