Mercurial > pidgin.yaz
comparison libpurple/idle.c @ 18119:59aec2d6ec43
propagate from branch 'im.pidgin.pidgin.2.1.0' (head 86fd5e0d8b80a9da3103e850c97f1e04a2333961)
to branch 'im.pidgin.pidgin' (head 999df812d342023b977c17afda10ed0238f1f80d)
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sat, 16 Jun 2007 19:48:23 +0000 |
parents | 926ccb104da0 40d51793f2d7 |
children | 667c209521db |
comparison
equal
deleted
inserted
replaced
18118:ab6d2763b8d8 | 18119:59aec2d6ec43 |
---|---|
302 static int handle; | 302 static int handle; |
303 | 303 |
304 return &handle; | 304 return &handle; |
305 } | 305 } |
306 | 306 |
307 static gboolean _do_purple_idle_touch_cb(gpointer data) | |
308 { | |
309 purple_idle_touch(); | |
310 | |
311 return FALSE; | |
312 } | |
313 | |
314 | |
307 void | 315 void |
308 purple_idle_init() | 316 purple_idle_init() |
309 { | 317 { |
310 /* Add the timer to check if we're idle. | 318 /* Add the timer to check if we're idle. |
311 * IDLEMARK + 1 as the boundary, | 319 * IDLEMARK + 1 as the boundary, |
323 PURPLE_CALLBACK(signing_off_cb), NULL); | 331 PURPLE_CALLBACK(signing_off_cb), NULL); |
324 | 332 |
325 purple_prefs_connect_callback(purple_idle_get_handle(), "/purple/away/idle_reporting", | 333 purple_prefs_connect_callback(purple_idle_get_handle(), "/purple/away/idle_reporting", |
326 idle_reporting_cb, NULL); | 334 idle_reporting_cb, NULL); |
327 | 335 |
328 purple_idle_touch(); | 336 /* Initialize the idleness asynchronously so it doesn't check idleness, |
337 * and potentially try to change the status before the UI is initialized */ | |
338 g_idle_add(_do_purple_idle_touch_cb, NULL); | |
339 | |
329 } | 340 } |
330 | 341 |
331 void | 342 void |
332 purple_idle_uninit() | 343 purple_idle_uninit() |
333 { | 344 { |