Author: asterix Date: 2006-07-19 16:53:59 +0200 (Wed, 19 Jul 2006) New Revision: 6582
Modified: trunk/src/groupchat_control.py Log: set gc_count_nicknames_colors to 0 instead of 10 before we use it. Fix a warning
Modified: trunk/src/groupchat_control.py =================================================================== --- trunk/src/groupchat_control.py 2006-07-19 12:56:07 UTC (rev 6581) +++ trunk/src/groupchat_control.py 2006-07-19 14:53:59 UTC (rev 6582) @@ -544,12 +544,14 @@ 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 + 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)) - 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 if highlight: # muc-specific chatstate self.parent_win.redraw_tab(self, 'attention')