From 60afd09e0e108b963a19e2b7bc2909ff0bcf21f8 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 9 Nov 2004 20:33:40 +0000 Subject: [PATCH] don't ask status message if no account configured and let combobox to offline --- plugins/gtkgui/gtkgui.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index 06b796c8c..361df0838 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -1397,6 +1397,11 @@ class roster_Window: active = self.cb.get_active() if active < 0: return + accounts = self.plugin.accounts.keys() + if len(accounts) == 0: + warning_Window(_("You must setup an account before connecting to jabber network.")) + self.set_cb() + return status = model[active][0] if status != 'online' and status != 'offline': w = awayMsg_Window(self.plugin) @@ -1406,10 +1411,6 @@ class roster_Window: return else: txt = status - accounts = self.plugin.accounts.keys() - if len(accounts) == 0: - 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']: