]> git.0d.be Git - empathy.git/commitdiff
Add test-empathy-profile-chooser.
authorJonny Lamb <jonny.lamb@collabora.co.uk>
Thu, 4 Jun 2009 22:03:01 +0000 (23:03 +0100)
committerJonny Lamb <jonny.lamb@collabora.co.uk>
Fri, 5 Jun 2009 12:04:10 +0000 (13:04 +0100)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
tests/.gitignore
tests/Makefile.am
tests/test-empathy-profile-chooser.c [new file with mode: 0644]

index a37f3e5a027cbe2bcabc37d778e0fbfcb9d95b3c..eac793465d09fba7b729acb747d0a20ecc8e3848 100644 (file)
@@ -6,3 +6,4 @@ contact-run-until-ready-2
 empetit
 test-empathy-presence-chooser
 test-empathy-status-preset-dialog
+test-empathy-profile-chooser
index 7740d1f8beeefd2b387e028f4464a980f9e44188..f96650e79094efe644f2aa3152c399c75fa17fa8 100644 (file)
@@ -26,12 +26,14 @@ noinst_PROGRAMS =                   \
        contact-manager                 \
        empetit                         \
        test-empathy-presence-chooser   \
-       test-empathy-status-preset-dialog
+       test-empathy-status-preset-dialog \
+       test-empathy-profile-chooser
 
 contact_manager_SOURCES = contact-manager.c
 empetit_SOURCES = empetit.c
 test_empathy_presence_chooser_SOURCES = test-empathy-presence-chooser.c
 test_empathy_status_preset_dialog_SOURCES = test-empathy-status-preset-dialog.c
+test_empathy_profile_chooser_SOURCES = test-empathy-profile-chooser.c
 
 check_PROGRAMS = check-main
 TESTS = check-main
diff --git a/tests/test-empathy-profile-chooser.c b/tests/test-empathy-profile-chooser.c
new file mode 100644 (file)
index 0000000..9078bbd
--- /dev/null
@@ -0,0 +1,31 @@
+#include <config.h>
+
+#include <gtk/gtk.h>
+
+#include <libempathy-gtk/empathy-ui-utils.h>
+#include <libempathy-gtk/empathy-profile-chooser.h>
+
+int
+main (int argc,
+    char **argv)
+{
+  GtkWidget *window;
+  GtkWidget *chooser;
+
+  gtk_init (&argc, &argv);
+  empathy_gtk_init ();
+
+  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  chooser = empathy_profile_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;
+}