sleeper_state now holds string instead of 0 1 2 3

This commit is contained in:
Nikos Kouremenos 2005-07-21 23:47:27 +00:00
parent 123cfb70d4
commit f6d16b1db0
3 changed files with 9 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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 \