[gimp] app: remove the colorize tool and replace it by a generic filter action



commit ecfec4103be4ae34ccd577bc8d6e6b6075b3d157
Author: Michael Natterer <mitch gimp org>
Date:   Sun Jun 4 21:16:58 2017 +0200

    app: remove the colorize tool and replace it by a generic filter action

 app/actions/filters-actions.c          |    6 +
 app/operations/gimpcolorizeconfig.c    |    4 +-
 app/operations/gimpoperationcolorize.c |    4 +-
 app/tools/Makefile.am                  |    2 -
 app/tools/gimp-tools.c                 |    2 -
 app/tools/gimpcolorizetool.c           |  234 --------------------------------
 app/tools/gimpcolorizetool.h           |   53 -------
 menus/image-menu.xml.in                |    3 +-
 po/POTFILES.in                         |    2 +-
 9 files changed, 13 insertions(+), 297 deletions(-)
---
diff --git a/app/actions/filters-actions.c b/app/actions/filters-actions.c
index cf2a893..b88c3d0 100644
--- a/app/actions/filters-actions.c
+++ b/app/actions/filters-actions.c
@@ -213,6 +213,11 @@ static const GimpStringActionEntry filters_interactive_actions[] =
     "gegl:color-exchange",
     GIMP_HELP_FILTER_COLOR_EXCHANGE },
 
+  { "filters-colorize", GIMP_ICON_TOOL_COLORIZE,
+    NC_("filters-action", "Colori_ze..."), NULL, NULL,
+    "gimp:colorize",
+    GIMP_HELP_TOOL_COLORIZE },
+
   { "filters-dither", GIMP_ICON_GEGL,
     NC_("filters-action", "Dithe_r..."), NULL, NULL,
     "gegl:dither",
@@ -785,6 +790,7 @@ filters_actions_update (GimpActionGroup *group,
   SET_SENSITIVE ("filters-checkerboard",            writable);
   SET_SENSITIVE ("filters-color-enhance",           writable && !gray);
   SET_SENSITIVE ("filters-color-exchange",          writable);
+  SET_SENSITIVE ("filters-colorize",                writable && !gray);
   SET_SENSITIVE ("filters-dither",                  writable);
   SET_SENSITIVE ("filters-color-rotate",            writable);
   SET_SENSITIVE ("filters-color-temperature",       writable && !gray);
diff --git a/app/operations/gimpcolorizeconfig.c b/app/operations/gimpcolorizeconfig.c
index f34ccce..24ea84b 100644
--- a/app/operations/gimpcolorizeconfig.c
+++ b/app/operations/gimpcolorizeconfig.c
@@ -104,8 +104,8 @@ gimp_colorize_config_class_init (GimpColorizeConfigClass *klass)
 
   g_object_class_install_property (object_class, PROP_COLOR,
                                    gimp_param_spec_rgb ("color",
-                                                        "Color",
-                                                        "The color",
+                                                        _("Color"),
+                                                        _("Color"),
                                                         FALSE, &rgb,
                                                         G_PARAM_READWRITE));
 }
diff --git a/app/operations/gimpoperationcolorize.c b/app/operations/gimpoperationcolorize.c
index 8640d53..0612aa3 100644
--- a/app/operations/gimpoperationcolorize.c
+++ b/app/operations/gimpoperationcolorize.c
@@ -31,6 +31,8 @@
 #include "gimpcolorizeconfig.h"
 #include "gimpoperationcolorize.h"
 
+#include "gimp-intl.h"
+
 
 static gboolean gimp_operation_colorize_process (GeglOperation       *operation,
                                                  void                *in_buf,
@@ -59,7 +61,7 @@ gimp_operation_colorize_class_init (GimpOperationColorizeClass *klass)
   gegl_operation_class_set_keys (operation_class,
                                  "name",        "gimp:colorize",
                                  "categories",  "color",
-                                 "description", "GIMP Colorize operation",
+                                 "description", _("Colorize the image"),
                                  NULL);
 
   point_class->process = gimp_operation_colorize_process;
diff --git a/app/tools/Makefile.am b/app/tools/Makefile.am
index 6f9b7c5..46441fb 100644
--- a/app/tools/Makefile.am
+++ b/app/tools/Makefile.am
@@ -54,8 +54,6 @@ libapptools_a_sources = \
        gimpcolortool.h                 \
        gimpcolorbalancetool.c          \
        gimpcolorbalancetool.h          \
-       gimpcolorizetool.c              \
-       gimpcolorizetool.h              \
        gimpcolorpickeroptions.c        \
        gimpcolorpickeroptions.h        \
        gimpcolorpickertool.c           \
diff --git a/app/tools/gimp-tools.c b/app/tools/gimp-tools.c
index 74e1abe..69ee5ba 100644
--- a/app/tools/gimp-tools.c
+++ b/app/tools/gimp-tools.c
@@ -47,7 +47,6 @@
 #include "gimpcagetool.h"
 #include "gimpclonetool.h"
 #include "gimpcolorbalancetool.h"
-#include "gimpcolorizetool.h"
 #include "gimpcolorpickertool.h"
 #include "gimpconvolvetool.h"
 #include "gimpcroptool.h"
@@ -179,7 +178,6 @@ gimp_tools_init (Gimp *gimp)
 
     gimp_color_balance_tool_register,
     gimp_hue_saturation_tool_register,
-    gimp_colorize_tool_register,
     gimp_brightness_contrast_tool_register,
     gimp_threshold_tool_register,
     gimp_levels_tool_register,
diff --git a/menus/image-menu.xml.in b/menus/image-menu.xml.in
index d921ff4..66a8c62 100644
--- a/menus/image-menu.xml.in
+++ b/menus/image-menu.xml.in
@@ -610,7 +610,7 @@
       </menu>
       <separator />
       <menuitem action="tools-threshold" />
-      <menuitem action="tools-colorize" />
+      <menuitem action="filters-colorize" />
       <menuitem action="filters-posterize" />
       <menuitem action="filters-color-to-alpha" />
       <menuitem action="filters-dither" />
@@ -666,7 +666,6 @@
       <menu action="tools-color-menu" name="Color Tools">
         <menuitem action="tools-color-balance" />
         <menuitem action="tools-hue-saturation" />
-        <menuitem action="tools-colorize" />
         <menuitem action="tools-brightness-contrast" />
         <menuitem action="tools-threshold" />
         <menuitem action="tools-levels" />
diff --git a/po/POTFILES.in b/po/POTFILES.in
index fc9d1c9..49d9d59 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -271,6 +271,7 @@ app/operations/gimphuesaturationconfig.c
 app/operations/gimplevelsconfig.c
 app/operations/gimpoperationcagecoefcalc.c
 app/operations/gimpoperationcagetransform.c
+app/operations/gimpoperationcolorize.c
 app/operations/gimpoperationdesaturate.c
 app/operations/gimpoperationposterize.c
 app/operations/gimpoperationsemiflatten.c
@@ -381,7 +382,6 @@ app/tools/gimpcagetool.c
 app/tools/gimpcloneoptions-gui.c
 app/tools/gimpclonetool.c
 app/tools/gimpcolorbalancetool.c
-app/tools/gimpcolorizetool.c
 app/tools/gimpcoloroptions.c
 app/tools/gimpcolorpickeroptions.c
 app/tools/gimpcolorpickertool.c


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