sleeper_state now holds string instead of 0 1 2 3
This commit is contained in:
parent
123cfb70d4
commit
f6d16b1db0
|
@ -53,8 +53,9 @@ awaiting_messages = {} # list of messages reveived but not printed
|
||||||
nicks = {} # list of our nick names in each account
|
nicks = {} # list of our nick names in each account
|
||||||
allow_notifications = {} # do we allow notifications for each account ?
|
allow_notifications = {} # do we allow notifications for each account ?
|
||||||
con_types = {} # type of each connection (ssl, tls, tcp, ...)
|
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
|
sleeper_state = {} # whether we pass auto away / xa or not
|
||||||
#1:online and use sleeper
|
#'off': don't use sleeper for this account
|
||||||
#2:autoaway and use sleeper
|
#'online': online and use sleeper
|
||||||
#3:autoxa and use sleeper
|
#'autoaway': autoaway and use sleeper
|
||||||
|
#'autoxa': autoxa and use sleeper
|
||||||
|
|
|
@ -1246,7 +1246,7 @@ _('To change the account name, you must be disconnected.')).get_response()
|
||||||
gajim.to_be_removed[name] = []
|
gajim.to_be_removed[name] = []
|
||||||
gajim.nicks[name] = config['name']
|
gajim.nicks[name] = config['name']
|
||||||
gajim.allow_notifications[name] = False
|
gajim.allow_notifications[name] = False
|
||||||
gajim.sleeper_state[name] = 0
|
gajim.sleeper_state[name] = 'off'
|
||||||
gajim.encrypted_chats[name] = []
|
gajim.encrypted_chats[name] = []
|
||||||
gajim.last_message_time[name] = {}
|
gajim.last_message_time[name] = {}
|
||||||
#refresh accounts window
|
#refresh accounts window
|
||||||
|
|
|
@ -1231,9 +1231,9 @@ _('If "%s" accepts this request you will know his status.') %jid).get_response()
|
||||||
txt)
|
txt)
|
||||||
if status == 'online' and self.plugin.sleeper.getState() != \
|
if status == 'online' and self.plugin.sleeper.getState() != \
|
||||||
common.sleepy.STATE_UNKNOWN:
|
common.sleepy.STATE_UNKNOWN:
|
||||||
gajim.sleeper_state[account] = True
|
gajim.sleeper_state[account] = 'online'
|
||||||
else:
|
else:
|
||||||
gajim.sleeper_state[account] = False
|
gajim.sleeper_state[account] = 'off'
|
||||||
|
|
||||||
def get_status_message(self, show):
|
def get_status_message(self, show):
|
||||||
if (show == 'online' and not gajim.config.get('ask_online_status')) or \
|
if (show == 'online' and not gajim.config.get('ask_online_status')) or \
|
||||||
|
|
Loading…
Reference in New Issue