pidgin: 6b5084da: Adjust some idle handling code to fix "w...
rekkanoryo at pidgin.im
rekkanoryo at pidgin.im
Tue Apr 28 11:50:46 EDT 2009
-----------------------------------------------------------------
Revision: 6b5084da4501a491dab88006847c4e99fd4ce044
Ancestor: 3a4ee0bcf0b04e522012ac6dcfc72e1c6da34032
Author: darkrain42 at pidgin.im
Date: 2009-04-28T15:47:36
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/6b5084da4501a491dab88006847c4e99fd4ce044
Modified files:
libpurple/idle.c libpurple/savedstatuses.c
ChangeLog:
Adjust some idle handling code to fix "wedging" idle reporting into never
reporting idle properly until restarting Pidgin. Fixes #2002.
-------------- next part --------------
============================================================
--- libpurple/idle.c 2c31dca88f029b503c256c5bc8bcfe4cfed35dc0
+++ libpurple/idle.c 5a4d83fa375c411204abd8aadb6763f678b74bcd
@@ -187,9 +187,8 @@ check_idleness(void)
purple_savedstatus_set_idleaway(TRUE);
no_away = FALSE;
}
- else if (!no_away && time_idle < away_seconds)
+ else if (purple_savedstatus_is_idleaway() && time_idle < away_seconds)
{
- no_away = TRUE;
purple_savedstatus_set_idleaway(FALSE);
if (time_until_next_idle_event == 0 || (away_seconds - time_idle) < time_until_next_idle_event)
time_until_next_idle_event = away_seconds - time_idle;
============================================================
--- libpurple/savedstatuses.c 5e9fc7cd5798cefbdffd0f47837d5b4dc8ab389c
+++ libpurple/savedstatuses.c ad9a58f04efd207c64052088864f87877fb19482
@@ -870,15 +870,15 @@ purple_savedstatus_set_idleaway(gboolean
/* Don't need to do anything */
return;
- /* Changing our status makes us un-idle */
- if (!idleaway)
- purple_idle_touch();
-
old = purple_savedstatus_get_current();
saved_status = idleaway ? purple_savedstatus_get_idleaway()
: purple_savedstatus_get_default();
purple_prefs_set_bool("/purple/savedstatus/isidleaway", idleaway);
+ /* Changing our status makes us un-idle */
+ if (!idleaway)
+ purple_idle_touch();
+
if (idleaway && (purple_savedstatus_get_type(old) != PURPLE_STATUS_AVAILABLE))
/* Our global status is already "away," so don't change anything */
return;
More information about the Commits
mailing list