Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.1, 1.1.1, and 1.1.2

gtklib: be better backward compatible

Now works with Ubuntu Jaunty again

Changeset 89246dc07d5a

Parent 01f0874149e0

by Henrik Stuart

Changes to one file · Browse files at 89246dc07d5a Showing diff from parent 01f0874149e0 Diff from another changeset...

 
101
102
103
104
105
106
 
 
 
107
108
109
110
 
111
112
113
 
877
878
879
880
 
881
882
 
883
884
885
886
887
888
 
889
890
891
892
893
894
895
896
897
 
101
102
103
 
 
 
104
105
106
107
108
109
 
110
111
112
113
 
877
878
879
 
880
881
 
882
883
884
885
886
887
 
888
889
890
891
892
 
 
893
894
895
@@ -101,13 +101,13 @@
  else:   NORMAL = str(normal)   MAINLINE_COLOR = ( - normal.red_float, - normal.green_float, - normal.blue_float + normal.red / 65535.0, + normal.green / 65535.0, + normal.blue / 65535.0   )     # adjust colors for a dark color scheme: - if normal.value > 0.5: + if hasattr(normal, 'value') and normal.value > 0.5 or max(MAINLINE_COLOR) > 0.5:   global RED, GREEN, BLUE, BLACK, WHITE, \   DRED, DGREEN, DBLUE, DYELLOW, DORANGE, \   PRED, PGREEN, PBLUE, PYELLOW, PORANGE, \ @@ -877,21 +877,19 @@
  label = label.replace('_', '__')   if kargs.get('asradio') or kargs.get('ascheck'):   if kargs.get('asradio'): - menu = gtk.RadioMenuItem(kargs.get('group'), label) + menu = gtk.RadioMenuItem(kargs.get('group'), label, use_underline=use_underline)   else: - menu = gtk.CheckMenuItem(label) + menu = gtk.CheckMenuItem(label, use_underline=use_underline)   menu.set_active(kargs.get('check', False))   elif icon:   menu = gtk.ImageMenuItem(label)   menu.set_image(get_icon_image(icon))   else: - menu = gtk.MenuItem(label) + menu = gtk.MenuItem(label, use_underline=use_underline)   if handler:   args = kargs.get('args', [])   menu.connect('activate', handler, *args)   menu.set_sensitive(kargs.get('sensitive', True)) - if gtk.gtk_version >= (2, 14, 0): - menu.set_use_underline(use_underline)   menu.set_border_width(1)   return menu