From 3d50d790941e4b4c1a4878067aacea82b3d3fb7e Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 19 Jul 2006 14:53:59 +0000 Subject: [PATCH] set gc_count_nicknames_colors to 0 instead of 10 before we use it. Fix a warning --- src/groupchat_control.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 50c90f5e0..f341d217b 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -544,12 +544,14 @@ class GroupchatControl(ChatControlBase): str(gc_class.gc_custom_colors[contact])) else: gc_class.gc_count_nicknames_colors += 1 - gc_class.gc_custom_colors[contact] = gc_class.gc_count_nicknames_colors - other_tags_for_name.append('gc_nickname_color_' + \ - str(gc_class.gc_count_nicknames_colors)) - number_of_colors = len(gajim.config.get('gc_nicknames_colors').split(':')) + number_of_colors = len(gajim.config.get('gc_nicknames_colors').\ + split(':')) if gc_class.gc_count_nicknames_colors == number_of_colors: gc_class.gc_count_nicknames_colors = 0 + gc_class.gc_custom_colors[contact] = \ + gc_class.gc_count_nicknames_colors + other_tags_for_name.append('gc_nickname_color_' + \ + str(gc_class.gc_count_nicknames_colors)) if highlight: # muc-specific chatstate self.parent_win.redraw_tab(self, 'attention')