Some users don't want their status to be restored. Make it an option.

This commit is contained in:
js 2008-07-28 16:36:17 +00:00
parent 01dc17d825
commit dc8b56c9ed
2 changed files with 11 additions and 6 deletions

View File

@ -274,6 +274,7 @@ class Config:
'autopriority_dnd': [ opt_int, 20],
'autopriority_invisible': [ opt_int, 10],
'autoconnect': [ opt_bool, False, '', True ],
'dont_restore_last_status': [ opt_bool, False, _('If enabled, don\'t restore the last status that was used.') ],
'autoreconnect': [ opt_bool, True ],
'active': [ opt_bool, True],
'proxy': [ opt_str, '', '', True ],

View File

@ -2777,12 +2777,16 @@ class Interface:
# dict of account that want to connect sorted by status
for a in gajim.connections:
if gajim.config.get_per('accounts', a, 'autoconnect'):
self.roster.send_status(a,
gajim.config.get_per('accounts', a,
'last_status'),
helpers.from_one_line(
gajim.config.get_per('accounts', a,
'last_status_msg')))
if not gajim.config.get_per('accounts', a,
'dont_restore_last_status'):
self.roster.send_status(a,
gajim.config.get_per('accounts',
a, 'last_status'),
helpers.from_one_line(
gajim.config.get_per('accounts',
a, 'last_status_msg')))
else:
self.roster.send_status(a, 'online', '')
return False
def show_systray(self):