aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/contact-manager.c16
2 files changed, 11 insertions, 7 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 16358591d..8c6094c95 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -8,7 +8,7 @@ LDADD = \
$(top_builddir)/libempathy/libempathy.la \
$(EMPATHY_LIBS)
-noinst_PROGRAMS = \
+bin_PROGRAMS = \
contact-manager
contact_manager_SOURCES = contact-manager.c
diff --git a/tests/contact-manager.c b/tests/contact-manager.c
index c9450105a..2d10642e1 100644
--- a/tests/contact-manager.c
+++ b/tests/contact-manager.c
@@ -1,12 +1,12 @@
#include <stdlib.h>
-#include <gtk/gtk.h>
+#include <glib.h>
#include <libempathy/empathy-contact-manager.h>
static gboolean
-time_out (gpointer data)
+time_out (gpointer main_loop)
{
- gtk_main_quit ();
+ g_main_loop_quit (main_loop);
return FALSE;
}
@@ -15,16 +15,20 @@ int
main (int argc, char **argv)
{
EmpathyContactManager *manager;
+ GMainLoop *main_loop;
- gtk_init (&argc, &argv);
+ g_type_init ();
+ main_loop = g_main_loop_new (NULL, FALSE);
manager = empathy_contact_manager_new ();
- g_timeout_add (5000, time_out, NULL);
+ g_timeout_add (5000, time_out, main_loop);
- gtk_main ();
+ g_main_loop_run (main_loop);
g_object_unref (manager);
+ g_main_loop_unref (main_loop);
return EXIT_SUCCESS;
}
+