[gimp] plug-ins: set the GimpColorConfig on all script-fu color buttons
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: set the GimpColorConfig on all script-fu color buttons
- Date: Sun, 28 May 2017 14:43:36 +0000 (UTC)
commit 6918b4b77397d3613be744e02ef332d5f0245029
Author: Michael Natterer <mitch gimp org>
Date: Sun May 28 16:43:00 2017 +0200
plug-ins: set the GimpColorConfig on all script-fu color buttons
plug-ins/script-fu/script-fu-interface.c | 33 +++++++++++++++++++----------
1 files changed, 21 insertions(+), 12 deletions(-)
---
diff --git a/plug-ins/script-fu/script-fu-interface.c b/plug-ins/script-fu/script-fu-interface.c
index 85cb31b..ca4319f 100644
--- a/plug-ins/script-fu/script-fu-interface.c
+++ b/plug-ins/script-fu/script-fu-interface.c
@@ -334,18 +334,27 @@ script_fu_interface (SFScript *script,
break;
case SF_COLOR:
- left_align = TRUE;
- widget = gimp_color_button_new (_("Script-Fu Color Selection"),
- COLOR_SAMPLE_WIDTH,
- COLOR_SAMPLE_HEIGHT,
- &arg->value.sfa_color,
- GIMP_COLOR_AREA_FLAT);
+ {
+ GimpColorConfig *config;
+
+ left_align = TRUE;
+ widget = gimp_color_button_new (_("Script-Fu Color Selection"),
+ COLOR_SAMPLE_WIDTH,
+ COLOR_SAMPLE_HEIGHT,
+ &arg->value.sfa_color,
+ GIMP_COLOR_AREA_FLAT);
- gimp_color_button_set_update (GIMP_COLOR_BUTTON (widget), TRUE);
+ gimp_color_button_set_update (GIMP_COLOR_BUTTON (widget), TRUE);
- g_signal_connect (widget, "color-changed",
- G_CALLBACK (gimp_color_button_get_color),
- &arg->value.sfa_color);
+ config = gimp_get_color_configuration ();
+ gimp_color_button_set_color_config (GIMP_COLOR_BUTTON (widget),
+ config);
+ g_object_unref (config);
+
+ g_signal_connect (widget, "color-changed",
+ G_CALLBACK (gimp_color_button_get_color),
+ &arg->value.sfa_color);
+ }
break;
case SF_TOGGLE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]