get and set palette values
This commit is contained in:
parent
0e01618dfa
commit
8c7218121f
|
@ -349,7 +349,11 @@ class PrefsEditor:
|
||||||
widget.set_sensitive(True)
|
widget.set_sensitive(True)
|
||||||
else:
|
else:
|
||||||
widget.set_sensitive(False)
|
widget.set_sensitive(False)
|
||||||
# FIXME: Do the Palette schemes and pickers
|
# Palette
|
||||||
|
palette = self.config['palette'].split(':')
|
||||||
|
for i in xrange(1,17):
|
||||||
|
widget = guiget('palette-colorpicker-%d' % i)
|
||||||
|
widget.set_color(gtk.gdk.Color(palette[i - 1]))
|
||||||
|
|
||||||
## Background tab
|
## Background tab
|
||||||
# Radio values
|
# Radio values
|
||||||
|
@ -503,7 +507,12 @@ class PrefsEditor:
|
||||||
# Background colour
|
# Background colour
|
||||||
widget = guiget('background-colorpicker')
|
widget = guiget('background-colorpicker')
|
||||||
self.config['background_color'] = widget.get_color().to_string()
|
self.config['background_color'] = widget.get_color().to_string()
|
||||||
# FIXME: Do the palette schemes and palette
|
# Palette
|
||||||
|
palette = []
|
||||||
|
for i in xrange(1,17):
|
||||||
|
widget = guiget('palette-colorpicker-%d' % i)
|
||||||
|
palette.append(widget.get_color().to_string())
|
||||||
|
self.config['palette'] = ':'.join(palette)
|
||||||
|
|
||||||
## Background tab
|
## Background tab
|
||||||
# Background type
|
# Background type
|
||||||
|
|
Loading…
Reference in New Issue