I think this will fix the problem that elb had where bonjour (and probably other accounts too) were signing on initially when -n was specified.

Thu, 14 Jun 2007 19:32:06 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Thu, 14 Jun 2007 19:32:06 +0000
changeset 17741
5075c0d3a19a
parent 17740
e392c3758fb9
child 17742
d6ff589b4477

I think this will fix the problem that elb had where bonjour (and probably other accounts too) were signing on initially when -n was specified.

libpurple/idle.c file | annotate | diff | comparison | revisions
--- a/libpurple/idle.c	Thu Jun 14 18:20:53 2007 +0000
+++ b/libpurple/idle.c	Thu Jun 14 19:32:06 2007 +0000
@@ -300,6 +300,14 @@
 	return &handle;
 }
 
+static gboolean _do_purple_idle_touch_cb(gpointer data)
+{
+	purple_idle_touch();
+
+	return FALSE;
+}
+
+
 void
 purple_idle_init()
 {
@@ -319,7 +327,10 @@
 	purple_prefs_connect_callback(purple_idle_get_handle(), "/purple/away/idle_reporting",
 	                              idle_reporting_cb, NULL);
 
-	purple_idle_touch();
+	/* 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);
+
 }
 
 void

mercurial