diff --git a/src/common/gajim.py b/src/common/gajim.py index ea8f4b081..166201506 100644 --- a/src/common/gajim.py +++ b/src/common/gajim.py @@ -53,8 +53,9 @@ awaiting_messages = {} # list of messages reveived but not printed nicks = {} # list of our nick names in each account allow_notifications = {} # do we allow notifications for each account ? con_types = {} # type of each connection (ssl, tls, tcp, ...) -sleeper_state = {} #whether we pass auto away / xa or not -#0:don't use sleeper for this account -#1:online and use sleeper -#2:autoaway and use sleeper -#3:autoxa and use sleeper + +sleeper_state = {} # whether we pass auto away / xa or not +#'off': don't use sleeper for this account +#'online': online and use sleeper +#'autoaway': autoaway and use sleeper +#'autoxa': autoxa and use sleeper diff --git a/src/config.py b/src/config.py index 2f757d48a..8611be6f0 100644 --- a/src/config.py +++ b/src/config.py @@ -1246,7 +1246,7 @@ _('To change the account name, you must be disconnected.')).get_response() gajim.to_be_removed[name] = [] gajim.nicks[name] = config['name'] gajim.allow_notifications[name] = False - gajim.sleeper_state[name] = 0 + gajim.sleeper_state[name] = 'off' gajim.encrypted_chats[name] = [] gajim.last_message_time[name] = {} #refresh accounts window diff --git a/src/roster_window.py b/src/roster_window.py index 46142a696..796ff9c78 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1231,9 +1231,9 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response() txt) if status == 'online' and self.plugin.sleeper.getState() != \ common.sleepy.STATE_UNKNOWN: - gajim.sleeper_state[account] = True + gajim.sleeper_state[account] = 'online' else: - gajim.sleeper_state[account] = False + gajim.sleeper_state[account] = 'off' def get_status_message(self, show): if (show == 'online' and not gajim.config.get('ask_online_status')) or \