From 276dae8ae6a024259b32fc28bf72e9dbb08fe963 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ito Date: Wed, 16 May 2012 23:45:48 -0400 Subject: [PATCH] Improve GtkColorButton behaviour Select the current color of a GtkColorButton should be selected in the GtkColoroChooserDialog which is shown when the color button is clicked. https://bugzilla.gnome.org/show_bug.cgi?id=676198 --- gtk/gtkcolorbutton.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c index 7ad5cd5ea1..c9056b5d02 100644 --- a/gtk/gtkcolorbutton.c +++ b/gtk/gtkcolorbutton.c @@ -619,6 +619,9 @@ gtk_color_button_clicked (GtkButton *b) gtk_color_chooser_set_use_alpha (GTK_COLOR_CHOOSER (button->priv->cs_dialog), button->priv->use_alpha); + gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (button->priv->cs_dialog), + &button->priv->rgba); + gtk_window_present (GTK_WINDOW (button->priv->cs_dialog)); }