Some users don't want their status to be restored. Make it an option.
This commit is contained in:
parent
01dc17d825
commit
dc8b56c9ed
|
@ -274,6 +274,7 @@ class Config:
|
||||||
'autopriority_dnd': [ opt_int, 20],
|
'autopriority_dnd': [ opt_int, 20],
|
||||||
'autopriority_invisible': [ opt_int, 10],
|
'autopriority_invisible': [ opt_int, 10],
|
||||||
'autoconnect': [ opt_bool, False, '', True ],
|
'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 ],
|
'autoreconnect': [ opt_bool, True ],
|
||||||
'active': [ opt_bool, True],
|
'active': [ opt_bool, True],
|
||||||
'proxy': [ opt_str, '', '', True ],
|
'proxy': [ opt_str, '', '', True ],
|
||||||
|
|
16
src/gajim.py
16
src/gajim.py
|
@ -2777,12 +2777,16 @@ class Interface:
|
||||||
# dict of account that want to connect sorted by status
|
# dict of account that want to connect sorted by status
|
||||||
for a in gajim.connections:
|
for a in gajim.connections:
|
||||||
if gajim.config.get_per('accounts', a, 'autoconnect'):
|
if gajim.config.get_per('accounts', a, 'autoconnect'):
|
||||||
self.roster.send_status(a,
|
if not gajim.config.get_per('accounts', a,
|
||||||
gajim.config.get_per('accounts', a,
|
'dont_restore_last_status'):
|
||||||
'last_status'),
|
self.roster.send_status(a,
|
||||||
helpers.from_one_line(
|
gajim.config.get_per('accounts',
|
||||||
gajim.config.get_per('accounts', a,
|
a, 'last_status'),
|
||||||
'last_status_msg')))
|
helpers.from_one_line(
|
||||||
|
gajim.config.get_per('accounts',
|
||||||
|
a, 'last_status_msg')))
|
||||||
|
else:
|
||||||
|
self.roster.send_status(a, 'online', '')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def show_systray(self):
|
def show_systray(self):
|
||||||
|
|
Loading…
Reference in New Issue