From 1b0a320d7c965358c97020ff2318030aa0a50f49 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 16 Nov 2004 14:25:28 +0000 Subject: [PATCH] BUGFIX: when no account is configured, ComboBox must stay offline --- plugins/gtkgui/gtkgui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index d4fca4441..12b374ca3 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -1420,7 +1420,9 @@ class roster_Window: def set_cb(self): #table to change index in plugin.connected to index in combobox table = {0:5, 1:0, 2:1, 3:2, 4:3, 5:4} - maxi = max(self.plugin.connected.values()) + maxi = 0 + if len(self.plugin.connected.values()): + maxi = max(self.plugin.connected.values()) #temporarily block signal in order not to send status that we show #in the combobox self.cb.handler_block(self.id_signal_cb)