aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/contact-manager.c16
3 files changed, 17 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index a6365bc2f..c5df062a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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.
+
+2007-09-27 Xavier Claessens <xclaesse@gmail.com>
+
* libempathy/empathy-avatar.c: Fix leak when loading avatar from cache.
* libempathy/empathy-contact-factory.c: Do not request avatar for
unknown tokens, wait for AvatarUpdate signal.
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;
}
+