Show
Ignore:
Timestamp:
08/30/07 01:15:06 (15 months ago)
Author:
roidelapluie
Message:

Use another function to get color string. Fix #2906.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/gajim_0.11.1/src/gtkgui_helpers.py

    r7940 r8615  
    530530        '''create #aabbcc color string from gtk color''' 
    531531        col = '#' 
    532         for i in (color.red, color.green, color.blue): 
    533                 # GTK sometime return a value > 256 
    534                 h = hex(i%256)[2:4] 
     532        for i in ('red', 'green', 'blue'): 
     533                h = hex(getattr(color, i) / (16*16)).split('x')[1] 
    535534                if len(h) == 1: 
    536535                        h = '0' + h