From 70282f0bd5538715daeda1303368ebec6ad869af Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 20 Apr 2006 21:53:41 +0000 Subject: [PATCH] set sleeper_state to off when we manualy go away so that we desactivate auto away --- src/gajim.py | 2 +- src/roster_window.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gajim.py b/src/gajim.py index 3e4936a9a..0859edce9 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -1316,7 +1316,7 @@ class Interface: if gajim.interface.sleeper.getState() != common.sleepy.STATE_UNKNOWN: gajim.sleeper_state[account] = 'online' else: - gajim.sleeper_state[account] = 0 + gajim.sleeper_state[account] = 'off' invisible_show = gajim.SHOW_LIST.index('invisible') # We cannot join rooms if we are invisible if gajim.connections[account].connected == invisible_show: diff --git a/src/roster_window.py b/src/roster_window.py index aaf4b30fe..23b4bbaca 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1930,6 +1930,12 @@ _('If "%s" accepts this request you will know his or her status.') % jid) gajim.connections[account].send_gc_status(gc_control.nick, gc_control.room_jid, status, txt) gajim.connections[account].change_status(status, txt, sync, auto) + if gajim.connections[account].connected > 1: + if status == 'online' and gajim.interface.sleeper.getState() != \ + common.sleepy.STATE_UNKNOWN: + gajim.sleeper_state[account] = 'online' + else: + gajim.sleeper_state[account] = 'off' def get_status_message(self, show): if (show == 'online' and not gajim.config.get('ask_online_status')) or \