aboutsummaryrefslogtreecommitdiffstats
path: root/tests/contact-manager.c
diff options
context:
space:
mode:
authorxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-09-27 16:13:51 +0800
committerxclaesse <xclaesse@4ee84921-47dd-4033-b63a-18d7a039a3e4>2007-09-27 16:13:51 +0800
commitd61010d5609a5a773d562012adddef8304bc6d14 (patch)
tree8cb50267fa99af22f4869b5820b4fbb566f3f4a9 /tests/contact-manager.c
parent9c4c5799ee28f93e6ab0ca9019cb4cb7a53a9d39 (diff)
downloadgsoc2013-empathy-d61010d5609a5a773d562012adddef8304bc6d14.tar
gsoc2013-empathy-d61010d5609a5a773d562012adddef8304bc6d14.tar.gz
gsoc2013-empathy-d61010d5609a5a773d562012adddef8304bc6d14.tar.bz2
gsoc2013-empathy-d61010d5609a5a773d562012adddef8304bc6d14.tar.lz
gsoc2013-empathy-d61010d5609a5a773d562012adddef8304bc6d14.tar.xz
gsoc2013-empathy-d61010d5609a5a773d562012adddef8304bc6d14.tar.zst
gsoc2013-empathy-d61010d5609a5a773d562012adddef8304bc6d14.zip
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. git-svn-id: svn+ssh://svn.gnome.org/svn/empathy/trunk@324 4ee84921-47dd-4033-b63a-18d7a039a3e4
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;
}
+