changeset 17872:81d42bfe31fa

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.
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 14 Jun 2007 19:32:06 +0000
parents 36ebcb33e2eb
children 00688b54407b
files libpurple/idle.c
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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