Handle custom colourschemes better
This commit is contained in:
parent
4f6235bc5e
commit
a9707f4bbf
|
@ -360,8 +360,12 @@ class PrefsEditor:
|
||||||
scheme = ascheme
|
scheme = ascheme
|
||||||
break
|
break
|
||||||
if scheme not in self.colorschemevalues:
|
if scheme not in self.colorschemevalues:
|
||||||
scheme = 'grey_on_black'
|
if self.config['foreground_color'] in [None, ''] or \
|
||||||
widget.set_active(self.colorschemevalues[scheme])
|
self.config['background_color'] in [None, '']:
|
||||||
|
scheme = 'grey_on_black'
|
||||||
|
else:
|
||||||
|
scheme = 'custom'
|
||||||
|
# NOTE: The scheme is set in the GUI widget after the fore/back colours
|
||||||
# Foreground color
|
# Foreground color
|
||||||
widget = guiget('foreground_colorpicker')
|
widget = guiget('foreground_colorpicker')
|
||||||
widget.set_color(gtk.gdk.Color(self.config['foreground_color']))
|
widget.set_color(gtk.gdk.Color(self.config['foreground_color']))
|
||||||
|
@ -376,6 +380,9 @@ class PrefsEditor:
|
||||||
widget.set_sensitive(True)
|
widget.set_sensitive(True)
|
||||||
else:
|
else:
|
||||||
widget.set_sensitive(False)
|
widget.set_sensitive(False)
|
||||||
|
# Now actually set the scheme
|
||||||
|
widget = guiget('color_scheme_combobox')
|
||||||
|
widget.set_active(self.colorschemevalues[scheme])
|
||||||
# Palette scheme
|
# Palette scheme
|
||||||
widget = guiget('palette_combobox')
|
widget = guiget('palette_combobox')
|
||||||
palette = None
|
palette = None
|
||||||
|
|
Loading…
Reference in New Issue