After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676198 - current color of a GtkColorButton should be set to the GtkColorChooserDialog
current color of a GtkColorButton should be set to the GtkColorChooserDialog
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 683323 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-05-17 00:03 UTC by Hiroyuki Ito
Modified: 2012-10-07 19:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Hiroyuki Ito 2012-05-17 00:03:43 UTC
I think current color of a GtkColorButton should be selected in the GtkColoroChooserDialog which is shown when the color button is clicked.

Following patch improve the behavior.

diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c
index 7ad5cd5..894ccdc 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -618,6 +618,8 @@ 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));
 }
Comment 1 Matthias Clasen 2012-05-17 03:53:08 UTC
Thanks, committed
Comment 2 Christian Persch 2012-10-07 19:18:17 UTC
*** Bug 683323 has been marked as a duplicate of this bug. ***