From d42bba202b118b2e0544097a9611f9769588a77a Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 20 Apr 2006 17:06:05 +0000 Subject: [PATCH] idle autostatus is activated only when we sign in. Fixes #1874 --- src/gajim.py | 4 ++++ src/roster_window.py | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index 5c87a1ef8..aa8986391 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -1313,6 +1313,10 @@ class Interface: def handle_event_signed_in(self, account, empty): '''SIGNED_IN event is emitted when we sign in, so handle it''' self.roster.actions_menu_needs_rebuild = True + if gajim.interface.sleeper.getState() != common.sleepy.STATE_UNKNOWN: + gajim.sleeper_state[account] = 'online' + else: + gajim.sleeper_state[account] = 0 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 0cc30209b..a05216521 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1930,11 +1930,6 @@ _('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 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 \