From dd35f9b58a3eac690ddb55c32ebf6bbd8eae6553 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 28 Dec 2009 23:36:15 +0100 Subject: [PATCH] don't allow to disable a connecting account. Fixes #5522 --- src/config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config.py b/src/config.py index abbbfd0eb..acaf3b4f3 100644 --- a/src/config.py +++ b/src/config.py @@ -2412,7 +2412,7 @@ class AccountsWindow: # normal account if self.ignore_events: return - if gajim.account_is_connected(self.current_account): + if gajim.connections[self.current_account].connected > 0: self.ignore_events = True self.xml.get_widget('enable_zeroconf_checkbutton2').set_active(True) self.ignore_events = False @@ -2446,7 +2446,8 @@ class AccountsWindow: def on_enable_checkbutton1_toggled(self, widget): if self.ignore_events: 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.xml.get_widget('enable_checkbutton1').set_active(True) self.ignore_events = False