summaryrefslogtreecommitdiff
path: root/libpurple/idle.c
diff options
context:
space:
mode:
authorRichard Laager <rlaager@pidgin.im>2007-06-16 19:48:23 +0000
committerRichard Laager <rlaager@pidgin.im>2007-06-16 19:48:23 +0000
commitd149c81d497888656414124b23768fac41cac91d (patch)
tree88d029d5d34bf3795777b132d4a26901ab9fff65 /libpurple/idle.c
parent24e6fa513ea900b8cb0345e24cbcf062427ddace (diff)
parentd1989d3ce0b4644f535108beee822938b3bd6f26 (diff)
downloadpidgin-d149c81d497888656414124b23768fac41cac91d.tar.gz
propagate from branch 'im.pidgin.pidgin.2.1.0' (head bcf28ef7e8ff6bb7068d4f7f8f99127f0584b1c8)
to branch 'im.pidgin.pidgin' (head 96acb4938782ddaddd8adb0a53d40606a935350b)
Diffstat (limited to 'libpurple/idle.c')
-rw-r--r--libpurple/idle.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libpurple/idle.c b/libpurple/idle.c
index e4a728da54..eb1a815ffb 100644
--- a/libpurple/idle.c
+++ b/libpurple/idle.c
@@ -304,6 +304,14 @@ purple_idle_get_handle()
return &handle;
}
+static gboolean _do_purple_idle_touch_cb(gpointer data)
+{
+ purple_idle_touch();
+
+ return FALSE;
+}
+
+
void
purple_idle_init()
{
@@ -325,7 +333,10 @@ purple_idle_init()
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