From b9cc6e8bf09350fa12a034b76200e7918c1cfefc Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sat, 13 May 2006 04:30:47 +0000 Subject: [PATCH] 2006-05-12 Alex Roitman * src/GrampsCfg.py (add_color): Update text label after color change. svn: r6638 --- ChangeLog | 3 +++ src/GrampsCfg.py | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a421ba88c..5da281a91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2006-05-12 Alex Roitman + * src/GrampsCfg.py (add_color): Update text label after color change. + 2006-05-12 Don Allingham * src/ViewManager.py: move ScratchPad to Edit * src/GrampsCfg.py: fix color dialog buttons diff --git a/src/GrampsCfg.py b/src/GrampsCfg.py index 970965d26..d21c6c479 100644 --- a/src/GrampsCfg.py +++ b/src/GrampsCfg.py @@ -272,21 +272,22 @@ class GrampsPreferences(ManagedWindow.ManagedWindow): hexval = Config.get(constant) color = gtk.gdk.color_parse(hexval) entry = gtk.ColorButton(color=color) - entry.connect('color-set', self.update_color, constant) + color_hex_label = BasicLabel(hexval) + entry.connect('color-set',self.update_color,constant,color_hex_label) table.attach(lwidget, 0, 1, index, index+1, yoptions=0, xoptions=gtk.FILL) table.attach(entry, 1, 2, index, index+1, yoptions=0, xoptions=0) - table.attach(BasicLabel(hexval), 2, 3, index, index+1, - yoptions=0) + table.attach(color_hex_label, 2, 3, index, index+1, yoptions=0) def update_entry(self, obj, constant): Config.set(constant, unicode(obj.get_text())) - def update_color(self, obj, constant): + def update_color(self, obj, constant, color_hex_label): color = obj.get_color() hexval = "#%02x%02x%02x" % (color.red/256, color.green/256, color.blue/256) + color_hex_label.set_text(hexval) Config.set(constant, hexval) def update_checkbox(self, obj, constant):