aboutsummaryrefslogtreecommitdiffstats
path: root/tests/contact-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/contact-manager.c')
-rw-r--r--tests/contact-manager.c16
1 files changed, 10 insertions, 6 deletions
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;
}
+