[gtk+/gtk-3-18] GtkColorChooser: make set_rgba work in editor mode
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-18] GtkColorChooser: make set_rgba work in editor mode
- Date: Thu, 28 Jan 2016 03:31:03 +0000 (UTC)
commit b8b61514a0a8cb076a64e85c33f1989fb0d46dae
Author: Sebastien Lafargue <slafargue gnome org>
Date: Fri Jan 22 22:25:29 2016 +0100
GtkColorChooser: make set_rgba work in editor mode
When using the color chooser in editor mode,
gtk_color_chooser_set_rgba need to be propaged
to the editor
https://bugzilla.gnome.org/show_bug.cgi?id=761005
gtk/gtkcolorchooserwidget.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcolorchooserwidget.c b/gtk/gtkcolorchooserwidget.c
index 8677da4..2da0f6c 100644
--- a/gtk/gtkcolorchooserwidget.c
+++ b/gtk/gtkcolorchooserwidget.c
@@ -111,10 +111,14 @@ select_swatch (GtkColorChooserWidget *cc,
gtk_widget_queue_draw (GTK_WIDGET (cc->priv->current));
gtk_color_swatch_get_rgba (swatch, &color);
+
g_settings_set (cc->priv->settings, "selected-color", "(bdddd)",
TRUE, color.red, color.green, color.blue, color.alpha);
- g_object_notify (G_OBJECT (cc), "rgba");
+ if (gtk_widget_get_visible (GTK_WIDGET (cc->priv->editor)))
+ gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (cc->priv->editor), &color);
+ else
+ g_object_notify (G_OBJECT (cc), "rgba");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]