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
This commit is contained in:
Sebastien Lafargue 2016-01-22 22:25:29 +01:00 committed by Matthias Clasen
parent 5febf4f170
commit 526fd89ec5

View File

@ -115,9 +115,13 @@ 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);
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");
}