empathy r2767 - trunk/tests
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2767 - trunk/tests
- Date: Fri, 10 Apr 2009 16:52:58 +0000 (UTC)
Author: xclaesse
Date: Fri Apr 10 16:52:58 2009
New Revision: 2767
URL: http://svn.gnome.org/viewvc/empathy?rev=2767&view=rev
Log:
Add a test program for the presence widget
From: Davyd Madeley <davyd madeley id au>
Added:
trunk/tests/test-empathy-presence-chooser.c
Modified:
trunk/tests/Makefile.am
Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am (original)
+++ trunk/tests/Makefile.am Fri Apr 10 16:52:58 2009
@@ -25,12 +25,14 @@
contact-manager \
contact-run-until-ready \
contact-run-until-ready-2 \
- empetit
+ empetit \
+ test-empathy-presence-chooser
contact_manager_SOURCES = contact-manager.c
contact_run_until_ready_SOURCES = contact-run-until-ready.c
contact_run_until_ready_2_SOURCES = contact-run-until-ready-2.c
empetit_SOURCES = empetit.c
+test_empathy_presence_chooser_SOURCES = test-empathy-presence-chooser.c
check_PROGRAMS = check-main
TESTS = check-main
Added: trunk/tests/test-empathy-presence-chooser.c
==============================================================================
--- (empty file)
+++ trunk/tests/test-empathy-presence-chooser.c Fri Apr 10 16:52:58 2009
@@ -0,0 +1,29 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+#include <config.h>
+
+#include <gtk/gtk.h>
+
+#include <libempathy-gtk/empathy-ui-utils.h>
+#include <libempathy-gtk/empathy-presence-chooser.h>
+
+int
+main (int argc, char **argv)
+{
+ gtk_init (&argc, &argv);
+ empathy_gtk_init ();
+
+ GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ GtkWidget *chooser = empathy_presence_chooser_new ();
+ gtk_container_add (GTK_CONTAINER (window), chooser);
+
+ 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;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]