diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-05-02 21:09:05 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-05-02 21:09:05 -0400 |
commit | a41e2b901dd19a95fa0850f6b95ed093f5788344 (patch) | |
tree | ab82e46bf6229ee525a18b85619eefd3bdeb3831 /gtk/gtkcolorbutton.c | |
parent | 70a5e66d2faf7471f39ca3ea654b610be8fa0bae (diff) | |
download | gtk+-a41e2b901dd19a95fa0850f6b95ed093f5788344.tar.gz |
Fix a thinko in the last color button change
Using the interface method in the set_property implementation
leads to an infinite recursion, if the interface method is in
turn using g_object_set.
Diffstat (limited to 'gtk/gtkcolorbutton.c')
-rw-r--r-- | gtk/gtkcolorbutton.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index 76d3f61562..776c8eab51 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -919,7 +919,7 @@ gtk_color_button_get_property (GObject *object, switch (param_id) { case PROP_USE_ALPHA: - g_value_set_boolean (value, gtk_color_chooser_get_use_alpha (GTK_COLOR_CHOOSER (button))); + g_value_set_boolean (value, button->priv->use_alpha); break; case PROP_TITLE: g_value_set_string (value, gtk_color_button_get_title (button)); @@ -939,9 +939,13 @@ gtk_color_button_get_property (GObject *object, } break; case PROP_ALPHA: -G_GNUC_BEGIN_IGNORE_DEPRECATIONS - g_value_set_uint (value, gtk_color_button_get_alpha (button)); -G_GNUC_END_IGNORE_DEPRECATIONS + { + guint16 alpha; + + alpha = (guint16) (button->priv->rgba.alpha * 65535 + 0.5); + + g_value_set_uint (value, alpha); + } break; case PROP_RGBA: { |