im.pidgin.pidgin: cee4435a3ff47ac514db834171773a6143ef3efa

markdoliner at pidgin.im markdoliner at pidgin.im
Sun Jan 27 16:10:42 EST 2008


-----------------------------------------------------------------
Revision: cee4435a3ff47ac514db834171773a6143ef3efa
Ancestor: de8dad1b03c821de19c59374dee246d735dfa955
Author: markdoliner at pidgin.im
Date: 2008-01-27T20:52:53
Branch: im.pidgin.pidgin

Modified files:
        libpurple/dnssrv.c libpurple/idle.c
        libpurple/protocols/msnp9/msn.c libpurple/stringref.c

ChangeLog: 

Change some g_idle_add(...) calls in libpurple to purple_timeout_add(0, ...)
We need to use the purple functions here so we can hook into mainloops
other than gtk, which is important for Adium.  Felipe pointed out the call
in msnp9 and grep found the others.

-------------- next part --------------
============================================================
--- libpurple/dnssrv.c	dbd72924c31734085a7b32e9f647972fffd33fa3
+++ libpurple/dnssrv.c	80dad502d3a922fd2d8433e40942d1cb657531f5
@@ -315,7 +315,7 @@ res_thread(gpointer data)
 
 	/* back to main thread */
 	/* Note: this should *not* be attached to query_data->handle - it will cause leakage */
-	g_idle_add(res_main_thread_cb, query_data);
+	purple_timeout_add(0, res_main_thread_cb, query_data);
 
 	g_thread_exit(NULL);
 	return NULL;
@@ -410,7 +410,7 @@ purple_srv_resolve(const char *protocol,
 	 * Asynchronously call the callback since stuff may not expect
 	 * the callback to be called before this returns */
 	if (query_data->error_message != NULL)
-		query_data->handle = g_idle_add(res_main_thread_cb, query_data);
+		query_data->handle = purple_timeout_add(0, res_main_thread_cb, query_data);
 
 	return query_data;
 #endif
============================================================
--- libpurple/idle.c	07c57548bfc1576f2649de7ea070e9ee1b566f05
+++ libpurple/idle.c	4c2f40738284bcb7eca06867ba0f4c3c09771d9b
@@ -24,6 +24,7 @@
 
 #include "connection.h"
 #include "debug.h"
+#include "eventloop.h"
 #include "idle.h"
 #include "log.h"
 #include "prefs.h"
@@ -333,7 +334,7 @@ purple_idle_init()
 
 	/* Initialize the idleness asynchronously so it doesn't check idleness,
 	 * and potentially try to change the status before the UI is initialized */
-	g_idle_add(_do_purple_idle_touch_cb, NULL);
+	purple_timeout_add(0, _do_purple_idle_touch_cb, NULL);
 
 }
 
============================================================
--- libpurple/protocols/msnp9/msn.c	8e5d2e40a9ab4eb36e7934cfa4c1b7bea4ce8aef
+++ libpurple/protocols/msnp9/msn.c	0cb785cb825d6db9977a1b85b7ad489a49e195e2
@@ -27,6 +27,7 @@
 
 #include "msn.h"
 #include "accountopt.h"
+#include "eventloop.h"
 #include "msg.h"
 #include "page.h"
 #include "pluginpref.h"
@@ -856,7 +857,7 @@ msn_send_im(PurpleConnection *gc, const 
 		imdata->msg = body_str;
 		imdata->flags = flags;
 		imdata->when = time(NULL);
-		g_idle_add(msn_send_me_im, imdata);
+		purple_timeout_add(0, msn_send_me_im, imdata);
 	}
 
 	msn_message_destroy(msg);
============================================================
--- libpurple/stringref.c	b65fe580a300682722d56cf3397dd1b776c392e8
+++ libpurple/stringref.c	4b4950f45060e5c4738fa48ef2dbb60655b2075e
@@ -31,6 +31,7 @@
 #include <stdarg.h>
 
 #include "debug.h"
+#include "eventloop.h"
 #include "stringref.h"
 
 /**
@@ -87,7 +88,7 @@ PurpleStringref *purple_stringref_new_no
 	newref->ref = 0x80000000;
 
 	if (gclist == NULL)
-		g_idle_add(gs_idle_cb, NULL);
+		purple_timeout_add(0, gs_idle_cb, NULL);
 	gclist = g_list_prepend(gclist, newref);
 
 	return newref;


More information about the Commits mailing list