Mercurial > pidgin.yaz
changeset 26805:5325d2185e88
Adjust some idle handling code to fix "wedging" idle reporting into never
reporting idle properly until restarting Pidgin. Fixes #2002.
committer: John Bailey <rekkanoryo@rekkanoryo.org>
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Tue, 28 Apr 2009 15:47:36 +0000 |
parents | e3a42d2e639f |
children | e07c066b3172 53b4f6ba8523 |
files | libpurple/idle.c libpurple/savedstatuses.c |
diffstat | 2 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/idle.c Tue Apr 28 13:33:02 2009 +0000 +++ b/libpurple/idle.c Tue Apr 28 15:47:36 2009 +0000 @@ -187,9 +187,8 @@ 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;
--- a/libpurple/savedstatuses.c Tue Apr 28 13:33:02 2009 +0000 +++ b/libpurple/savedstatuses.c Tue Apr 28 15:47:36 2009 +0000 @@ -870,15 +870,15 @@ /* 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;