don't allow to disable a connecting account. Fixes #5522
This commit is contained in:
parent
1de511c0fd
commit
dd35f9b58a
|
@ -2412,7 +2412,7 @@ class AccountsWindow:
|
||||||
# normal account
|
# normal account
|
||||||
if self.ignore_events:
|
if self.ignore_events:
|
||||||
return
|
return
|
||||||
if gajim.account_is_connected(self.current_account):
|
if gajim.connections[self.current_account].connected > 0:
|
||||||
self.ignore_events = True
|
self.ignore_events = True
|
||||||
self.xml.get_widget('enable_zeroconf_checkbutton2').set_active(True)
|
self.xml.get_widget('enable_zeroconf_checkbutton2').set_active(True)
|
||||||
self.ignore_events = False
|
self.ignore_events = False
|
||||||
|
@ -2446,7 +2446,8 @@ class AccountsWindow:
|
||||||
def on_enable_checkbutton1_toggled(self, widget):
|
def on_enable_checkbutton1_toggled(self, widget):
|
||||||
if self.ignore_events:
|
if self.ignore_events:
|
||||||
return
|
return
|
||||||
if gajim.account_is_connected(self.current_account):
|
if gajim.connections[self.current_account].connected > 0:
|
||||||
|
# connecting or connected
|
||||||
self.ignore_events = True
|
self.ignore_events = True
|
||||||
self.xml.get_widget('enable_checkbutton1').set_active(True)
|
self.xml.get_widget('enable_checkbutton1').set_active(True)
|
||||||
self.ignore_events = False
|
self.ignore_events = False
|
||||||
|
|
Loading…
Reference in New Issue