aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-25 17:21:01 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-14 15:21:47 +0800
commit8f36eb3772ad0aca0a88e5181b22ec44430d1c64 (patch)
treedcd574548d331d6c2d1736c927098f8d95d96ad2
parentec9056604f24cd9811aaa2010be91eb32985efa1 (diff)
downloadgsoc2013-empathy-8f36eb3772ad0aca0a88e5181b22ec44430d1c64.tar
gsoc2013-empathy-8f36eb3772ad0aca0a88e5181b22ec44430d1c64.tar.gz
gsoc2013-empathy-8f36eb3772ad0aca0a88e5181b22ec44430d1c64.tar.bz2
gsoc2013-empathy-8f36eb3772ad0aca0a88e5181b22ec44430d1c64.tar.lz
gsoc2013-empathy-8f36eb3772ad0aca0a88e5181b22ec44430d1c64.tar.xz
gsoc2013-empathy-8f36eb3772ad0aca0a88e5181b22ec44430d1c64.tar.zst
gsoc2013-empathy-8f36eb3772ad0aca0a88e5181b22ec44430d1c64.zip
test-empathy-roster-view: add option to display offline contacts
-rw-r--r--tests/interactive/test-empathy-roster-view.c21
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);