[empathy] test-empathy-roster-view: add option to display offline contacts
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] test-empathy-roster-view: add option to display offline contacts
- Date: Thu, 14 Jun 2012 07:49:02 +0000 (UTC)
commit 8f36eb3772ad0aca0a88e5181b22ec44430d1c64
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Fri May 25 11:21:01 2012 +0200
test-empathy-roster-view: add option to display offline contacts
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 20515d9..f01b8b6 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]