[gimp] app: small code reorganization in the curves tool



commit 14bcde2c73cb82f3eb3f9a503e9f69763a520fcb
Author: Ell <ell_se yahoo com>
Date:   Wed May 31 08:40:59 2017 -0400

    app: small code reorganization in the curves tool
    
    Move gimp_curves_tool_color_picked() to match its prototype's
    position, per commit f876f3b5f4949ed326ed0fb8b88dba24c953d4c9.

 app/tools/gimpcurvestool.c |   60 ++++++++++++++++++++++----------------------
 1 files changed, 30 insertions(+), 30 deletions(-)
---
diff --git a/app/tools/gimpcurvestool.c b/app/tools/gimpcurvestool.c
index 03b95f9..ef5e57d 100644
--- a/app/tools/gimpcurvestool.c
+++ b/app/tools/gimpcurvestool.c
@@ -362,36 +362,6 @@ gimp_curves_tool_oper_update (GimpTool         *tool,
     }
 }
 
-static void
-gimp_curves_tool_color_picked (GimpFilterTool *filter_tool,
-                               gpointer        identifier,
-                               gdouble         x,
-                               gdouble         y,
-                               const Babl     *sample_format,
-                               const GimpRGB  *color)
-{
-  GimpCurvesTool   *tool        = GIMP_CURVES_TOOL (filter_tool);
-  GimpCurvesConfig *config      = GIMP_CURVES_CONFIG (filter_tool->config);
-  GimpDrawable     *drawable;
-
-  drawable = GIMP_FILTER_TOOL (tool)->drawable;
-
-  tool->picked_color[GIMP_HISTOGRAM_RED]   = color->r;
-  tool->picked_color[GIMP_HISTOGRAM_GREEN] = color->g;
-  tool->picked_color[GIMP_HISTOGRAM_BLUE]  = color->b;
-
-  if (gimp_drawable_has_alpha (drawable))
-    tool->picked_color[GIMP_HISTOGRAM_ALPHA] = color->a;
-  else
-    tool->picked_color[GIMP_HISTOGRAM_ALPHA] = -1;
-
-  tool->picked_color[GIMP_HISTOGRAM_VALUE] = MAX (MAX (color->r, color->g),
-                                                  color->b);
-
-  gimp_curve_view_set_xpos (GIMP_CURVE_VIEW (tool->graph),
-                            tool->picked_color[config->channel]);
-}
-
 static gchar *
 gimp_curves_tool_get_operation (GimpFilterTool  *filter_tool,
                                 gchar          **title,
@@ -677,6 +647,36 @@ gimp_curves_tool_settings_export (GimpFilterTool  *filter_tool,
 }
 
 static void
+gimp_curves_tool_color_picked (GimpFilterTool *filter_tool,
+                               gpointer        identifier,
+                               gdouble         x,
+                               gdouble         y,
+                               const Babl     *sample_format,
+                               const GimpRGB  *color)
+{
+  GimpCurvesTool   *tool   = GIMP_CURVES_TOOL (filter_tool);
+  GimpCurvesConfig *config = GIMP_CURVES_CONFIG (filter_tool->config);
+  GimpDrawable     *drawable;
+
+  drawable = GIMP_FILTER_TOOL (tool)->drawable;
+
+  tool->picked_color[GIMP_HISTOGRAM_RED]   = color->r;
+  tool->picked_color[GIMP_HISTOGRAM_GREEN] = color->g;
+  tool->picked_color[GIMP_HISTOGRAM_BLUE]  = color->b;
+
+  if (gimp_drawable_has_alpha (drawable))
+    tool->picked_color[GIMP_HISTOGRAM_ALPHA] = color->a;
+  else
+    tool->picked_color[GIMP_HISTOGRAM_ALPHA] = -1;
+
+  tool->picked_color[GIMP_HISTOGRAM_VALUE] = MAX (MAX (color->r, color->g),
+                                                  color->b);
+
+  gimp_curve_view_set_xpos (GIMP_CURVE_VIEW (tool->graph),
+                            tool->picked_color[config->channel]);
+}
+
+static void
 gimp_curves_tool_export_setup (GimpSettingsBox      *settings_box,
                                GtkFileChooserDialog *dialog,
                                gboolean              export,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]