diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2007-09-27 16:13:51 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-09-27 16:13:51 +0800 |
commit | 37a9b435efdb27dad389763a12b9bad185b700d5 (patch) | |
tree | 8cb50267fa99af22f4869b5820b4fbb566f3f4a9 /tests/contact-manager.c | |
parent | 01e74b6239a9822b19e82c2300701987bc429fe4 (diff) | |
download | gsoc2013-empathy-37a9b435efdb27dad389763a12b9bad185b700d5.tar gsoc2013-empathy-37a9b435efdb27dad389763a12b9bad185b700d5.tar.gz gsoc2013-empathy-37a9b435efdb27dad389763a12b9bad185b700d5.tar.bz2 gsoc2013-empathy-37a9b435efdb27dad389763a12b9bad185b700d5.tar.lz gsoc2013-empathy-37a9b435efdb27dad389763a12b9bad185b700d5.tar.xz gsoc2013-empathy-37a9b435efdb27dad389763a12b9bad185b700d5.tar.zst gsoc2013-empathy-37a9b435efdb27dad389763a12b9bad185b700d5.zip |
No need to init gtk, GMainLoop is enough and makes easier to run valgrind.
2007-09-27 Xavier Claessens <xclaesse@gmail.com>
* tests/contact-manager.c:
* tests/Makefile.am: No need to init gtk, GMainLoop is enough and makes
easier to run valgrind.
svn path=/trunk/; revision=324
Diffstat (limited to 'tests/contact-manager.c')
-rw-r--r-- | tests/contact-manager.c | 16 |
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; } + |