From e8a436725a178491588d5f6f9c4ac2ecafdc75f8 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 18 Oct 2004 08:37:16 +0000 Subject: [PATCH] When an account is not active, it is not touched by optionmenu changes, but can be specifically changed. --- core/core.py | 6 +----- plugins/gtkgui/gtkgui.py | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/core/core.py b/core/core.py index ff9375dbf..f59b4bcad 100644 --- a/core/core.py +++ b/core/core.py @@ -656,7 +656,6 @@ class GajimCore: #TODO: tell the changes to other plugins #('STATUS', account, (status, msg)) elif ev[0] == 'STATUS': - activ = 1 msg = ev[2][1] if not msg: msg = ev[2][0] @@ -670,10 +669,7 @@ class GajimCore: signed = '' if self.connected[ev[1]] == 0: self.hub.sendPlugin('BAD_PASSPHRASE', ev[1], ()) - if self.cfgParser.tab[ev[1]].has_key('active'): - activ = self.cfgParser.tab[ev[1]]['active'] - if (ev[2][0] != 'offline') and (self.connected[ev[1]] == 0) and \ - activ: + if (ev[2][0] != 'offline') and (self.connected[ev[1]] == 0): con = self.connect(ev[1]) if self.connected[ev[1]]: statuss = ['offline', 'online', 'away', 'xa', 'dnd', \ diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index c1839f82f..4369ac338 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -1345,9 +1345,6 @@ class roster_Window: del self.contacts[account][u.jid] def send_status(self, account, status, txt): - if self.plugin.accounts[account].has_key('active'): - if not self.plugin.accounts[account]['active']: - return if status != 'offline': keyid = None save_gpg_pass = 0 @@ -1400,6 +1397,9 @@ class roster_Window: warning_Window(_("You must setup an account before connecting to jabber network.")) return for acct in accounts: + if self.plugin.accounts[acct].has_key('active'): + if not self.plugin.accounts[acct]['active']: + continue self.send_status(acct, status, txt) def set_optionmenu(self):