[gimp] app: rename GimpImageMapTool to GimpFilterTool



commit 6a9ce551cbc4c25a852f863908eea348f93c1cf7
Author: Michael Natterer <mitch gimp org>
Date:   Tue May 10 00:08:36 2016 +0200

    app: rename GimpImageMapTool to GimpFilterTool

 app/actions/gimpgeglprocedure.c                    |    2 +-
 app/actions/tools-commands.c                       |    2 +-
 app/tools/Makefile.am                              |   12 +-
 app/tools/gimp-tools.c                             |    2 +-
 app/tools/gimpbrightnesscontrasttool.c             |   78 +-
 app/tools/gimpbrightnesscontrasttool.h             |   14 +-
 app/tools/gimpcolorbalancetool.c                   |   92 +-
 app/tools/gimpcolorbalancetool.h                   |    6 +-
 app/tools/gimpcolorizetool.c                       |  106 +-
 app/tools/gimpcolorizetool.h                       |    6 +-
 app/tools/gimpcoloroptions.c                       |    2 +-
 app/tools/gimpcoloroptions.h                       |   17 +-
 app/tools/gimpcurvestool.c                         |  272 ++--
 app/tools/gimpcurvestool.h                         |    6 +-
 .../{gimpimagemapoptions.c => gimpfilteroptions.c} |   58 +-
 .../{gimpimagemapoptions.h => gimpfilteroptions.h} |   24 +-
 ...aptool-settings.c => gimpfiltertool-settings.c} |  132 +-
 app/tools/gimpfiltertool-settings.h                |   40 +
 app/tools/gimpfiltertool.c                         | 1473 ++++++++++++++++++++
 app/tools/{gimpimagemaptool.h => gimpfiltertool.h} |   66 +-
 app/tools/gimpgegltool.c                           |   20 +-
 app/tools/gimphuesaturationtool.c                  |  120 +-
 app/tools/gimphuesaturationtool.h                  |   10 +-
 app/tools/gimpimagemaptool-settings.h              |   40 -
 app/tools/gimpimagemaptool.c                       | 1471 -------------------
 app/tools/gimplevelstool.c                         |  262 ++--
 app/tools/gimplevelstool.h                         |   34 +-
 app/tools/gimpoperationtool.c                      |  198 ++--
 app/tools/gimpoperationtool.h                      |   24 +-
 app/tools/gimpthresholdtool.c                      |   72 +-
 app/tools/gimpthresholdtool.h                      |    6 +-
 app/tools/tools-types.h                            |    4 +-
 po/POTFILES.in                                     |    6 +-
 33 files changed, 2342 insertions(+), 2335 deletions(-)
---
diff --git a/app/actions/gimpgeglprocedure.c b/app/actions/gimpgeglprocedure.c
index 6120074..7440443 100644
--- a/app/actions/gimpgeglprocedure.c
+++ b/app/actions/gimpgeglprocedure.c
@@ -338,7 +338,7 @@ gimp_gegl_procedure_execute_async (GimpProcedure  *procedure,
 
       if (settings)
         {
-          GObject *tool_config = GIMP_IMAGE_MAP_TOOL (active_tool)->config;
+          GObject *tool_config = GIMP_FILTER_TOOL (active_tool)->config;
 
           gimp_config_copy (GIMP_CONFIG (settings),
                             GIMP_CONFIG (tool_config), 0);
diff --git a/app/actions/tools-commands.c b/app/actions/tools-commands.c
index 7e32704..bb327dc 100644
--- a/app/actions/tools-commands.c
+++ b/app/actions/tools-commands.c
@@ -44,7 +44,7 @@
 #include "tools/gimpcoloroptions.h"
 #include "tools/gimpforegroundselectoptions.h"
 #include "tools/gimprectangleoptions.h"
-#include "tools/gimpimagemaptool.h"
+#include "tools/gimptool.h"
 #include "tools/gimptoolcontrol.h"
 #include "tools/gimptransformoptions.h"
 #include "tools/gimpwarpoptions.h"
diff --git a/app/tools/Makefile.am b/app/tools/Makefile.am
index 3e1111d..44db6dc 100644
--- a/app/tools/Makefile.am
+++ b/app/tools/Makefile.am
@@ -78,6 +78,12 @@ libapptools_a_sources = \
        gimpellipseselecttool.h         \
        gimperasertool.c                \
        gimperasertool.h                \
+       gimpfilteroptions.c             \
+       gimpfilteroptions.h             \
+       gimpfiltertool.c                \
+       gimpfiltertool.h                \
+       gimpfiltertool-settings.c       \
+       gimpfiltertool-settings.h       \
        gimpflipoptions.c               \
        gimpflipoptions.h               \
        gimpfliptool.c                  \
@@ -106,12 +112,6 @@ libapptools_a_sources = \
        gimphistogramoptions.h          \
        gimphuesaturationtool.c         \
        gimphuesaturationtool.h         \
-       gimpimagemapoptions.c           \
-       gimpimagemapoptions.h           \
-       gimpimagemaptool.c              \
-       gimpimagemaptool.h              \
-       gimpimagemaptool-settings.c     \
-       gimpimagemaptool-settings.h     \
        gimpinkoptions-gui.c            \
        gimpinkoptions-gui.h            \
        gimpinktool.c                   \
diff --git a/app/tools/gimp-tools.c b/app/tools/gimp-tools.c
index 7b40bf8..8649c75 100644
--- a/app/tools/gimp-tools.c
+++ b/app/tools/gimp-tools.c
@@ -565,7 +565,7 @@ gimp_tools_register (GType                   tool_type,
                                   paint_core_name,
                                   icon_name);
 
-  visible = (! g_type_is_a (tool_type, GIMP_TYPE_IMAGE_MAP_TOOL));
+  visible = (! g_type_is_a (tool_type, GIMP_TYPE_FILTER_TOOL));
 
   g_object_set (tool_info, "visible", visible, NULL);
   g_object_set_data (G_OBJECT (tool_info), "gimp-tool-default-visible",
diff --git a/app/tools/gimpbrightnesscontrasttool.c b/app/tools/gimpbrightnesscontrasttool.c
index 9792744..8c50854 100644
--- a/app/tools/gimpbrightnesscontrasttool.c
+++ b/app/tools/gimpbrightnesscontrasttool.c
@@ -41,7 +41,7 @@
 #include "display/gimpdisplay.h"
 
 #include "gimpbrightnesscontrasttool.h"
-#include "gimpimagemapoptions.h"
+#include "gimpfilteroptions.h"
 #include "gimptoolcontrol.h"
 
 #include "gimp-intl.h"
@@ -72,20 +72,20 @@ static void   gimp_brightness_contrast_tool_motion         (GimpTool
                                                             GimpDisplay           *display);
 
 static gchar *
-              gimp_brightness_contrast_tool_get_operation  (GimpImageMapTool      *image_map_tool,
+              gimp_brightness_contrast_tool_get_operation  (GimpFilterTool        *filter_tool,
                                                             gchar                **title,
                                                             gchar                **description,
                                                             gchar                **undo_desc,
                                                             gchar                **icon_name,
                                                             gchar                **help_id);
-static void   gimp_brightness_contrast_tool_dialog         (GimpImageMapTool      *image_map_tool);
+static void   gimp_brightness_contrast_tool_dialog         (GimpFilterTool        *filter_tool);
 
-static void   brightness_contrast_to_levels_callback       (GtkWidget                  *widget,
-                                                            GimpImageMapTool           *image_map_tool);
+static void   brightness_contrast_to_levels_callback       (GtkWidget             *widget,
+                                                            GimpFilterTool        *filter_tool);
 
 
 G_DEFINE_TYPE (GimpBrightnessContrastTool, gimp_brightness_contrast_tool,
-               GIMP_TYPE_IMAGE_MAP_TOOL)
+               GIMP_TYPE_FILTER_TOOL)
 
 #define parent_class gimp_brightness_contrast_tool_parent_class
 
@@ -95,7 +95,7 @@ gimp_brightness_contrast_tool_register (GimpToolRegisterCallback  callback,
                                         gpointer                  data)
 {
   (* callback) (GIMP_TYPE_BRIGHTNESS_CONTRAST_TOOL,
-                GIMP_TYPE_IMAGE_MAP_OPTIONS, NULL,
+                GIMP_TYPE_FILTER_OPTIONS, NULL,
                 0,
                 "gimp-brightness-contrast-tool",
                 _("Brightness-Contrast"),
@@ -109,20 +109,20 @@ gimp_brightness_contrast_tool_register (GimpToolRegisterCallback  callback,
 static void
 gimp_brightness_contrast_tool_class_init (GimpBrightnessContrastToolClass *klass)
 {
-  GimpToolClass         *tool_class    = GIMP_TOOL_CLASS (klass);
-  GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
+  GimpToolClass       *tool_class        = GIMP_TOOL_CLASS (klass);
+  GimpFilterToolClass *filter_tool_class = GIMP_FILTER_TOOL_CLASS (klass);
 
-  tool_class->initialize             = gimp_brightness_contrast_tool_initialize;
-  tool_class->button_press           = gimp_brightness_contrast_tool_button_press;
-  tool_class->button_release         = gimp_brightness_contrast_tool_button_release;
-  tool_class->motion                 = gimp_brightness_contrast_tool_motion;
+  tool_class->initialize                 = gimp_brightness_contrast_tool_initialize;
+  tool_class->button_press               = gimp_brightness_contrast_tool_button_press;
+  tool_class->button_release             = gimp_brightness_contrast_tool_button_release;
+  tool_class->motion                     = gimp_brightness_contrast_tool_motion;
 
-  im_tool_class->settings_name       = "brightness-contrast";
-  im_tool_class->import_dialog_title = _("Import Brightness-Contrast settings");
-  im_tool_class->export_dialog_title = _("Export Brightness-Contrast settings");
+  filter_tool_class->settings_name       = "brightness-contrast";
+  filter_tool_class->import_dialog_title = _("Import Brightness-Contrast settings");
+  filter_tool_class->export_dialog_title = _("Export Brightness-Contrast settings");
 
-  im_tool_class->get_operation       = gimp_brightness_contrast_tool_get_operation;
-  im_tool_class->dialog              = gimp_brightness_contrast_tool_dialog;
+  filter_tool_class->get_operation       = gimp_brightness_contrast_tool_get_operation;
+  filter_tool_class->dialog              = gimp_brightness_contrast_tool_dialog;
 }
 
 static void
@@ -163,12 +163,12 @@ gimp_brightness_contrast_tool_initialize (GimpTool     *tool,
 }
 
 static gchar *
-gimp_brightness_contrast_tool_get_operation (GimpImageMapTool  *im_tool,
-                                             gchar            **title,
-                                             gchar            **description,
-                                             gchar            **undo_desc,
-                                             gchar            **icon_name,
-                                             gchar            **help_id)
+gimp_brightness_contrast_tool_get_operation (GimpFilterTool  *filter_tool,
+                                             gchar          **title,
+                                             gchar          **description,
+                                             gchar          **undo_desc,
+                                             gchar          **icon_name,
+                                             gchar          **help_id)
 {
   *description = g_strdup (_("Adjust Brightness and Contrast"));
 
@@ -187,7 +187,7 @@ gimp_brightness_contrast_tool_button_press (GimpTool            *tool,
   gdouble                     brightness;
   gdouble                     contrast;
 
-  g_object_get (GIMP_IMAGE_MAP_TOOL (tool)->config,
+  g_object_get (GIMP_FILTER_TOOL (tool)->config,
                 "brightness", &brightness,
                 "contrast",   &contrast,
                 NULL);
@@ -217,7 +217,7 @@ gimp_brightness_contrast_tool_button_release (GimpTool              *tool,
     return;
 
   if (release_type == GIMP_BUTTON_RELEASE_CANCEL)
-    gimp_config_reset (GIMP_CONFIG (GIMP_IMAGE_MAP_TOOL (tool)->config));
+    gimp_config_reset (GIMP_CONFIG (GIMP_FILTER_TOOL (tool)->config));
 }
 
 static void
@@ -232,7 +232,7 @@ gimp_brightness_contrast_tool_motion (GimpTool         *tool,
   bc_tool->dx =   (coords->x - bc_tool->x);
   bc_tool->dy = - (coords->y - bc_tool->y);
 
-  g_object_set (GIMP_IMAGE_MAP_TOOL (tool)->config,
+  g_object_set (GIMP_FILTER_TOOL (tool)->config,
                 "brightness", CLAMP (bc_tool->dy, -127.0, 127.0) / 127.0,
                 "contrast",   CLAMP (bc_tool->dx, -127.0, 127.0) / 127.0,
                 NULL);
@@ -244,17 +244,17 @@ gimp_brightness_contrast_tool_motion (GimpTool         *tool,
 /********************************/
 
 static void
-gimp_brightness_contrast_tool_dialog (GimpImageMapTool *image_map_tool)
+gimp_brightness_contrast_tool_dialog (GimpFilterTool *filter_tool)
 {
-  GimpBrightnessContrastTool *bc_tool = GIMP_BRIGHTNESS_CONTRAST_TOOL (image_map_tool);
+  GimpBrightnessContrastTool *bc_tool = GIMP_BRIGHTNESS_CONTRAST_TOOL (filter_tool);
   GtkWidget                  *main_vbox;
   GtkWidget                  *scale;
   GtkWidget                  *button;
 
-  main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
+  main_vbox = gimp_filter_tool_dialog_get_vbox (filter_tool);
 
   /*  Create the brightness scale widget  */
-  scale = gimp_prop_spin_scale_new (image_map_tool->config, "brightness",
+  scale = gimp_prop_spin_scale_new (filter_tool->config, "brightness",
                                     _("_Brightness"), 0.01, 0.1, 3);
   gtk_box_pack_start (GTK_BOX (main_vbox), scale, FALSE, FALSE, 0);
   gtk_widget_show (scale);
@@ -262,7 +262,7 @@ gimp_brightness_contrast_tool_dialog (GimpImageMapTool *image_map_tool)
   bc_tool->brightness_scale = scale;
 
   /*  Create the contrast scale widget  */
-  scale = gimp_prop_spin_scale_new (image_map_tool->config, "contrast",
+  scale = gimp_prop_spin_scale_new (filter_tool->config, "contrast",
                                     _("_Contrast"), 0.01, 0.1, 3);
   gtk_box_pack_start (GTK_BOX (main_vbox), scale, FALSE, FALSE, 0);
   gtk_widget_show (scale);
@@ -276,20 +276,20 @@ gimp_brightness_contrast_tool_dialog (GimpImageMapTool *image_map_tool)
 
   g_signal_connect (button, "clicked",
                     G_CALLBACK (brightness_contrast_to_levels_callback),
-                    image_map_tool);
+                    filter_tool);
 }
 
 static void
-brightness_contrast_to_levels_callback (GtkWidget        *widget,
-                                        GimpImageMapTool *image_map_tool)
+brightness_contrast_to_levels_callback (GtkWidget      *widget,
+                                        GimpFilterTool *filter_tool)
 {
   GimpLevelsConfig *levels;
 
-  levels = gimp_brightness_contrast_config_to_levels_config (GIMP_BRIGHTNESS_CONTRAST_CONFIG 
(image_map_tool->config));
+  levels = gimp_brightness_contrast_config_to_levels_config (GIMP_BRIGHTNESS_CONTRAST_CONFIG 
(filter_tool->config));
 
-  gimp_image_map_tool_edit_as (image_map_tool,
-                               "gimp-levels-tool",
-                               GIMP_CONFIG (levels));
+  gimp_filter_tool_edit_as (filter_tool,
+                            "gimp-levels-tool",
+                            GIMP_CONFIG (levels));
 
   g_object_unref (levels);
 }
diff --git a/app/tools/gimpbrightnesscontrasttool.h b/app/tools/gimpbrightnesscontrasttool.h
index d7bfd05..acabd6b 100644
--- a/app/tools/gimpbrightnesscontrasttool.h
+++ b/app/tools/gimpbrightnesscontrasttool.h
@@ -19,7 +19,7 @@
 #define __GIMP_BRIGHTNESS_CONTRAST_TOOL_H__
 
 
-#include "gimpimagemaptool.h"
+#include "gimpfiltertool.h"
 
 
 #define GIMP_TYPE_BRIGHTNESS_CONTRAST_TOOL            (gimp_brightness_contrast_tool_get_type ())
@@ -35,19 +35,19 @@ typedef struct _GimpBrightnessContrastToolClass GimpBrightnessContrastToolClass;
 
 struct _GimpBrightnessContrastTool
 {
-  GimpImageMapTool  parent_instance;
+  GimpFilterTool  parent_instance;
 
-  gdouble           x, y;
-  gdouble           dx, dy;
+  gdouble         x, y;
+  gdouble         dx, dy;
 
   /* dialog */
-  GtkWidget        *brightness_scale;
-  GtkWidget        *contrast_scale;
+  GtkWidget      *brightness_scale;
+  GtkWidget      *contrast_scale;
 };
 
 struct _GimpBrightnessContrastToolClass
 {
-  GimpImageMapToolClass  parent_class;
+  GimpFilterToolClass  parent_class;
 };
 
 
diff --git a/app/tools/gimpcolorbalancetool.c b/app/tools/gimpcolorbalancetool.c
index 7de7d8d..3dc103c 100644
--- a/app/tools/gimpcolorbalancetool.c
+++ b/app/tools/gimpcolorbalancetool.c
@@ -40,32 +40,32 @@
 #include "display/gimpdisplay.h"
 
 #include "gimpcolorbalancetool.h"
-#include "gimpimagemapoptions.h"
+#include "gimpfilteroptions.h"
 
 #include "gimp-intl.h"
 
 
 /*  local function prototypes  */
 
-static gboolean   gimp_color_balance_tool_initialize    (GimpTool         *tool,
-                                                         GimpDisplay      *display,
-                                                         GError          **error);
+static gboolean   gimp_color_balance_tool_initialize    (GimpTool        *tool,
+                                                         GimpDisplay     *display,
+                                                         GError         **error);
 
-static gchar    * gimp_color_balance_tool_get_operation (GimpImageMapTool *im_tool,
-                                                         gchar           **title,
-                                                         gchar           **description,
-                                                         gchar           **undo_desc,
-                                                         gchar           **icon_name,
-                                                         gchar           **help_id);
-static void       gimp_color_balance_tool_dialog        (GimpImageMapTool *im_tool);
-static void       gimp_color_balance_tool_reset         (GimpImageMapTool *im_tool);
+static gchar    * gimp_color_balance_tool_get_operation (GimpFilterTool  *filter_tool,
+                                                         gchar          **title,
+                                                         gchar          **description,
+                                                         gchar          **undo_desc,
+                                                         gchar          **icon_name,
+                                                         gchar          **help_id);
+static void       gimp_color_balance_tool_dialog        (GimpFilterTool  *filter_tool);
+static void       gimp_color_balance_tool_reset         (GimpFilterTool  *filter_tool);
 
-static void       color_balance_range_reset_callback    (GtkWidget        *widget,
-                                                         GimpImageMapTool *im_tool);
+static void       color_balance_range_reset_callback    (GtkWidget       *widget,
+                                                         GimpFilterTool  *filter_tool);
 
 
 G_DEFINE_TYPE (GimpColorBalanceTool, gimp_color_balance_tool,
-               GIMP_TYPE_IMAGE_MAP_TOOL)
+               GIMP_TYPE_FILTER_TOOL)
 
 #define parent_class gimp_color_balance_tool_parent_class
 
@@ -75,7 +75,7 @@ gimp_color_balance_tool_register (GimpToolRegisterCallback  callback,
                                   gpointer                  data)
 {
   (* callback) (GIMP_TYPE_COLOR_BALANCE_TOOL,
-                GIMP_TYPE_IMAGE_MAP_OPTIONS, NULL,
+                GIMP_TYPE_FILTER_OPTIONS, NULL,
                 0,
                 "gimp-color-balance-tool",
                 _("Color Balance"),
@@ -89,18 +89,18 @@ gimp_color_balance_tool_register (GimpToolRegisterCallback  callback,
 static void
 gimp_color_balance_tool_class_init (GimpColorBalanceToolClass *klass)
 {
-  GimpToolClass         *tool_class    = GIMP_TOOL_CLASS (klass);
-  GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
+  GimpToolClass       *tool_class        = GIMP_TOOL_CLASS (klass);
+  GimpFilterToolClass *filter_tool_class = GIMP_FILTER_TOOL_CLASS (klass);
 
-  tool_class->initialize             = gimp_color_balance_tool_initialize;
+  tool_class->initialize                 = gimp_color_balance_tool_initialize;
 
-  im_tool_class->settings_name       = "color-balance";
-  im_tool_class->import_dialog_title = _("Import Color Balance Settings");
-  im_tool_class->export_dialog_title = _("Export Color Balance Settings");
+  filter_tool_class->settings_name       = "color-balance";
+  filter_tool_class->import_dialog_title = _("Import Color Balance Settings");
+  filter_tool_class->export_dialog_title = _("Export Color Balance Settings");
 
-  im_tool_class->get_operation       = gimp_color_balance_tool_get_operation;
-  im_tool_class->dialog              = gimp_color_balance_tool_dialog;
-  im_tool_class->reset               = gimp_color_balance_tool_reset;
+  filter_tool_class->get_operation       = gimp_color_balance_tool_get_operation;
+  filter_tool_class->dialog              = gimp_color_balance_tool_dialog;
+  filter_tool_class->reset               = gimp_color_balance_tool_reset;
 }
 
 static void
@@ -130,12 +130,12 @@ gimp_color_balance_tool_initialize (GimpTool     *tool,
 }
 
 static gchar *
-gimp_color_balance_tool_get_operation (GimpImageMapTool  *im_tool,
-                                       gchar            **title,
-                                       gchar            **description,
-                                       gchar            **undo_desc,
-                                       gchar            **icon_name,
-                                       gchar            **help_id)
+gimp_color_balance_tool_get_operation (GimpFilterTool  *filter_tool,
+                                       gchar          **title,
+                                       gchar          **description,
+                                       gchar          **undo_desc,
+                                       gchar          **icon_name,
+                                       gchar          **help_id)
 {
   *description = g_strdup (_("Adjust Color Balance"));
 
@@ -179,9 +179,9 @@ create_levels_scale (GObject     *config,
 }
 
 static void
-gimp_color_balance_tool_dialog (GimpImageMapTool *image_map_tool)
+gimp_color_balance_tool_dialog (GimpFilterTool *filter_tool)
 {
-  GimpColorBalanceTool *cb_tool = GIMP_COLOR_BALANCE_TOOL (image_map_tool);
+  GimpColorBalanceTool *cb_tool = GIMP_COLOR_BALANCE_TOOL (filter_tool);
   GtkWidget            *main_vbox;
   GtkWidget            *vbox;
   GtkWidget            *hbox;
@@ -189,9 +189,9 @@ gimp_color_balance_tool_dialog (GimpImageMapTool *image_map_tool)
   GtkWidget            *button;
   GtkWidget            *frame;
 
-  main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
+  main_vbox = gimp_filter_tool_dialog_get_vbox (filter_tool);
 
-  frame = gimp_prop_enum_radio_frame_new (image_map_tool->config, "range",
+  frame = gimp_prop_enum_radio_frame_new (filter_tool->config, "range",
                                           _("Select Range to Adjust"),
                                           0, 0);
   gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
@@ -212,15 +212,15 @@ gimp_color_balance_tool_dialog (GimpImageMapTool *image_map_tool)
   gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
   gtk_widget_show (table);
 
-  create_levels_scale (image_map_tool->config, "cyan-red",
+  create_levels_scale (filter_tool->config, "cyan-red",
                        _("Cyan"), _("Red"),
                        table, 0);
 
-  create_levels_scale (image_map_tool->config, "magenta-green",
+  create_levels_scale (filter_tool->config, "magenta-green",
                        _("Magenta"), _("Green"),
                        table, 1);
 
-  create_levels_scale (image_map_tool->config, "yellow-blue",
+  create_levels_scale (filter_tool->config, "yellow-blue",
                        _("Yellow"), _("Blue"),
                        table, 2);
 
@@ -236,7 +236,7 @@ gimp_color_balance_tool_dialog (GimpImageMapTool *image_map_tool)
                     G_CALLBACK (color_balance_range_reset_callback),
                     cb_tool);
 
-  button = gimp_prop_check_button_new (image_map_tool->config,
+  button = gimp_prop_check_button_new (filter_tool->config,
                                        "preserve-luminosity",
                                        _("Preserve _luminosity"));
   gtk_box_pack_end (GTK_BOX (main_vbox), button, FALSE, FALSE, 0);
@@ -244,24 +244,24 @@ gimp_color_balance_tool_dialog (GimpImageMapTool *image_map_tool)
 }
 
 static void
-gimp_color_balance_tool_reset (GimpImageMapTool *im_tool)
+gimp_color_balance_tool_reset (GimpFilterTool *filter_tool)
 {
   GimpTransferMode range;
 
-  g_object_get (im_tool->config,
+  g_object_get (filter_tool->config,
                 "range", &range,
                 NULL);
 
-  GIMP_IMAGE_MAP_TOOL_CLASS (parent_class)->reset (im_tool);
+  GIMP_FILTER_TOOL_CLASS (parent_class)->reset (filter_tool);
 
-  g_object_set (im_tool->config,
+  g_object_set (filter_tool->config,
                 "range", range,
                 NULL);
 }
 
 static void
-color_balance_range_reset_callback (GtkWidget        *widget,
-                                    GimpImageMapTool *im_tool)
+color_balance_range_reset_callback (GtkWidget      *widget,
+                                    GimpFilterTool *filter_tool)
 {
-  gimp_color_balance_config_reset_range (GIMP_COLOR_BALANCE_CONFIG (im_tool->config));
+  gimp_color_balance_config_reset_range (GIMP_COLOR_BALANCE_CONFIG (filter_tool->config));
 }
diff --git a/app/tools/gimpcolorbalancetool.h b/app/tools/gimpcolorbalancetool.h
index 2a1bdbb..81e5f83 100644
--- a/app/tools/gimpcolorbalancetool.h
+++ b/app/tools/gimpcolorbalancetool.h
@@ -19,7 +19,7 @@
 #define __GIMP_COLOR_BALANCE_TOOL_H__
 
 
-#include "gimpimagemaptool.h"
+#include "gimpfiltertool.h"
 
 
 #define GIMP_TYPE_COLOR_BALANCE_TOOL            (gimp_color_balance_tool_get_type ())
@@ -36,12 +36,12 @@ typedef struct _GimpColorBalanceToolClass GimpColorBalanceToolClass;
 
 struct _GimpColorBalanceTool
 {
-  GimpImageMapTool  parent_instance;
+  GimpFilterTool  parent_instance;
 };
 
 struct _GimpColorBalanceToolClass
 {
-  GimpImageMapToolClass  parent_class;
+  GimpFilterToolClass  parent_class;
 };
 
 
diff --git a/app/tools/gimpcolorizetool.c b/app/tools/gimpcolorizetool.c
index 2ccb298..d97150d 100644
--- a/app/tools/gimpcolorizetool.c
+++ b/app/tools/gimpcolorizetool.c
@@ -46,26 +46,26 @@
 
 /*  local function prototypes  */
 
-static gboolean   gimp_colorize_tool_initialize    (GimpTool         *tool,
-                                                    GimpDisplay      *display,
-                                                    GError          **error);
-
-static gchar    * gimp_colorize_tool_get_operation (GimpImageMapTool *im_tool,
-                                                    gchar           **title,
-                                                    gchar           **description,
-                                                    gchar           **undo_desc,
-                                                    gchar           **icon_name,
-                                                    gchar           **help_id);
-static void       gimp_colorize_tool_dialog        (GimpImageMapTool *im_tool);
-static void       gimp_colorize_tool_color_picked  (GimpImageMapTool *im_tool,
-                                                    gpointer          identifier,
-                                                    gdouble           x,
-                                                    gdouble           y,
-                                                    const Babl       *sample_format,
-                                                    const GimpRGB    *color);
-
-
-G_DEFINE_TYPE (GimpColorizeTool, gimp_colorize_tool, GIMP_TYPE_IMAGE_MAP_TOOL)
+static gboolean   gimp_colorize_tool_initialize    (GimpTool        *tool,
+                                                    GimpDisplay     *display,
+                                                    GError         **error);
+
+static gchar    * gimp_colorize_tool_get_operation (GimpFilterTool  *filter_tool,
+                                                    gchar          **title,
+                                                    gchar          **description,
+                                                    gchar          **undo_desc,
+                                                    gchar          **icon_name,
+                                                    gchar          **help_id);
+static void       gimp_colorize_tool_dialog        (GimpFilterTool  *filter_tool);
+static void       gimp_colorize_tool_color_picked  (GimpFilterTool  *filter_tool,
+                                                    gpointer         identifier,
+                                                    gdouble          x,
+                                                    gdouble          y,
+                                                    const Babl      *sample_format,
+                                                    const GimpRGB   *color);
+
+
+G_DEFINE_TYPE (GimpColorizeTool, gimp_colorize_tool, GIMP_TYPE_FILTER_TOOL)
 
 #define parent_class gimp_colorize_tool_parent_class
 
@@ -90,18 +90,18 @@ gimp_colorize_tool_register (GimpToolRegisterCallback  callback,
 static void
 gimp_colorize_tool_class_init (GimpColorizeToolClass *klass)
 {
-  GimpToolClass         *tool_class    = GIMP_TOOL_CLASS (klass);
-  GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
+  GimpToolClass         *tool_class        = GIMP_TOOL_CLASS (klass);
+  GimpFilterToolClass   *filter_tool_class = GIMP_FILTER_TOOL_CLASS (klass);
 
-  tool_class->initialize             = gimp_colorize_tool_initialize;
+  tool_class->initialize                 = gimp_colorize_tool_initialize;
 
-  im_tool_class->settings_name       = "colorize";
-  im_tool_class->import_dialog_title = _("Import Colorize Settings");
-  im_tool_class->export_dialog_title = _("Export Colorize Settings");
+  filter_tool_class->settings_name       = "colorize";
+  filter_tool_class->import_dialog_title = _("Import Colorize Settings");
+  filter_tool_class->export_dialog_title = _("Export Colorize Settings");
 
-  im_tool_class->get_operation       = gimp_colorize_tool_get_operation;
-  im_tool_class->dialog              = gimp_colorize_tool_dialog;
-  im_tool_class->color_picked        = gimp_colorize_tool_color_picked;
+  filter_tool_class->get_operation       = gimp_colorize_tool_get_operation;
+  filter_tool_class->dialog              = gimp_colorize_tool_dialog;
+  filter_tool_class->color_picked        = gimp_colorize_tool_color_picked;
 }
 
 static void
@@ -131,12 +131,12 @@ gimp_colorize_tool_initialize (GimpTool     *tool,
 }
 
 static gchar *
-gimp_colorize_tool_get_operation (GimpImageMapTool  *im_tool,
-                                  gchar            **title,
-                                  gchar            **description,
-                                  gchar            **undo_desc,
-                                  gchar            **icon_name,
-                                  gchar            **help_id)
+gimp_colorize_tool_get_operation (GimpFilterTool  *filter_tool,
+                                  gchar          **title,
+                                  gchar          **description,
+                                  gchar          **undo_desc,
+                                  gchar          **icon_name,
+                                  gchar          **help_id)
 {
   *description = g_strdup (_("Colorize the Image"));
 
@@ -149,9 +149,9 @@ gimp_colorize_tool_get_operation (GimpImageMapTool  *im_tool,
 /***************************/
 
 static void
-gimp_colorize_tool_dialog (GimpImageMapTool *im_tool)
+gimp_colorize_tool_dialog (GimpFilterTool *filter_tool)
 {
-  GimpColorizeTool *col_tool = GIMP_COLORIZE_TOOL (im_tool);
+  GimpColorizeTool *col_tool = GIMP_COLORIZE_TOOL (filter_tool);
   GtkWidget        *main_vbox;
   GtkWidget        *frame;
   GtkWidget        *vbox;
@@ -159,7 +159,7 @@ gimp_colorize_tool_dialog (GimpImageMapTool *im_tool)
   GtkWidget        *hbox;
   GtkWidget        *button;
 
-  main_vbox = gimp_image_map_tool_dialog_get_vbox (im_tool);
+  main_vbox = gimp_filter_tool_dialog_get_vbox (filter_tool);
 
   frame = gimp_frame_new (_("Select Color"));
   gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
@@ -170,21 +170,21 @@ gimp_colorize_tool_dialog (GimpImageMapTool *im_tool)
   gtk_widget_show (vbox);
 
   /*  Create the hue scale widget  */
-  scale = gimp_prop_spin_scale_new (im_tool->config, "hue",
+  scale = gimp_prop_spin_scale_new (filter_tool->config, "hue",
                                     _("_Hue"), 1.0 / 360.0, 15.0 / 360.0, 0);
   gimp_prop_widget_set_factor (scale, 360.0, 0.0, 0.0, 1);
   gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
   gtk_widget_show (scale);
 
   /*  Create the saturation scale widget  */
-  scale = gimp_prop_spin_scale_new (im_tool->config, "saturation",
+  scale = gimp_prop_spin_scale_new (filter_tool->config, "saturation",
                                     _("_Saturation"), 0.01, 0.1, 0);
   gimp_prop_widget_set_factor (scale, 100.0, 0.0, 0.0, 1);
   gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
   gtk_widget_show (scale);
 
   /*  Create the lightness scale widget  */
-  scale = gimp_prop_spin_scale_new (im_tool->config, "lightness",
+  scale = gimp_prop_spin_scale_new (filter_tool->config, "lightness",
                                     _("_Lightness"), 0.01, 0.1, 0);
   gimp_prop_widget_set_factor (scale, 100.0, 0.0, 0.0, 1);
   gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
@@ -195,7 +195,7 @@ gimp_colorize_tool_dialog (GimpImageMapTool *im_tool)
   gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
   gtk_widget_show (hbox);
 
-  button = gimp_prop_color_button_new (im_tool->config, "color",
+  button = gimp_prop_color_button_new (filter_tool->config, "color",
                                        _("Colorize Color"),
                                        128, 24,
                                        GIMP_COLOR_AREA_FLAT);
@@ -205,21 +205,21 @@ gimp_colorize_tool_dialog (GimpImageMapTool *im_tool)
   gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
   gtk_widget_show (button);
 
-  button = gimp_image_map_tool_add_color_picker (im_tool,
-                                                 "colorize",
-                                                 GIMP_STOCK_COLOR_PICKER_GRAY,
-                                                 _("Pick color from image"));
+  button = gimp_filter_tool_add_color_picker (filter_tool,
+                                              "colorize",
+                                              GIMP_STOCK_COLOR_PICKER_GRAY,
+                                              _("Pick color from image"));
   gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
   gtk_widget_show (button);
 }
 
 static void
-gimp_colorize_tool_color_picked (GimpImageMapTool *im_tool,
-                                 gpointer          identifier,
-                                 gdouble           x,
-                                 gdouble           y,
-                                 const Babl       *sample_format,
-                                 const GimpRGB    *color)
+gimp_colorize_tool_color_picked (GimpFilterTool *filter_tool,
+                                 gpointer        identifier,
+                                 gdouble         x,
+                                 gdouble         y,
+                                 const Babl     *sample_format,
+                                 const GimpRGB  *color)
 {
-  g_object_set (im_tool->config, "color", color, NULL);
+  g_object_set (filter_tool->config, "color", color, NULL);
 }
diff --git a/app/tools/gimpcolorizetool.h b/app/tools/gimpcolorizetool.h
index 16c6080..abde0f6 100644
--- a/app/tools/gimpcolorizetool.h
+++ b/app/tools/gimpcolorizetool.h
@@ -19,7 +19,7 @@
 #define __GIMP_COLORIZE_TOOL_H__
 
 
-#include "gimpimagemaptool.h"
+#include "gimpfiltertool.h"
 
 
 #define GIMP_TYPE_COLORIZE_TOOL            (gimp_colorize_tool_get_type ())
@@ -35,12 +35,12 @@ typedef struct _GimpColorizeToolClass GimpColorizeToolClass;
 
 struct _GimpColorizeTool
 {
-  GimpImageMapTool  parent_instance;
+  GimpFilterTool  parent_instance;
 };
 
 struct _GimpColorizeToolClass
 {
-  GimpImageMapToolClass  parent_class;
+  GimpFilterToolClass  parent_class;
 };
 
 
diff --git a/app/tools/gimpcoloroptions.c b/app/tools/gimpcoloroptions.c
index 858184c..9c11888 100644
--- a/app/tools/gimpcoloroptions.c
+++ b/app/tools/gimpcoloroptions.c
@@ -54,7 +54,7 @@ static void   gimp_color_options_get_property (GObject      *object,
 
 
 G_DEFINE_TYPE (GimpColorOptions, gimp_color_options,
-               GIMP_TYPE_IMAGE_MAP_OPTIONS)
+               GIMP_TYPE_FILTER_OPTIONS)
 
 
 static void
diff --git a/app/tools/gimpcoloroptions.h b/app/tools/gimpcoloroptions.h
index ae6f885..886f84c 100644
--- a/app/tools/gimpcoloroptions.h
+++ b/app/tools/gimpcoloroptions.h
@@ -19,7 +19,7 @@
 #define __GIMP_COLOR_OPTIONS_H__
 
 
-#include "gimpimagemapoptions.h"
+#include "gimpfilteroptions.h"
 
 
 #define GIMP_TYPE_COLOR_OPTIONS            (gimp_color_options_get_type ())
@@ -30,15 +30,20 @@
 #define GIMP_COLOR_OPTIONS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_COLOR_OPTIONS, 
GimpColorOptionsClass))
 
 
-typedef  GimpImageMapOptionsClass  GimpColorOptionsClass;
+typedef struct _GimpColorOptionsClass  GimpColorOptionsClass;
 
 struct _GimpColorOptions
 {
-  GimpImageMapOptions  parent_instance;
+  GimpFilterOptions  parent_instance;
 
-  gboolean             sample_merged;
-  gboolean             sample_average;
-  gdouble              average_radius;
+  gboolean           sample_merged;
+  gboolean           sample_average;
+  gdouble            average_radius;
+};
+
+struct _GimpColorOptionsClass
+{
+  GimpFilterOptionsClass  parent_instance;
 };
 
 
diff --git a/app/tools/gimpcurvestool.c b/app/tools/gimpcurvestool.c
index 8d90672..b2f17de 100644
--- a/app/tools/gimpcurvestool.c
+++ b/app/tools/gimpcurvestool.c
@@ -62,73 +62,73 @@
 
 /*  local function prototypes  */
 
-static void       gimp_curves_tool_constructed    (GObject              *object);
-
-static gboolean   gimp_curves_tool_initialize     (GimpTool             *tool,
-                                                   GimpDisplay          *display,
-                                                   GError              **error);
-static void       gimp_curves_tool_button_release (GimpTool             *tool,
-                                                   const GimpCoords     *coords,
-                                                   guint32               time,
-                                                   GdkModifierType       state,
-                                                   GimpButtonReleaseType release_type,
-                                                   GimpDisplay          *display);
-static gboolean   gimp_curves_tool_key_press      (GimpTool             *tool,
-                                                   GdkEventKey          *kevent,
-                                                   GimpDisplay          *display);
-static void       gimp_curves_tool_oper_update    (GimpTool             *tool,
-                                                   const GimpCoords     *coords,
-                                                   GdkModifierType       state,
-                                                   gboolean              proximity,
-                                                   GimpDisplay          *display);
-
-static void       gimp_curves_tool_color_picked   (GimpColorTool        *color_tool,
-                                                   GimpColorPickState    pick_state,
-                                                   gdouble               x,
-                                                   gdouble               y,
-                                                   const Babl           *sample_format,
-                                                   gpointer              pixel,
-                                                   const GimpRGB        *color);
-
-static gchar    * gimp_curves_tool_get_operation  (GimpImageMapTool     *im_tool,
-                                                   gchar               **title,
-                                                   gchar               **description,
-                                                   gchar               **undo_desc,
-                                                   gchar               **icon_name,
-                                                   gchar               **help_id);
-static void       gimp_curves_tool_dialog         (GimpImageMapTool     *im_tool);
-static void       gimp_curves_tool_reset          (GimpImageMapTool     *im_tool);
-static gboolean   gimp_curves_tool_settings_import(GimpImageMapTool     *im_tool,
-                                                   GInputStream         *input,
-                                                   GError              **error);
-static gboolean   gimp_curves_tool_settings_export(GimpImageMapTool     *im_tool,
-                                                   GOutputStream        *output,
-                                                   GError              **error);
-
-static void       gimp_curves_tool_export_setup   (GimpSettingsBox      *settings_box,
-                                                   GtkFileChooserDialog *dialog,
-                                                   gboolean              export,
-                                                   GimpCurvesTool       *tool);
-static void       gimp_curves_tool_update_channel (GimpCurvesTool       *tool);
-static void       gimp_curves_tool_config_notify  (GObject              *object,
-                                                   GParamSpec           *pspec,
-                                                   GimpCurvesTool       *tool);
-
-static void       curves_channel_callback         (GtkWidget            *widget,
-                                                   GimpCurvesTool       *tool);
-static void       curves_channel_reset_callback   (GtkWidget            *widget,
-                                                   GimpCurvesTool       *tool);
-
-static gboolean   curves_menu_sensitivity         (gint                  value,
-                                                   gpointer              data);
-
-static void       curves_curve_type_callback      (GtkWidget            *widget,
-                                                   GimpCurvesTool       *tool);
-
-static const GimpRGB * curves_get_channel_color   (GimpHistogramChannel  channel);
-
-
-G_DEFINE_TYPE (GimpCurvesTool, gimp_curves_tool, GIMP_TYPE_IMAGE_MAP_TOOL)
+static void       gimp_curves_tool_constructed     (GObject              *object);
+
+static gboolean   gimp_curves_tool_initialize      (GimpTool             *tool,
+                                                    GimpDisplay          *display,
+                                                    GError              **error);
+static void       gimp_curves_tool_button_release  (GimpTool             *tool,
+                                                    const GimpCoords     *coords,
+                                                    guint32               time,
+                                                    GdkModifierType       state,
+                                                    GimpButtonReleaseType release_type,
+                                                    GimpDisplay          *display);
+static gboolean   gimp_curves_tool_key_press       (GimpTool             *tool,
+                                                    GdkEventKey          *kevent,
+                                                    GimpDisplay          *display);
+static void       gimp_curves_tool_oper_update     (GimpTool             *tool,
+                                                    const GimpCoords     *coords,
+                                                    GdkModifierType       state,
+                                                    gboolean              proximity,
+                                                    GimpDisplay          *display);
+
+static void       gimp_curves_tool_color_picked    (GimpColorTool        *color_tool,
+                                                    GimpColorPickState    pick_state,
+                                                    gdouble               x,
+                                                    gdouble               y,
+                                                    const Babl           *sample_format,
+                                                    gpointer              pixel,
+                                                    const GimpRGB        *color);
+
+static gchar    * gimp_curves_tool_get_operation   (GimpFilterTool       *filter_tool,
+                                                    gchar               **title,
+                                                    gchar               **description,
+                                                    gchar               **undo_desc,
+                                                    gchar               **icon_name,
+                                                    gchar               **help_id);
+static void       gimp_curves_tool_dialog          (GimpFilterTool       *filter_tool);
+static void       gimp_curves_tool_reset           (GimpFilterTool       *filter_tool);
+static gboolean   gimp_curves_tool_settings_import (GimpFilterTool       *filter_tool,
+                                                    GInputStream         *input,
+                                                    GError              **error);
+static gboolean   gimp_curves_tool_settings_export (GimpFilterTool       *filter_tool,
+                                                    GOutputStream        *output,
+                                                    GError              **error);
+
+static void       gimp_curves_tool_export_setup    (GimpSettingsBox      *settings_box,
+                                                    GtkFileChooserDialog *dialog,
+                                                    gboolean              export,
+                                                    GimpCurvesTool       *tool);
+static void       gimp_curves_tool_update_channel  (GimpCurvesTool       *tool);
+static void       gimp_curves_tool_config_notify   (GObject              *object,
+                                                    GParamSpec           *pspec,
+                                                    GimpCurvesTool       *tool);
+
+static void       curves_channel_callback          (GtkWidget            *widget,
+                                                    GimpCurvesTool       *tool);
+static void       curves_channel_reset_callback    (GtkWidget            *widget,
+                                                    GimpCurvesTool       *tool);
+
+static gboolean   curves_menu_sensitivity          (gint                  value,
+                                                    gpointer              data);
+
+static void       curves_curve_type_callback       (GtkWidget            *widget,
+                                                    GimpCurvesTool       *tool);
+
+static const GimpRGB * curves_get_channel_color    (GimpHistogramChannel  channel);
+
+
+G_DEFINE_TYPE (GimpCurvesTool, gimp_curves_tool, GIMP_TYPE_FILTER_TOOL)
 
 #define parent_class gimp_curves_tool_parent_class
 
@@ -158,29 +158,29 @@ gimp_curves_tool_register (GimpToolRegisterCallback  callback,
 static void
 gimp_curves_tool_class_init (GimpCurvesToolClass *klass)
 {
-  GObjectClass          *object_class     = G_OBJECT_CLASS (klass);
-  GimpToolClass         *tool_class       = GIMP_TOOL_CLASS (klass);
-  GimpColorToolClass    *color_tool_class = GIMP_COLOR_TOOL_CLASS (klass);
-  GimpImageMapToolClass *im_tool_class    = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
+  GObjectClass        *object_class      = G_OBJECT_CLASS (klass);
+  GimpToolClass       *tool_class        = GIMP_TOOL_CLASS (klass);
+  GimpColorToolClass  *color_tool_class  = GIMP_COLOR_TOOL_CLASS (klass);
+  GimpFilterToolClass *filter_tool_class = GIMP_FILTER_TOOL_CLASS (klass);
 
-  object_class->constructed          = gimp_curves_tool_constructed;
+  object_class->constructed              = gimp_curves_tool_constructed;
 
-  tool_class->initialize             = gimp_curves_tool_initialize;
-  tool_class->button_release         = gimp_curves_tool_button_release;
-  tool_class->key_press              = gimp_curves_tool_key_press;
-  tool_class->oper_update            = gimp_curves_tool_oper_update;
+  tool_class->initialize                 = gimp_curves_tool_initialize;
+  tool_class->button_release             = gimp_curves_tool_button_release;
+  tool_class->key_press                  = gimp_curves_tool_key_press;
+  tool_class->oper_update                = gimp_curves_tool_oper_update;
 
-  color_tool_class->picked           = gimp_curves_tool_color_picked;
+  color_tool_class->picked               = gimp_curves_tool_color_picked;
 
-  im_tool_class->settings_name       = "curves";
-  im_tool_class->import_dialog_title = _("Import Curves");
-  im_tool_class->export_dialog_title = _("Export Curves");
+  filter_tool_class->settings_name       = "curves";
+  filter_tool_class->import_dialog_title = _("Import Curves");
+  filter_tool_class->export_dialog_title = _("Export Curves");
 
-  im_tool_class->get_operation       = gimp_curves_tool_get_operation;
-  im_tool_class->dialog              = gimp_curves_tool_dialog;
-  im_tool_class->reset               = gimp_curves_tool_reset;
-  im_tool_class->settings_import     = gimp_curves_tool_settings_import;
-  im_tool_class->settings_export     = gimp_curves_tool_settings_export;
+  filter_tool_class->get_operation       = gimp_curves_tool_get_operation;
+  filter_tool_class->dialog              = gimp_curves_tool_dialog;
+  filter_tool_class->reset               = gimp_curves_tool_reset;
+  filter_tool_class->settings_import     = gimp_curves_tool_settings_import;
+  filter_tool_class->settings_export     = gimp_curves_tool_settings_export;
 }
 
 static void
@@ -197,7 +197,7 @@ gimp_curves_tool_constructed (GObject *object)
 {
   G_OBJECT_CLASS (parent_class)->constructed (object);
 
-  g_signal_connect_object (GIMP_IMAGE_MAP_TOOL (object)->config, "notify",
+  g_signal_connect_object (GIMP_FILTER_TOOL (object)->config, "notify",
                            G_CALLBACK (gimp_curves_tool_config_notify),
                            object, 0);
 
@@ -253,9 +253,9 @@ gimp_curves_tool_button_release (GimpTool              *tool,
                                  GimpButtonReleaseType  release_type,
                                  GimpDisplay           *display)
 {
-  GimpCurvesTool   *c_tool  = GIMP_CURVES_TOOL (tool);
-  GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (tool);
-  GimpCurvesConfig *config  = GIMP_CURVES_CONFIG (im_tool->config);
+  GimpCurvesTool   *c_tool      = GIMP_CURVES_TOOL (tool);
+  GimpFilterTool   *filter_tool = GIMP_FILTER_TOOL (tool);
+  GimpCurvesConfig *config      = GIMP_CURVES_CONFIG (filter_tool->config);
 
   if (state & gimp_get_extend_selection_mask ())
     {
@@ -324,8 +324,8 @@ gimp_curves_tool_oper_update (GimpTool         *tool,
                               gboolean          proximity,
                               GimpDisplay      *display)
 {
-  if (gimp_image_map_tool_on_guide (GIMP_IMAGE_MAP_TOOL (tool),
-                                    coords, display))
+  if (gimp_filter_tool_on_guide (GIMP_FILTER_TOOL (tool),
+                                 coords, display))
     {
       GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state, proximity,
                                                    display);
@@ -377,12 +377,12 @@ gimp_curves_tool_color_picked (GimpColorTool      *color_tool,
                                gpointer            pixel,
                                const GimpRGB      *color)
 {
-  GimpCurvesTool   *tool    = GIMP_CURVES_TOOL (color_tool);
-  GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (color_tool);
-  GimpCurvesConfig *config  = GIMP_CURVES_CONFIG (im_tool->config);
+  GimpCurvesTool   *tool        = GIMP_CURVES_TOOL (color_tool);
+  GimpFilterTool   *filter_tool = GIMP_FILTER_TOOL (color_tool);
+  GimpCurvesConfig *config      = GIMP_CURVES_CONFIG (filter_tool->config);
   GimpDrawable     *drawable;
 
-  drawable = GIMP_IMAGE_MAP_TOOL (tool)->drawable;
+  drawable = GIMP_FILTER_TOOL (tool)->drawable;
 
   tool->picked_color[GIMP_HISTOGRAM_RED]   = color->r;
   tool->picked_color[GIMP_HISTOGRAM_GREEN] = color->g;
@@ -401,12 +401,12 @@ gimp_curves_tool_color_picked (GimpColorTool      *color_tool,
 }
 
 static gchar *
-gimp_curves_tool_get_operation (GimpImageMapTool  *im_tool,
-                                gchar            **title,
-                                gchar            **description,
-                                gchar            **undo_desc,
-                                gchar            **icon_name,
-                                gchar            **help_id)
+gimp_curves_tool_get_operation (GimpFilterTool  *filter_tool,
+                                gchar          **title,
+                                gchar          **description,
+                                gchar          **undo_desc,
+                                gchar          **icon_name,
+                                gchar          **help_id)
 {
   *description = g_strdup (_("Adjust Color Curves"));
 
@@ -419,11 +419,11 @@ gimp_curves_tool_get_operation (GimpImageMapTool  *im_tool,
 /*******************/
 
 static void
-gimp_curves_tool_dialog (GimpImageMapTool *im_tool)
+gimp_curves_tool_dialog (GimpFilterTool *filter_tool)
 {
-  GimpCurvesTool   *tool         = GIMP_CURVES_TOOL (im_tool);
-  GimpToolOptions  *tool_options = GIMP_TOOL_GET_OPTIONS (im_tool);
-  GimpCurvesConfig *config       = GIMP_CURVES_CONFIG (im_tool->config);
+  GimpCurvesTool   *tool         = GIMP_CURVES_TOOL (filter_tool);
+  GimpToolOptions  *tool_options = GIMP_TOOL_GET_OPTIONS (filter_tool);
+  GimpCurvesConfig *config       = GIMP_CURVES_CONFIG (filter_tool->config);
   GtkListStore     *store;
   GtkWidget        *main_vbox;
   GtkWidget        *frame_vbox;
@@ -438,11 +438,11 @@ gimp_curves_tool_dialog (GimpImageMapTool *im_tool)
   GtkWidget        *bar;
   GtkWidget        *combo;
 
-  g_signal_connect (im_tool->settings_box, "file-dialog-setup",
+  g_signal_connect (filter_tool->settings_box, "file-dialog-setup",
                     G_CALLBACK (gimp_curves_tool_export_setup),
-                    im_tool);
+                    filter_tool);
 
-  main_vbox = gimp_image_map_tool_dialog_get_vbox (im_tool);
+  main_vbox = gimp_filter_tool_dialog_get_vbox (filter_tool);
 
   /*  The combo box for selecting channels  */
   main_frame = gimp_frame_new (NULL);
@@ -594,13 +594,13 @@ gimp_curves_tool_dialog (GimpImageMapTool *im_tool)
 }
 
 static void
-gimp_curves_tool_reset (GimpImageMapTool *im_tool)
+gimp_curves_tool_reset (GimpFilterTool *filter_tool)
 {
-  GimpCurvesConfig     *config = GIMP_CURVES_CONFIG (im_tool->config);
+  GimpCurvesConfig     *config = GIMP_CURVES_CONFIG (filter_tool->config);
   GimpCurvesConfig     *default_config;
   GimpHistogramChannel  channel;
 
-  default_config = GIMP_CURVES_CONFIG (im_tool->default_config);
+  default_config = GIMP_CURVES_CONFIG (filter_tool->default_config);
 
   for (channel = GIMP_HISTOGRAM_VALUE;
        channel <= GIMP_HISTOGRAM_ALPHA;
@@ -630,11 +630,11 @@ gimp_curves_tool_reset (GimpImageMapTool *im_tool)
 }
 
 static gboolean
-gimp_curves_tool_settings_import (GimpImageMapTool  *im_tool,
-                                  GInputStream      *input,
-                                  GError           **error)
+gimp_curves_tool_settings_import (GimpFilterTool  *filter_tool,
+                                  GInputStream    *input,
+                                  GError         **error)
 {
-  GimpCurvesConfig *config = GIMP_CURVES_CONFIG (im_tool->config);
+  GimpCurvesConfig *config = GIMP_CURVES_CONFIG (filter_tool->config);
   gchar             header[64];
   gsize             bytes_read;
 
@@ -651,25 +651,25 @@ gimp_curves_tool_settings_import (GimpImageMapTool  *im_tool,
   if (g_str_has_prefix (header, "# GIMP Curves File\n"))
     return gimp_curves_config_load_cruft (config, input, error);
 
-  return GIMP_IMAGE_MAP_TOOL_CLASS (parent_class)->settings_import (im_tool,
-                                                                    input,
-                                                                    error);
+  return GIMP_FILTER_TOOL_CLASS (parent_class)->settings_import (filter_tool,
+                                                                 input,
+                                                                 error);
 }
 
 static gboolean
-gimp_curves_tool_settings_export (GimpImageMapTool  *im_tool,
-                                  GOutputStream     *output,
-                                  GError           **error)
+gimp_curves_tool_settings_export (GimpFilterTool  *filter_tool,
+                                  GOutputStream   *output,
+                                  GError         **error)
 {
-  GimpCurvesTool   *tool   = GIMP_CURVES_TOOL (im_tool);
-  GimpCurvesConfig *config = GIMP_CURVES_CONFIG (im_tool->config);
+  GimpCurvesTool   *tool   = GIMP_CURVES_TOOL (filter_tool);
+  GimpCurvesConfig *config = GIMP_CURVES_CONFIG (filter_tool->config);
 
   if (tool->export_old_format)
     return gimp_curves_config_save_cruft (config, output, error);
 
-  return GIMP_IMAGE_MAP_TOOL_CLASS (parent_class)->settings_export (im_tool,
-                                                                    output,
-                                                                    error);
+  return GIMP_FILTER_TOOL_CLASS (parent_class)->settings_export (filter_tool,
+                                                                 output,
+                                                                 error);
 }
 
 static void
@@ -697,9 +697,9 @@ gimp_curves_tool_export_setup (GimpSettingsBox      *settings_box,
 static void
 gimp_curves_tool_update_channel (GimpCurvesTool *tool)
 {
-  GimpImageMapTool     *im_tool = GIMP_IMAGE_MAP_TOOL (tool);
-  GimpCurvesConfig     *config  = GIMP_CURVES_CONFIG (im_tool->config);
-  GimpCurve            *curve   = config->curve[config->channel];
+  GimpFilterTool       *filter_tool = GIMP_FILTER_TOOL (tool);
+  GimpCurvesConfig     *config      = GIMP_CURVES_CONFIG (filter_tool->config);
+  GimpCurve            *curve       = config->curve[config->channel];
   GimpHistogramChannel  channel;
 
   gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (tool->channel_menu),
@@ -793,8 +793,8 @@ static void
 curves_channel_callback (GtkWidget      *widget,
                          GimpCurvesTool *tool)
 {
-  GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (tool);
-  GimpCurvesConfig *config  = GIMP_CURVES_CONFIG (im_tool->config);
+  GimpFilterTool   *filter_tool = GIMP_FILTER_TOOL (tool);
+  GimpCurvesConfig *config      = GIMP_CURVES_CONFIG (filter_tool->config);
   gint              value;
 
   if (gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (widget), &value) &&
@@ -810,8 +810,8 @@ static void
 curves_channel_reset_callback (GtkWidget      *widget,
                                GimpCurvesTool *tool)
 {
-  GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (tool);
-  GimpCurvesConfig *config  = GIMP_CURVES_CONFIG (im_tool->config);
+  GimpFilterTool   *filter_tool = GIMP_FILTER_TOOL (tool);
+  GimpCurvesConfig *config      = GIMP_CURVES_CONFIG (filter_tool->config);
 
   gimp_curve_reset (config->curve[config->channel], FALSE);
 }
@@ -854,9 +854,9 @@ curves_curve_type_callback (GtkWidget      *widget,
 
   if (gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (widget), &value))
     {
-      GimpImageMapTool *im_tool    = GIMP_IMAGE_MAP_TOOL (tool);
-      GimpCurvesConfig *config     = GIMP_CURVES_CONFIG (im_tool->config);
-      GimpCurveType     curve_type = value;
+      GimpFilterTool   *filter_tool = GIMP_FILTER_TOOL (tool);
+      GimpCurvesConfig *config      = GIMP_CURVES_CONFIG (filter_tool->config);
+      GimpCurveType     curve_type  = value;
 
       if (config->curve[config->channel]->curve_type != curve_type)
         gimp_curve_set_curve_type (config->curve[config->channel], curve_type);
diff --git a/app/tools/gimpcurvestool.h b/app/tools/gimpcurvestool.h
index f1c9762..ea2d5ff 100644
--- a/app/tools/gimpcurvestool.h
+++ b/app/tools/gimpcurvestool.h
@@ -19,7 +19,7 @@
 #define __GIMP_CURVES_TOOL_H__
 
 
-#include "gimpimagemaptool.h"
+#include "gimpfiltertool.h"
 
 
 #define GIMP_TYPE_CURVES_TOOL            (gimp_curves_tool_get_type ())
@@ -34,7 +34,7 @@ typedef struct _GimpCurvesToolClass GimpCurvesToolClass;
 
 struct _GimpCurvesTool
 {
-  GimpImageMapTool  parent_instance;
+  GimpFilterTool  parent_instance;
 
   /* dialog */
   gdouble           picked_color[5];
@@ -51,7 +51,7 @@ struct _GimpCurvesTool
 
 struct _GimpCurvesToolClass
 {
-  GimpImageMapToolClass  parent_class;
+  GimpFilterToolClass  parent_class;
 };
 
 
diff --git a/app/tools/gimpimagemapoptions.c b/app/tools/gimpfilteroptions.c
similarity index 74%
rename from app/tools/gimpimagemapoptions.c
rename to app/tools/gimpfilteroptions.c
index 225c6fd..436cca7 100644
--- a/app/tools/gimpimagemapoptions.c
+++ b/app/tools/gimpfilteroptions.c
@@ -24,7 +24,7 @@
 
 #include "tools-types.h"
 
-#include "gimpimagemapoptions.h"
+#include "gimpfilteroptions.h"
 
 #include "gimp-intl.h"
 
@@ -41,31 +41,31 @@ enum
 };
 
 
-static void   gimp_image_map_options_finalize     (GObject      *object);
-static void   gimp_image_map_options_set_property (GObject      *object,
-                                                   guint         property_id,
-                                                   const GValue *value,
-                                                   GParamSpec   *pspec);
-static void   gimp_image_map_options_get_property (GObject      *object,
-                                                   guint         property_id,
-                                                   GValue       *value,
-                                                   GParamSpec   *pspec);
+static void   gimp_filter_options_finalize     (GObject      *object);
+static void   gimp_filter_options_set_property (GObject      *object,
+                                                guint         property_id,
+                                                const GValue *value,
+                                                GParamSpec   *pspec);
+static void   gimp_filter_options_get_property (GObject      *object,
+                                                guint         property_id,
+                                                GValue       *value,
+                                                GParamSpec   *pspec);
 
 
-G_DEFINE_TYPE (GimpImageMapOptions, gimp_image_map_options,
+G_DEFINE_TYPE (GimpFilterOptions, gimp_filter_options,
                GIMP_TYPE_TOOL_OPTIONS)
 
-#define parent_class gimp_image_map_options_parent_class
+#define parent_class gimp_filter_options_parent_class
 
 
 static void
-gimp_image_map_options_class_init (GimpImageMapOptionsClass *klass)
+gimp_filter_options_class_init (GimpFilterOptionsClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-  object_class->finalize     = gimp_image_map_options_finalize;
-  object_class->set_property = gimp_image_map_options_set_property;
-  object_class->get_property = gimp_image_map_options_get_property;
+  object_class->finalize     = gimp_filter_options_finalize;
+  object_class->set_property = gimp_filter_options_set_property;
+  object_class->get_property = gimp_filter_options_get_property;
 
   GIMP_CONFIG_PROP_BOOLEAN (object_class, PROP_PREVIEW,
                             "preview",
@@ -113,14 +113,14 @@ gimp_image_map_options_class_init (GimpImageMapOptionsClass *klass)
 }
 
 static void
-gimp_image_map_options_init (GimpImageMapOptions *options)
+gimp_filter_options_init (GimpFilterOptions *options)
 {
 }
 
 static void
-gimp_image_map_options_finalize (GObject *object)
+gimp_filter_options_finalize (GObject *object)
 {
-  GimpImageMapOptions *options = GIMP_IMAGE_MAP_OPTIONS (object);
+  GimpFilterOptions *options = GIMP_FILTER_OPTIONS (object);
 
   if (options->settings)
     {
@@ -133,12 +133,12 @@ gimp_image_map_options_finalize (GObject *object)
 
 
 static void
-gimp_image_map_options_set_property (GObject      *object,
-                                     guint         property_id,
-                                     const GValue *value,
-                                     GParamSpec   *pspec)
+gimp_filter_options_set_property (GObject      *object,
+                                  guint         property_id,
+                                  const GValue *value,
+                                  GParamSpec   *pspec)
 {
-  GimpImageMapOptions *options = GIMP_IMAGE_MAP_OPTIONS (object);
+  GimpFilterOptions *options = GIMP_FILTER_OPTIONS (object);
 
   switch (property_id)
     {
@@ -175,12 +175,12 @@ gimp_image_map_options_set_property (GObject      *object,
 }
 
 static void
-gimp_image_map_options_get_property (GObject    *object,
-                                     guint       property_id,
-                                     GValue     *value,
-                                     GParamSpec *pspec)
+gimp_filter_options_get_property (GObject    *object,
+                                  guint       property_id,
+                                  GValue     *value,
+                                  GParamSpec *pspec)
 {
-  GimpImageMapOptions *options = GIMP_IMAGE_MAP_OPTIONS (object);
+  GimpFilterOptions *options = GIMP_FILTER_OPTIONS (object);
 
   switch (property_id)
     {
diff --git a/app/tools/gimpimagemapoptions.h b/app/tools/gimpfilteroptions.h
similarity index 51%
rename from app/tools/gimpimagemapoptions.h
rename to app/tools/gimpfilteroptions.h
index 599a78d..22b409d 100644
--- a/app/tools/gimpimagemapoptions.h
+++ b/app/tools/gimpfilteroptions.h
@@ -15,24 +15,24 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef __GIMP_IMAGE_MAP_OPTIONS_H__
-#define __GIMP_IMAGE_MAP_OPTIONS_H__
+#ifndef __GIMP_FILTER_OPTIONS_H__
+#define __GIMP_FILTER_OPTIONS_H__
 
 
 #include "core/gimptooloptions.h"
 
 
-#define GIMP_TYPE_IMAGE_MAP_OPTIONS            (gimp_image_map_options_get_type ())
-#define GIMP_IMAGE_MAP_OPTIONS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
GIMP_TYPE_IMAGE_MAP_OPTIONS, GimpImageMapOptions))
-#define GIMP_IMAGE_MAP_OPTIONS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), 
GIMP_TYPE_IMAGE_MAP_OPTIONS, GimpImageMapOptionsClass))
-#define GIMP_IS_IMAGE_MAP_OPTIONS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
GIMP_TYPE_IMAGE_MAP_OPTIONS))
-#define GIMP_IS_IMAGE_MAP_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), 
GIMP_TYPE_IMAGE_MAP_OPTIONS))
-#define GIMP_IMAGE_MAP_OPTIONS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), 
GIMP_TYPE_IMAGE_MAP_OPTIONS, GimpImageMapOptionsClass))
+#define GIMP_TYPE_FILTER_OPTIONS            (gimp_filter_options_get_type ())
+#define GIMP_FILTER_OPTIONS(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_FILTER_OPTIONS, 
GimpFilterOptions))
+#define GIMP_FILTER_OPTIONS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_FILTER_OPTIONS, 
GimpFilterOptionsClass))
+#define GIMP_IS_FILTER_OPTIONS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_FILTER_OPTIONS))
+#define GIMP_IS_FILTER_OPTIONS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_FILTER_OPTIONS))
+#define GIMP_FILTER_OPTIONS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_FILTER_OPTIONS, 
GimpFilterOptionsClass))
 
 
-typedef struct _GimpToolOptionsClass  GimpImageMapOptionsClass;
+typedef struct _GimpToolOptionsClass  GimpFilterOptionsClass;
 
-struct _GimpImageMapOptions
+struct _GimpFilterOptions
 {
   GimpToolOptions     parent_instance;
 
@@ -45,7 +45,7 @@ struct _GimpImageMapOptions
 };
 
 
-GType  gimp_image_map_options_get_type (void) G_GNUC_CONST;
+GType   gimp_filter_options_get_type (void) G_GNUC_CONST;
 
 
-#endif /* __GIMP_IMAGE_MAP_OPTIONS_H__ */
+#endif /* __GIMP_FILTER_OPTIONS_H__ */
diff --git a/app/tools/gimpimagemaptool-settings.c b/app/tools/gimpfiltertool-settings.c
similarity index 55%
rename from app/tools/gimpimagemaptool-settings.c
rename to app/tools/gimpfiltertool-settings.c
index 25cc3a4..e48bf5a 100644
--- a/app/tools/gimpimagemaptool-settings.c
+++ b/app/tools/gimpfiltertool-settings.c
@@ -1,7 +1,7 @@
 /* GIMP - The GNU Image Manipulation Program
  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  *
- * gimpimagemaptool-settings.c
+ * gimpfiltertool-settings.c
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -40,41 +40,41 @@
 
 #include "display/gimptoolgui.h"
 
-#include "gimpimagemapoptions.h"
-#include "gimpimagemaptool.h"
-#include "gimpimagemaptool-settings.h"
+#include "gimpfilteroptions.h"
+#include "gimpfiltertool.h"
+#include "gimpfiltertool-settings.h"
 
 #include "gimp-intl.h"
 
 
 /*  local function prototypes  */
 
-static gboolean gimp_image_map_tool_settings_import (GimpSettingsBox  *box,
-                                                     GFile            *file,
-                                                     GimpImageMapTool *im_tool);
-static gboolean gimp_image_map_tool_settings_export (GimpSettingsBox  *box,
-                                                     GFile            *file,
-                                                     GimpImageMapTool *im_tool);
+static gboolean gimp_filter_tool_settings_import (GimpSettingsBox  *box,
+                                                  GFile            *file,
+                                                  GimpFilterTool   *filter_tool);
+static gboolean gimp_filter_tool_settings_export (GimpSettingsBox  *box,
+                                                  GFile            *file,
+                                                  GimpFilterTool   *filter_tool);
 
 
 /*  public functions  */
 
 GtkWidget *
-gimp_image_map_tool_real_get_settings_ui (GimpImageMapTool  *im_tool,
-                                          GimpContainer     *settings,
-                                          GFile             *settings_file,
-                                          const gchar       *import_dialog_title,
-                                          const gchar       *export_dialog_title,
-                                          const gchar       *file_dialog_help_id,
-                                          GFile             *default_folder,
-                                          GtkWidget        **settings_box)
+gimp_filter_tool_real_get_settings_ui (GimpFilterTool  *filter_tool,
+                                       GimpContainer   *settings,
+                                       GFile           *settings_file,
+                                       const gchar     *import_dialog_title,
+                                       const gchar     *export_dialog_title,
+                                       const gchar     *file_dialog_help_id,
+                                       GFile           *default_folder,
+                                       GtkWidget      **settings_box)
 {
   GimpToolInfo *tool_info;
   GtkWidget    *hbox;
   GtkWidget    *label;
   GtkWidget    *settings_combo;
 
-  tool_info = GIMP_TOOL (im_tool)->tool_info;
+  tool_info = GIMP_TOOL (filter_tool)->tool_info;
 
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
 
@@ -83,7 +83,7 @@ gimp_image_map_tool_real_get_settings_ui (GimpImageMapTool  *im_tool,
   gtk_widget_show (label);
 
   *settings_box = gimp_settings_box_new (tool_info->gimp,
-                                         im_tool->config,
+                                         filter_tool->config,
                                          settings,
                                          settings_file,
                                          import_dialog_title,
@@ -97,41 +97,41 @@ gimp_image_map_tool_real_get_settings_ui (GimpImageMapTool  *im_tool,
   settings_combo = gimp_settings_box_get_combo (GIMP_SETTINGS_BOX (*settings_box));
   gtk_label_set_mnemonic_widget (GTK_LABEL (label), settings_combo);
 
-  g_signal_connect (im_tool->settings_box, "import",
-                    G_CALLBACK (gimp_image_map_tool_settings_import),
-                    im_tool);
+  g_signal_connect (filter_tool->settings_box, "import",
+                    G_CALLBACK (gimp_filter_tool_settings_import),
+                    filter_tool);
 
-  g_signal_connect (im_tool->settings_box, "export",
-                    G_CALLBACK (gimp_image_map_tool_settings_export),
-                    im_tool);
+  g_signal_connect (filter_tool->settings_box, "export",
+                    G_CALLBACK (gimp_filter_tool_settings_export),
+                    filter_tool);
 
   return hbox;
 }
 
 gboolean
-gimp_image_map_tool_real_settings_import (GimpImageMapTool  *im_tool,
-                                          GInputStream      *input,
-                                          GError           **error)
+gimp_filter_tool_real_settings_import (GimpFilterTool  *filter_tool,
+                                       GInputStream    *input,
+                                       GError         **error)
 {
-  return gimp_config_deserialize_stream (GIMP_CONFIG (im_tool->config),
+  return gimp_config_deserialize_stream (GIMP_CONFIG (filter_tool->config),
                                          input,
                                          NULL, error);
 }
 
 gboolean
-gimp_image_map_tool_real_settings_export (GimpImageMapTool  *im_tool,
-                                          GOutputStream     *output,
-                                          GError           **error)
+gimp_filter_tool_real_settings_export (GimpFilterTool  *filter_tool,
+                                       GOutputStream   *output,
+                                       GError         **error)
 {
-  GimpImageMapToolClass *klass = GIMP_IMAGE_MAP_TOOL_GET_CLASS (im_tool);
-  gchar                 *header;
-  gchar                 *footer;
-  gboolean               success;
+  GimpFilterToolClass *klass = GIMP_FILTER_TOOL_GET_CLASS (filter_tool);
+  gchar               *header;
+  gchar               *footer;
+  gboolean             success;
 
   header = g_strdup_printf ("GIMP %s tool settings",   klass->settings_name);
   footer = g_strdup_printf ("end of %s tool settings", klass->settings_name);
 
-  success = gimp_config_serialize_to_stream (GIMP_CONFIG (im_tool->config),
+  success = gimp_config_serialize_to_stream (GIMP_CONFIG (filter_tool->config),
                                              output,
                                              header, footer,
                                              NULL, error);
@@ -146,24 +146,24 @@ gimp_image_map_tool_real_settings_export (GimpImageMapTool  *im_tool,
 /*  private functions  */
 
 static gboolean
-gimp_image_map_tool_settings_import (GimpSettingsBox  *box,
-                                     GFile            *file,
-                                     GimpImageMapTool *im_tool)
+gimp_filter_tool_settings_import (GimpSettingsBox *box,
+                                  GFile           *file,
+                                  GimpFilterTool  *filter_tool)
 {
-  GimpImageMapToolClass *tool_class = GIMP_IMAGE_MAP_TOOL_GET_CLASS (im_tool);
-  GInputStream          *input;
-  GError                *error      = NULL;
+  GimpFilterToolClass *tool_class = GIMP_FILTER_TOOL_GET_CLASS (filter_tool);
+  GInputStream        *input;
+  GError              *error      = NULL;
 
   g_return_val_if_fail (tool_class->settings_import != NULL, FALSE);
 
-  if (GIMP_TOOL (im_tool)->tool_info->gimp->be_verbose)
+  if (GIMP_TOOL (filter_tool)->tool_info->gimp->be_verbose)
     g_print ("Parsing '%s'\n", gimp_file_get_utf8_name (file));
 
   input = G_INPUT_STREAM (g_file_read (file, NULL, &error));
   if (! input)
     {
-      gimp_message (GIMP_TOOL (im_tool)->tool_info->gimp,
-                    G_OBJECT (gimp_tool_gui_get_dialog (im_tool->gui)),
+      gimp_message (GIMP_TOOL (filter_tool)->tool_info->gimp,
+                    G_OBJECT (gimp_tool_gui_get_dialog (filter_tool->gui)),
                     GIMP_MESSAGE_ERROR,
                     _("Could not open '%s' for reading: %s"),
                     gimp_file_get_utf8_name (file),
@@ -172,10 +172,10 @@ gimp_image_map_tool_settings_import (GimpSettingsBox  *box,
       return FALSE;
     }
 
-  if (! tool_class->settings_import (im_tool, input, &error))
+  if (! tool_class->settings_import (filter_tool, input, &error))
     {
-      gimp_message (GIMP_TOOL (im_tool)->tool_info->gimp,
-                    G_OBJECT (gimp_tool_gui_get_dialog (im_tool->gui)),
+      gimp_message (GIMP_TOOL (filter_tool)->tool_info->gimp,
+                    G_OBJECT (gimp_tool_gui_get_dialog (filter_tool->gui)),
                     GIMP_MESSAGE_ERROR,
                     _("Error reading '%s': %s"),
                     gimp_file_get_utf8_name (file),
@@ -187,7 +187,7 @@ gimp_image_map_tool_settings_import (GimpSettingsBox  *box,
 
   g_object_unref (input);
 
-  g_object_set (GIMP_TOOL_GET_OPTIONS (im_tool),
+  g_object_set (GIMP_TOOL_GET_OPTIONS (filter_tool),
                 "settings", file,
                 NULL);
 
@@ -195,17 +195,17 @@ gimp_image_map_tool_settings_import (GimpSettingsBox  *box,
 }
 
 static gboolean
-gimp_image_map_tool_settings_export (GimpSettingsBox  *box,
-                                     GFile            *file,
-                                     GimpImageMapTool *im_tool)
+gimp_filter_tool_settings_export (GimpSettingsBox *box,
+                                  GFile           *file,
+                                  GimpFilterTool  *filter_tool)
 {
-  GimpImageMapToolClass *tool_class = GIMP_IMAGE_MAP_TOOL_GET_CLASS (im_tool);
-  GOutputStream         *output;
-  GError                *error      = NULL;
+  GimpFilterToolClass *tool_class = GIMP_FILTER_TOOL_GET_CLASS (filter_tool);
+  GOutputStream       *output;
+  GError              *error      = NULL;
 
   g_return_val_if_fail (tool_class->settings_export != NULL, FALSE);
 
-  if (GIMP_TOOL (im_tool)->tool_info->gimp->be_verbose)
+  if (GIMP_TOOL (filter_tool)->tool_info->gimp->be_verbose)
     g_print ("Writing '%s'\n", gimp_file_get_utf8_name (file));
 
   output = G_OUTPUT_STREAM (g_file_replace (file,
@@ -213,18 +213,18 @@ gimp_image_map_tool_settings_export (GimpSettingsBox  *box,
                                             NULL, &error));
   if (! output)
     {
-      gimp_message_literal (GIMP_TOOL (im_tool)->tool_info->gimp,
-                            G_OBJECT (gimp_tool_gui_get_dialog (im_tool->gui)),
+      gimp_message_literal (GIMP_TOOL (filter_tool)->tool_info->gimp,
+                            G_OBJECT (gimp_tool_gui_get_dialog (filter_tool->gui)),
                             GIMP_MESSAGE_ERROR,
                             error->message);
       g_clear_error (&error);
       return FALSE;
     }
 
-  if (! tool_class->settings_export (im_tool, output, &error))
+  if (! tool_class->settings_export (filter_tool, output, &error))
     {
-      gimp_message (GIMP_TOOL (im_tool)->tool_info->gimp,
-                    G_OBJECT (gimp_tool_gui_get_dialog (im_tool->gui)),
+      gimp_message (GIMP_TOOL (filter_tool)->tool_info->gimp,
+                    G_OBJECT (gimp_tool_gui_get_dialog (filter_tool->gui)),
                     GIMP_MESSAGE_ERROR,
                     _("Error writing '%s': %s"),
                     gimp_file_get_utf8_name (file),
@@ -236,13 +236,13 @@ gimp_image_map_tool_settings_export (GimpSettingsBox  *box,
 
   g_object_unref (output);
 
-  gimp_message (GIMP_TOOL (im_tool)->tool_info->gimp,
-                G_OBJECT (GIMP_TOOL (im_tool)->display),
+  gimp_message (GIMP_TOOL (filter_tool)->tool_info->gimp,
+                G_OBJECT (GIMP_TOOL (filter_tool)->display),
                 GIMP_MESSAGE_INFO,
                 _("Settings saved to '%s'"),
                 gimp_file_get_utf8_name (file));
 
-  g_object_set (GIMP_TOOL_GET_OPTIONS (im_tool),
+  g_object_set (GIMP_TOOL_GET_OPTIONS (filter_tool),
                 "settings", file,
                 NULL);
 
diff --git a/app/tools/gimpfiltertool-settings.h b/app/tools/gimpfiltertool-settings.h
new file mode 100644
index 0000000..8da042f
--- /dev/null
+++ b/app/tools/gimpfiltertool-settings.h
@@ -0,0 +1,40 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * gimpfiltertool-settings.h
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_FILTER_TOOL_SETTINGS_H__
+#define __GIMP_FILTER_TOOL_SETTINGS_H__
+
+
+GtkWidget * gimp_filter_tool_real_get_settings_ui (GimpFilterTool  *filter_tool,
+                                                   GimpContainer   *settings,
+                                                   GFile           *settings_file,
+                                                   const gchar     *import_dialog_title,
+                                                   const gchar     *export_dialog_title,
+                                                   const gchar     *file_dialog_help_id,
+                                                   GFile           *default_folder,
+                                                   GtkWidget      **settings_box);
+gboolean    gimp_filter_tool_real_settings_import (GimpFilterTool  *filter_tool,
+                                                   GInputStream    *input,
+                                                   GError         **error);
+gboolean    gimp_filter_tool_real_settings_export (GimpFilterTool  *filter_tool,
+                                                   GOutputStream   *output,
+                                                   GError         **error);
+
+
+#endif /* __GIMP_FILTER_TOOL_SETTINGS_H__ */
diff --git a/app/tools/gimpfiltertool.c b/app/tools/gimpfiltertool.c
new file mode 100644
index 0000000..f9952ed
--- /dev/null
+++ b/app/tools/gimpfiltertool.c
@@ -0,0 +1,1473 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/* This file contains a base class for tools that implement on canvas
+ * preview for non destructive editing. The processing of the pixels can
+ * be done either by a gegl op or by a C function (apply_func).
+ *
+ * For the core side of this, please see /app/core/gimpimagemap.c.
+ */
+
+#include "config.h"
+
+#include <string.h>
+
+#include <gegl.h>
+#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+
+#include "libgimpbase/gimpbase.h"
+#include "libgimpconfig/gimpconfig.h"
+#include "libgimpmath/gimpmath.h"
+#include "libgimpwidgets/gimpwidgets.h"
+
+#include "tools-types.h"
+
+#include "config/gimpguiconfig.h"
+
+#include "gegl/gimp-gegl-config.h"
+
+#include "core/gimp.h"
+#include "core/gimpdrawable.h"
+#include "core/gimperror.h"
+#include "core/gimpguide.h"
+#include "core/gimpimage.h"
+#include "core/gimpimage-guides.h"
+#include "core/gimpimage-pick-color.h"
+#include "core/gimpimagemap.h"
+#include "core/gimplist.h"
+#include "core/gimppickable.h"
+#include "core/gimpprogress.h"
+#include "core/gimpprojection.h"
+#include "core/gimpsettings.h"
+#include "core/gimptoolinfo.h"
+
+#include "widgets/gimpsettingsbox.h"
+#include "widgets/gimpwidgets-utils.h"
+
+#include "display/gimpdisplay.h"
+#include "display/gimpdisplayshell.h"
+#include "display/gimpdisplayshell-appearance.h"
+#include "display/gimpdisplayshell-transform.h"
+#include "display/gimptoolgui.h"
+
+#include "gimpcoloroptions.h"
+#include "gimpfiltertool.h"
+#include "gimpfiltertool-settings.h"
+#include "gimpguidetool.h"
+#include "gimptoolcontrol.h"
+#include "tool_manager.h"
+
+#include "gimp-intl.h"
+
+
+/*  local function prototypes  */
+
+static void      gimp_filter_tool_constructed    (GObject             *object);
+static void      gimp_filter_tool_finalize       (GObject             *object);
+
+static gboolean  gimp_filter_tool_initialize     (GimpTool            *tool,
+                                                  GimpDisplay         *display,
+                                                  GError             **error);
+static void      gimp_filter_tool_control        (GimpTool            *tool,
+                                                  GimpToolAction       action,
+                                                  GimpDisplay         *display);
+static void      gimp_filter_tool_button_press   (GimpTool            *tool,
+                                                  const GimpCoords    *coords,
+                                                  guint32              time,
+                                                  GdkModifierType      state,
+                                                  GimpButtonPressType  press_type,
+                                                  GimpDisplay         *display);
+static gboolean  gimp_filter_tool_key_press      (GimpTool            *tool,
+                                                  GdkEventKey         *kevent,
+                                                  GimpDisplay         *display);
+static void      gimp_filter_tool_oper_update    (GimpTool            *tool,
+                                                  const GimpCoords    *coords,
+                                                  GdkModifierType      state,
+                                                  gboolean             proximity,
+                                                  GimpDisplay         *display);
+static void      gimp_filter_tool_cursor_update  (GimpTool            *tool,
+                                                  const GimpCoords    *coords,
+                                                  GdkModifierType      state,
+                                                  GimpDisplay         *display);
+static void      gimp_filter_tool_options_notify (GimpTool            *tool,
+                                                  GimpToolOptions     *options,
+                                                  const GParamSpec    *pspec);
+
+static gboolean  gimp_filter_tool_pick_color     (GimpColorTool       *color_tool,
+                                                  gint                 x,
+                                                  gint                 y,
+                                                  const Babl         **sample_format,
+                                                  gpointer             pixel,
+                                                  GimpRGB             *color);
+static void      gimp_filter_tool_color_picked   (GimpColorTool       *color_tool,
+                                                  GimpColorPickState   pick_state,
+                                                  gdouble              x,
+                                                  gdouble              y,
+                                                  const Babl          *sample_format,
+                                                  gpointer             pixel,
+                                                  const GimpRGB       *color);
+
+static void      gimp_filter_tool_real_reset     (GimpFilterTool      *filter_tool);
+
+static void      gimp_filter_tool_halt           (GimpFilterTool      *filter_tool);
+static void      gimp_filter_tool_commit         (GimpFilterTool      *filter_tool);
+
+static void      gimp_filter_tool_dialog         (GimpFilterTool      *filter_tool);
+static void      gimp_filter_tool_dialog_unmap   (GtkWidget           *dialog,
+                                                  GimpFilterTool      *filter_tool);
+static void      gimp_filter_tool_reset          (GimpFilterTool      *filter_tool);
+static void      gimp_filter_tool_create_map     (GimpFilterTool      *filter_tool);
+static void      gimp_filter_tool_preview        (GimpFilterTool      *filter_tool);
+
+static void      gimp_filter_tool_flush          (GimpImageMap        *image_map,
+                                                  GimpFilterTool      *filter_tool);
+static void      gimp_filter_tool_config_notify  (GObject             *object,
+                                                  const GParamSpec    *pspec,
+                                                  GimpFilterTool      *filter_tool);
+
+static void      gimp_filter_tool_add_guide      (GimpFilterTool      *filter_tool);
+static void      gimp_filter_tool_remove_guide   (GimpFilterTool      *filter_tool);
+static void      gimp_filter_tool_move_guide     (GimpFilterTool      *filter_tool);
+static void      gimp_filter_tool_guide_removed  (GimpGuide           *guide,
+                                                  GimpFilterTool      *filter_tool);
+static void      gimp_filter_tool_guide_moved    (GimpGuide           *guide,
+                                                  const GParamSpec    *pspec,
+                                                  GimpFilterTool      *filter_tool);
+
+static void      gimp_filter_tool_response       (GimpToolGui         *gui,
+                                                  gint                 response_id,
+                                                  GimpFilterTool      *filter_tool);
+
+
+G_DEFINE_TYPE (GimpFilterTool, gimp_filter_tool, GIMP_TYPE_COLOR_TOOL)
+
+#define parent_class gimp_filter_tool_parent_class
+
+
+static void
+gimp_filter_tool_class_init (GimpFilterToolClass *klass)
+{
+  GObjectClass       *object_class     = G_OBJECT_CLASS (klass);
+  GimpToolClass      *tool_class       = GIMP_TOOL_CLASS (klass);
+  GimpColorToolClass *color_tool_class = GIMP_COLOR_TOOL_CLASS (klass);
+
+  object_class->constructed  = gimp_filter_tool_constructed;
+  object_class->finalize     = gimp_filter_tool_finalize;
+
+  tool_class->initialize     = gimp_filter_tool_initialize;
+  tool_class->control        = gimp_filter_tool_control;
+  tool_class->button_press   = gimp_filter_tool_button_press;
+  tool_class->key_press      = gimp_filter_tool_key_press;
+  tool_class->oper_update    = gimp_filter_tool_oper_update;
+  tool_class->cursor_update  = gimp_filter_tool_cursor_update;
+  tool_class->options_notify = gimp_filter_tool_options_notify;
+
+  color_tool_class->pick     = gimp_filter_tool_pick_color;
+  color_tool_class->picked   = gimp_filter_tool_color_picked;
+
+  klass->settings_name       = NULL;
+  klass->import_dialog_title = NULL;
+  klass->export_dialog_title = NULL;
+
+  klass->get_operation       = NULL;
+  klass->dialog              = NULL;
+  klass->reset               = gimp_filter_tool_real_reset;
+  klass->get_settings_ui     = gimp_filter_tool_real_get_settings_ui;
+  klass->settings_import     = gimp_filter_tool_real_settings_import;
+  klass->settings_export     = gimp_filter_tool_real_settings_export;
+}
+
+static void
+gimp_filter_tool_init (GimpFilterTool *filter_tool)
+{
+  GimpTool *tool = GIMP_TOOL (filter_tool);
+
+  gimp_tool_control_set_scroll_lock (tool->control, TRUE);
+  gimp_tool_control_set_preserve    (tool->control, FALSE);
+  gimp_tool_control_set_dirty_mask  (tool->control,
+                                     GIMP_DIRTY_IMAGE           |
+                                     GIMP_DIRTY_IMAGE_STRUCTURE |
+                                     GIMP_DIRTY_DRAWABLE        |
+                                     GIMP_DIRTY_ACTIVE_DRAWABLE);
+}
+
+static void
+gimp_filter_tool_constructed (GObject *object)
+{
+  GimpFilterTool *filter_tool = GIMP_FILTER_TOOL (object);
+
+  G_OBJECT_CLASS (parent_class)->constructed (object);
+
+  gimp_filter_tool_get_operation (filter_tool);
+}
+
+static void
+gimp_filter_tool_finalize (GObject *object)
+{
+  GimpFilterTool *filter_tool = GIMP_FILTER_TOOL (object);
+
+  if (filter_tool->operation)
+    {
+      g_object_unref (filter_tool->operation);
+      filter_tool->operation = NULL;
+    }
+
+  if (filter_tool->config)
+    {
+      g_object_unref (filter_tool->config);
+      filter_tool->config = NULL;
+    }
+
+  if (filter_tool->default_config)
+    {
+      g_object_unref (filter_tool->default_config);
+      filter_tool->default_config = NULL;
+    }
+
+  if (filter_tool->title)
+    {
+      g_free (filter_tool->title);
+      filter_tool->title = NULL;
+    }
+
+  if (filter_tool->description)
+    {
+      g_free (filter_tool->description);
+      filter_tool->description = NULL;
+    }
+
+  if (filter_tool->undo_desc)
+    {
+      g_free (filter_tool->undo_desc);
+      filter_tool->undo_desc = NULL;
+    }
+
+  if (filter_tool->icon_name)
+    {
+      g_free (filter_tool->icon_name);
+      filter_tool->icon_name = NULL;
+    }
+
+  if (filter_tool->help_id)
+    {
+      g_free (filter_tool->help_id);
+      filter_tool->help_id = NULL;
+    }
+
+  if (filter_tool->gui)
+    {
+      g_object_unref (filter_tool->gui);
+      filter_tool->gui          = NULL;
+      filter_tool->settings_box = NULL;
+    }
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gamma_hack (GtkToggleButton *button,
+            GimpFilterTool  *filter_tool)
+{
+  if (filter_tool->image_map)
+    {
+      gimp_image_map_set_gamma_hack (filter_tool->image_map,
+                                     gtk_toggle_button_get_active (button));
+    }
+}
+
+#define RESPONSE_RESET 1
+
+static gboolean
+gimp_filter_tool_initialize (GimpTool     *tool,
+                             GimpDisplay  *display,
+                             GError      **error)
+{
+  GimpFilterTool   *filter_tool = GIMP_FILTER_TOOL (tool);
+  GimpToolInfo     *tool_info   = tool->tool_info;
+  GimpImage        *image       = gimp_display_get_image (display);
+  GimpDrawable     *drawable    = gimp_image_get_active_drawable (image);
+  GimpDisplayShell *shell       = gimp_display_get_shell (display);
+
+  if (! drawable)
+    return FALSE;
+
+  if (gimp_viewable_get_children (GIMP_VIEWABLE (drawable)))
+    {
+      g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
+                          _("Cannot modify the pixels of layer groups."));
+      return FALSE;
+    }
+
+  if (gimp_item_is_content_locked (GIMP_ITEM (drawable)))
+    {
+      g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
+                          _("The active layer's pixels are locked."));
+      return FALSE;
+    }
+
+  if (! gimp_item_is_visible (GIMP_ITEM (drawable)))
+    {
+      g_set_error_literal (error, GIMP_ERROR, GIMP_FAILED,
+                           _("The active layer is not visible."));
+      return FALSE;
+    }
+
+  if (filter_tool->active_picker)
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (filter_tool->active_picker),
+                                  FALSE);
+
+  /*  set display so the dialog can be hidden on display destruction  */
+  tool->display = display;
+
+  if (filter_tool->config)
+    gimp_config_reset (GIMP_CONFIG (filter_tool->config));
+
+  if (! filter_tool->gui)
+    {
+      GimpFilterToolClass *klass = GIMP_FILTER_TOOL_GET_CLASS (filter_tool);
+      GtkWidget           *vbox;
+      GtkWidget           *hbox;
+      GtkWidget           *toggle;
+      gchar               *operation_name;
+
+      /*  disabled for at least GIMP 2.8  */
+      filter_tool->overlay = FALSE;
+
+      filter_tool->gui =
+        gimp_tool_gui_new (tool_info,
+                           filter_tool->title,
+                           filter_tool->description,
+                           filter_tool->icon_name,
+                           filter_tool->help_id,
+                           gtk_widget_get_screen (GTK_WIDGET (shell)),
+                           gimp_widget_get_monitor (GTK_WIDGET (shell)),
+                           filter_tool->overlay,
+
+                           GIMP_STOCK_RESET, RESPONSE_RESET,
+                           GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+                           GTK_STOCK_OK,     GTK_RESPONSE_OK,
+
+                           NULL);
+
+      gimp_tool_gui_set_default_response (filter_tool->gui, GTK_RESPONSE_OK);
+
+      gimp_tool_gui_set_alternative_button_order (filter_tool->gui,
+                                                  RESPONSE_RESET,
+                                                  GTK_RESPONSE_OK,
+                                                  GTK_RESPONSE_CANCEL,
+                                                  -1);
+
+      vbox = gimp_tool_gui_get_vbox (filter_tool->gui);
+
+      g_signal_connect_object (filter_tool->gui, "response",
+                               G_CALLBACK (gimp_filter_tool_response),
+                               G_OBJECT (filter_tool), 0);
+
+      if (filter_tool->config && klass->settings_name)
+        {
+          GType          type = G_TYPE_FROM_INSTANCE (filter_tool->config);
+          GimpContainer *settings;
+          GFile         *settings_file;
+          GFile         *default_folder;
+          GtkWidget     *settings_ui;
+
+          settings = gimp_gegl_config_get_container (type);
+          if (! gimp_list_get_sort_func (GIMP_LIST (settings)))
+            gimp_list_set_sort_func (GIMP_LIST (settings),
+                                     (GCompareFunc) gimp_settings_compare);
+
+          settings_file = gimp_tool_info_get_options_file (tool_info,
+                                                           ".settings");
+          default_folder = gimp_directory_file (klass->settings_name, NULL);
+
+          settings_ui = klass->get_settings_ui (filter_tool,
+                                                settings,
+                                                settings_file,
+                                                klass->import_dialog_title,
+                                                klass->export_dialog_title,
+                                                filter_tool->help_id,
+                                                default_folder,
+                                                &filter_tool->settings_box);
+
+          g_object_unref (default_folder);
+          g_object_unref (settings_file);
+
+          gtk_box_pack_start (GTK_BOX (vbox), settings_ui, FALSE, FALSE, 0);
+          gtk_widget_show (settings_ui);
+        }
+
+      /*  The gamma hack toggle  */
+      toggle = gtk_check_button_new_with_label ("Gamma hack (temp hack, please ignore)");
+      gtk_box_pack_end (GTK_BOX (vbox), toggle, FALSE, FALSE, 0);
+      gtk_widget_show (toggle);
+
+      g_signal_connect (toggle, "toggled",
+                        G_CALLBACK (gamma_hack),
+                        filter_tool);
+
+      /*  The preview and split view toggles  */
+      hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
+      gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+      gtk_widget_show (hbox);
+
+      toggle = gimp_prop_check_button_new (G_OBJECT (tool_info->tool_options),
+                                           "preview", NULL);
+      gtk_box_pack_start (GTK_BOX (hbox), toggle, TRUE, TRUE, 0);
+      gtk_widget_show (toggle);
+
+      toggle = gimp_prop_check_button_new (G_OBJECT (tool_info->tool_options),
+                                           "preview-split", NULL);
+      gtk_box_pack_start (GTK_BOX (hbox), toggle, FALSE, FALSE, 0);
+      gtk_widget_show (toggle);
+
+      g_object_bind_property (G_OBJECT (tool_info->tool_options), "preview",
+                              toggle,                             "sensitive",
+                              G_BINDING_SYNC_CREATE);
+
+      /*  The area combo  */
+      gegl_node_get (filter_tool->operation,
+                     "operation", &operation_name,
+                     NULL);
+
+      filter_tool->region_combo =
+        gimp_prop_enum_combo_box_new (G_OBJECT (tool_info->tool_options),
+                                      "region",
+                                      0, 0);
+      gtk_box_pack_end (GTK_BOX (vbox), filter_tool->region_combo,
+                        FALSE, FALSE, 0);
+
+      if (operation_name &&
+          gegl_operation_get_key (operation_name, "position-dependent"))
+        {
+          gtk_widget_show (filter_tool->region_combo);
+        }
+
+      g_free (operation_name);
+
+      /*  Fill in subclass widgets  */
+      gimp_filter_tool_dialog (filter_tool);
+    }
+  else
+    {
+      gimp_tool_gui_set_title (filter_tool->gui, filter_tool->title);
+      gimp_tool_gui_set_description (filter_tool->gui, filter_tool->description);
+      gimp_tool_gui_set_icon_name (filter_tool->gui, filter_tool->icon_name);
+      gimp_tool_gui_set_help_id (filter_tool->gui, filter_tool->help_id);
+    }
+
+  gimp_tool_gui_set_shell (filter_tool->gui, shell);
+  gimp_tool_gui_set_viewable (filter_tool->gui, GIMP_VIEWABLE (drawable));
+
+  gimp_tool_gui_show (filter_tool->gui);
+
+  filter_tool->drawable = drawable;
+  gimp_filter_tool_create_map (filter_tool);
+
+  return TRUE;
+}
+
+static void
+gimp_filter_tool_control (GimpTool       *tool,
+                          GimpToolAction  action,
+                          GimpDisplay    *display)
+{
+  GimpFilterTool *filter_tool = GIMP_FILTER_TOOL (tool);
+
+  switch (action)
+    {
+    case GIMP_TOOL_ACTION_PAUSE:
+    case GIMP_TOOL_ACTION_RESUME:
+      break;
+
+    case GIMP_TOOL_ACTION_HALT:
+      gimp_filter_tool_halt (filter_tool);
+      break;
+
+    case GIMP_TOOL_ACTION_COMMIT:
+      gimp_filter_tool_commit (filter_tool);
+      break;
+    }
+
+  GIMP_TOOL_CLASS (parent_class)->control (tool, action, display);
+}
+
+static void
+gimp_filter_tool_button_press (GimpTool            *tool,
+                               const GimpCoords    *coords,
+                               guint32              time,
+                               GdkModifierType      state,
+                               GimpButtonPressType  press_type,
+                               GimpDisplay         *display)
+{
+  GimpFilterTool *filter_tool = GIMP_FILTER_TOOL (tool);
+
+  if (! gimp_filter_tool_on_guide (filter_tool, coords, display))
+    {
+      GIMP_TOOL_CLASS (parent_class)->button_press (tool, coords, time, state,
+                                                    press_type, display);
+    }
+  else
+    {
+      GimpFilterOptions *options = GIMP_FILTER_TOOL_GET_OPTIONS (tool);
+
+      if (state & gimp_get_extend_selection_mask ())
+        {
+          GimpAlignmentType alignment;
+
+          /* switch side */
+          switch (options->preview_alignment)
+            {
+            case GIMP_ALIGN_LEFT:   alignment = GIMP_ALIGN_RIGHT;  break;
+            case GIMP_ALIGN_RIGHT:  alignment = GIMP_ALIGN_LEFT;   break;
+            case GIMP_ALIGN_TOP:    alignment = GIMP_ALIGN_BOTTOM; break;
+            case GIMP_ALIGN_BOTTOM: alignment = GIMP_ALIGN_TOP;    break;
+            default:
+              g_return_if_reached ();
+            }
+
+          g_object_set (options, "preview-alignment", alignment, NULL);
+        }
+      else if (state & gimp_get_toggle_behavior_mask ())
+        {
+          GimpItem          *item = GIMP_ITEM (filter_tool->drawable);
+          GimpAlignmentType  alignment;
+          gdouble            position;
+
+          /* switch orientation */
+          switch (options->preview_alignment)
+            {
+            case GIMP_ALIGN_LEFT:   alignment = GIMP_ALIGN_TOP;    break;
+            case GIMP_ALIGN_RIGHT:  alignment = GIMP_ALIGN_BOTTOM; break;
+            case GIMP_ALIGN_TOP:    alignment = GIMP_ALIGN_LEFT;   break;
+            case GIMP_ALIGN_BOTTOM: alignment = GIMP_ALIGN_RIGHT;  break;
+            default:
+              g_return_if_reached ();
+            }
+
+          if (alignment == GIMP_ALIGN_LEFT ||
+              alignment == GIMP_ALIGN_RIGHT)
+            {
+              position = ((coords->x - gimp_item_get_offset_x (item)) /
+                          gimp_item_get_width (item));
+            }
+          else
+            {
+              position = ((coords->y - gimp_item_get_offset_y (item)) /
+                          gimp_item_get_height (item));
+            }
+
+          g_object_set (options,
+                        "preview-alignment", alignment,
+                        "preview-position",  CLAMP (position, 0.0, 1.0),
+                        NULL);
+        }
+      else
+        {
+          gimp_guide_tool_start_edit (tool, display,
+                                      filter_tool->percent_guide);
+        }
+    }
+}
+
+static gboolean
+gimp_filter_tool_key_press (GimpTool    *tool,
+                            GdkEventKey *kevent,
+                            GimpDisplay *display)
+{
+  GimpFilterTool *filter_tool = GIMP_FILTER_TOOL (tool);
+
+  if (filter_tool->gui && display == tool->display)
+    {
+      switch (kevent->keyval)
+        {
+        case GDK_KEY_Return:
+        case GDK_KEY_KP_Enter:
+        case GDK_KEY_ISO_Enter:
+          gimp_filter_tool_response (filter_tool->gui,
+                                     GTK_RESPONSE_OK,
+                                     filter_tool);
+          return TRUE;
+
+        case GDK_KEY_BackSpace:
+          gimp_filter_tool_response (filter_tool->gui,
+                                     RESPONSE_RESET,
+                                     filter_tool);
+          return TRUE;
+
+        case GDK_KEY_Escape:
+          gimp_filter_tool_response (filter_tool->gui,
+                                     GTK_RESPONSE_CANCEL,
+                                     filter_tool);
+          return TRUE;
+        }
+    }
+
+  return FALSE;
+}
+
+static void
+gimp_filter_tool_oper_update (GimpTool         *tool,
+                              const GimpCoords *coords,
+                              GdkModifierType   state,
+                              gboolean          proximity,
+                              GimpDisplay      *display)
+{
+  GimpFilterTool *filter_tool = GIMP_FILTER_TOOL (tool);
+
+  gimp_tool_pop_status (tool, display);
+
+  if (! gimp_filter_tool_on_guide (filter_tool, coords, display))
+    {
+      GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state,
+                                                   proximity, display);
+    }
+  else
+    {
+      GdkModifierType  extend_mask = gimp_get_extend_selection_mask ();
+      GdkModifierType  toggle_mask = gimp_get_toggle_behavior_mask ();
+      gchar           *status      = NULL;
+
+      if (state & extend_mask)
+        {
+          status = g_strdup (_("Click to switch the original and filtered sides"));
+        }
+      else if (state & toggle_mask)
+        {
+          status = g_strdup (_("Click to switch between vertical and horizontal"));
+        }
+      else
+        {
+          status = gimp_suggest_modifiers (_("Click to move the split guide"),
+                                           (extend_mask | toggle_mask) & ~state,
+                                           _("%s: switch original and filtered"),
+                                           _("%s: switch horizontal and vertical"),
+                                           NULL);
+        }
+
+      if (proximity)
+        gimp_tool_push_status (tool, display, "%s", status);
+
+      g_free (status);
+    }
+}
+
+static void
+gimp_filter_tool_cursor_update (GimpTool         *tool,
+                                const GimpCoords *coords,
+                                GdkModifierType   state,
+                                GimpDisplay      *display)
+{
+  GimpFilterTool *filter_tool = GIMP_FILTER_TOOL (tool);
+
+  if (! gimp_filter_tool_on_guide (filter_tool, coords, display))
+    {
+      GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state,
+                                                     display);
+    }
+  else
+    {
+      gimp_tool_set_cursor (tool, display,
+                            GIMP_CURSOR_MOUSE,
+                            GIMP_TOOL_CURSOR_HAND,
+                            GIMP_CURSOR_MODIFIER_MOVE);
+    }
+}
+
+static void
+gimp_filter_tool_options_notify (GimpTool         *tool,
+                                 GimpToolOptions  *options,
+                                 const GParamSpec *pspec)
+{
+  GimpFilterTool    *filter_tool    = GIMP_FILTER_TOOL (tool);
+  GimpFilterOptions *filter_options = GIMP_FILTER_OPTIONS (options);
+
+  if (! strcmp (pspec->name, "preview") &&
+      filter_tool->image_map)
+    {
+      if (filter_options->preview)
+        {
+          gimp_image_map_apply (filter_tool->image_map, NULL);
+
+          if (filter_options->preview_split)
+            gimp_filter_tool_add_guide (filter_tool);
+        }
+      else
+        {
+          gimp_image_map_abort (filter_tool->image_map);
+
+          if (filter_options->preview_split)
+            gimp_filter_tool_remove_guide (filter_tool);
+        }
+    }
+  else if (! strcmp (pspec->name, "preview-split") &&
+           filter_tool->image_map)
+    {
+      if (filter_options->preview_split)
+        {
+          GimpDisplayShell *shell = gimp_display_get_shell (tool->display);
+          GimpItem         *item  = GIMP_ITEM (filter_tool->drawable);
+          gint              x, y, width, height;
+
+          gimp_display_shell_untransform_viewport (shell,
+                                                   &x, &y, &width, &height);
+
+          if (gimp_rectangle_intersect (gimp_item_get_offset_x (item),
+                                        gimp_item_get_offset_y (item),
+                                        gimp_item_get_width  (item),
+                                        gimp_item_get_height (item),
+                                        x, y, width, height,
+                                        &x, &y, &width, &height))
+            {
+              gdouble position;
+
+              if (filter_options->preview_alignment == GIMP_ALIGN_LEFT ||
+                  filter_options->preview_alignment == GIMP_ALIGN_RIGHT)
+                {
+                  position = ((gdouble) ((x + width / 2) -
+                                         gimp_item_get_offset_x (item)) /
+                              (gdouble) gimp_item_get_width (item));
+                }
+              else
+                {
+                  position = ((gdouble) ((y + height / 2) -
+                                         gimp_item_get_offset_y (item)) /
+                              (gdouble) gimp_item_get_height (item));
+                }
+
+              g_object_set (options,
+                            "preview-position", CLAMP (position, 0.0, 1.0),
+                            NULL);
+
+            }
+        }
+
+      gimp_image_map_set_preview (filter_tool->image_map,
+                                  filter_options->preview_split,
+                                  filter_options->preview_alignment,
+                                  filter_options->preview_position);
+
+      if (filter_options->preview_split)
+        gimp_filter_tool_add_guide (filter_tool);
+      else
+        gimp_filter_tool_remove_guide (filter_tool);
+    }
+  else if (! strcmp (pspec->name, "preview-alignment") &&
+           filter_tool->image_map)
+    {
+      gimp_image_map_set_preview (filter_tool->image_map,
+                                  filter_options->preview_split,
+                                  filter_options->preview_alignment,
+                                  filter_options->preview_position);
+
+      if (filter_options->preview_split)
+        gimp_filter_tool_move_guide (filter_tool);
+    }
+  else if (! strcmp (pspec->name, "preview-position") &&
+           filter_tool->image_map)
+    {
+      gimp_image_map_set_preview (filter_tool->image_map,
+                                  filter_options->preview_split,
+                                  filter_options->preview_alignment,
+                                  filter_options->preview_position);
+
+      if (filter_options->preview_split)
+        gimp_filter_tool_move_guide (filter_tool);
+    }
+  else if (! strcmp (pspec->name, "region") &&
+           filter_tool->image_map)
+    {
+      gimp_image_map_set_region (filter_tool->image_map,
+                                 filter_options->region);
+    }
+}
+
+static gboolean
+gimp_filter_tool_pick_color (GimpColorTool  *color_tool,
+                             gint            x,
+                             gint            y,
+                             const Babl    **sample_format,
+                             gpointer        pixel,
+                             GimpRGB        *color)
+{
+  GimpFilterTool *filter_tool = GIMP_FILTER_TOOL (color_tool);
+  gint            off_x, off_y;
+
+  gimp_item_get_offset (GIMP_ITEM (filter_tool->drawable), &off_x, &off_y);
+
+  *sample_format = gimp_drawable_get_format (filter_tool->drawable);
+
+  return gimp_pickable_pick_color (GIMP_PICKABLE (filter_tool->drawable),
+                                   x - off_x,
+                                   y - off_y,
+                                   color_tool->options->sample_average,
+                                   color_tool->options->average_radius,
+                                   pixel, color);
+}
+
+static void
+gimp_filter_tool_color_picked (GimpColorTool      *color_tool,
+                               GimpColorPickState  pick_state,
+                               gdouble             x,
+                               gdouble             y,
+                               const Babl         *sample_format,
+                               gpointer            pixel,
+                               const GimpRGB      *color)
+{
+  GimpFilterTool *filter_tool = GIMP_FILTER_TOOL (color_tool);
+  gpointer        identifier;
+
+  g_return_if_fail (GTK_IS_WIDGET (filter_tool->active_picker));
+
+  identifier = g_object_get_data (G_OBJECT (filter_tool->active_picker),
+                                  "picker-identifier");
+
+  GIMP_FILTER_TOOL_GET_CLASS (filter_tool)->color_picked (filter_tool,
+                                                         identifier,
+                                                         x, y,
+                                                         sample_format,
+                                                         color);
+}
+
+static void
+gimp_filter_tool_real_reset (GimpFilterTool *filter_tool)
+{
+  if (filter_tool->config)
+    {
+      if (filter_tool->default_config)
+        {
+          gimp_config_copy (GIMP_CONFIG (filter_tool->default_config),
+                            GIMP_CONFIG (filter_tool->config),
+                            0);
+        }
+      else
+        {
+          gimp_config_reset (GIMP_CONFIG (filter_tool->config));
+        }
+    }
+}
+
+static void
+gimp_filter_tool_halt (GimpFilterTool *filter_tool)
+{
+  GimpTool *tool = GIMP_TOOL (filter_tool);
+
+  if (filter_tool->gui)
+    gimp_tool_gui_hide (filter_tool->gui);
+
+  if (filter_tool->image_map)
+    {
+      gimp_image_map_abort (filter_tool->image_map);
+      g_object_unref (filter_tool->image_map);
+      filter_tool->image_map = NULL;
+
+      gimp_filter_tool_remove_guide (filter_tool);
+    }
+
+  tool->drawable = NULL;
+}
+
+static void
+gimp_filter_tool_commit (GimpFilterTool *filter_tool)
+{
+  GimpTool *tool = GIMP_TOOL (filter_tool);
+
+  if (filter_tool->gui)
+    gimp_tool_gui_hide (filter_tool->gui);
+
+  if (filter_tool->image_map)
+    {
+      GimpFilterOptions *options = GIMP_FILTER_TOOL_GET_OPTIONS (tool);
+
+      if (! options->preview)
+        gimp_image_map_apply (filter_tool->image_map, NULL);
+
+      gimp_tool_control_push_preserve (tool->control, TRUE);
+
+      gimp_image_map_commit (filter_tool->image_map, GIMP_PROGRESS (tool), TRUE);
+      g_object_unref (filter_tool->image_map);
+      filter_tool->image_map = NULL;
+
+      gimp_tool_control_pop_preserve (tool->control);
+
+      gimp_filter_tool_remove_guide (filter_tool);
+
+      gimp_image_flush (gimp_display_get_image (tool->display));
+
+      if (filter_tool->config && filter_tool->settings_box)
+        {
+          GimpGuiConfig *config = GIMP_GUI_CONFIG (tool->tool_info->gimp->config);
+
+          gimp_settings_box_add_current (GIMP_SETTINGS_BOX (filter_tool->settings_box),
+                                         config->image_map_tool_max_recent);
+        }
+    }
+
+  tool->display  = NULL;
+  tool->drawable = NULL;
+}
+
+static void
+gimp_filter_tool_dialog (GimpFilterTool *filter_tool)
+{
+  GIMP_FILTER_TOOL_GET_CLASS (filter_tool)->dialog (filter_tool);
+
+  g_signal_connect (gimp_tool_gui_get_dialog (filter_tool->gui), "unmap",
+                    G_CALLBACK (gimp_filter_tool_dialog_unmap),
+                    filter_tool);
+}
+
+static void
+gimp_filter_tool_dialog_unmap (GtkWidget      *dialog,
+                               GimpFilterTool *filter_tool)
+{
+  if (filter_tool->active_picker)
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (filter_tool->active_picker),
+                                  FALSE);
+}
+
+static void
+gimp_filter_tool_reset (GimpFilterTool *filter_tool)
+{
+  if (filter_tool->config)
+    g_object_freeze_notify (filter_tool->config);
+
+  GIMP_FILTER_TOOL_GET_CLASS (filter_tool)->reset (filter_tool);
+
+  if (filter_tool->config)
+    g_object_thaw_notify (filter_tool->config);
+}
+
+static void
+gimp_filter_tool_create_map (GimpFilterTool *filter_tool)
+{
+  GimpFilterOptions *options = GIMP_FILTER_TOOL_GET_OPTIONS (filter_tool);
+
+  if (filter_tool->image_map)
+    {
+      gimp_image_map_abort (filter_tool->image_map);
+      g_object_unref (filter_tool->image_map);
+    }
+
+  g_assert (filter_tool->operation);
+
+  filter_tool->image_map = gimp_image_map_new (filter_tool->drawable,
+                                               filter_tool->undo_desc,
+                                               filter_tool->operation,
+                                               filter_tool->icon_name);
+
+  gimp_image_map_set_region (filter_tool->image_map, options->region);
+
+  g_signal_connect (filter_tool->image_map, "flush",
+                    G_CALLBACK (gimp_filter_tool_flush),
+                    filter_tool);
+
+  gimp_filter_tool_preview (filter_tool);
+}
+
+static void
+gimp_filter_tool_preview (GimpFilterTool *filter_tool)
+{
+  GimpTool          *tool    = GIMP_TOOL (filter_tool);
+  GimpFilterOptions *options = GIMP_FILTER_TOOL_GET_OPTIONS (tool);
+
+  if (filter_tool->image_map && options->preview)
+    {
+      gimp_image_map_apply (filter_tool->image_map, NULL);
+    }
+}
+
+static void
+gimp_filter_tool_flush (GimpImageMap   *image_map,
+                        GimpFilterTool *filter_tool)
+{
+  GimpTool  *tool  = GIMP_TOOL (filter_tool);
+  GimpImage *image = gimp_display_get_image (tool->display);
+
+  gimp_projection_flush (gimp_image_get_projection (image));
+}
+
+static void
+gimp_filter_tool_config_notify (GObject          *object,
+                                const GParamSpec *pspec,
+                                GimpFilterTool   *filter_tool)
+{
+  gimp_filter_tool_preview (filter_tool);
+}
+
+static void
+gimp_filter_tool_add_guide (GimpFilterTool *filter_tool)
+{
+  GimpFilterOptions   *options = GIMP_FILTER_TOOL_GET_OPTIONS (filter_tool);
+  GimpItem            *item;
+  GimpImage           *image;
+  GimpOrientationType  orientation;
+  gint                 position;
+
+  if (filter_tool->percent_guide)
+    return;
+
+  item = GIMP_ITEM (filter_tool->drawable);
+  image = gimp_item_get_image (item);
+
+  if (options->preview_alignment == GIMP_ALIGN_LEFT ||
+      options->preview_alignment == GIMP_ALIGN_RIGHT)
+    {
+      orientation = GIMP_ORIENTATION_VERTICAL;
+
+      position = (gimp_item_get_offset_x (item) +
+                  gimp_item_get_width (item) *
+                  options->preview_position);
+    }
+  else
+    {
+      orientation = GIMP_ORIENTATION_HORIZONTAL;
+
+      position = (gimp_item_get_offset_y (item) +
+                  gimp_item_get_height (item) *
+                  options->preview_position);
+    }
+
+  filter_tool->percent_guide =
+    gimp_guide_custom_new (orientation,
+                           image->gimp->next_guide_ID++,
+                           GIMP_GUIDE_STYLE_SPLIT_VIEW);
+
+  gimp_image_add_guide (image, filter_tool->percent_guide, position);
+
+  g_signal_connect (filter_tool->percent_guide, "removed",
+                    G_CALLBACK (gimp_filter_tool_guide_removed),
+                    filter_tool);
+  g_signal_connect (filter_tool->percent_guide, "notify::position",
+                    G_CALLBACK (gimp_filter_tool_guide_moved),
+                    filter_tool);
+}
+
+static void
+gimp_filter_tool_remove_guide (GimpFilterTool *filter_tool)
+{
+  GimpImage *image;
+
+  if (! filter_tool->percent_guide)
+    return;
+
+  image = gimp_item_get_image (GIMP_ITEM (filter_tool->drawable));
+
+  gimp_image_remove_guide (image, filter_tool->percent_guide, FALSE);
+}
+
+static void
+gimp_filter_tool_move_guide (GimpFilterTool *filter_tool)
+{
+  GimpFilterOptions   *options = GIMP_FILTER_TOOL_GET_OPTIONS (filter_tool);
+  GimpItem            *item;
+  GimpOrientationType  orientation;
+  gint                 position;
+
+  if (! filter_tool->percent_guide)
+    return;
+
+  item = GIMP_ITEM (filter_tool->drawable);
+
+  if (options->preview_alignment == GIMP_ALIGN_LEFT ||
+      options->preview_alignment == GIMP_ALIGN_RIGHT)
+    {
+      orientation = GIMP_ORIENTATION_VERTICAL;
+
+      position = (gimp_item_get_offset_x (item) +
+                  gimp_item_get_width (item) *
+                  options->preview_position);
+    }
+  else
+    {
+      orientation = GIMP_ORIENTATION_HORIZONTAL;
+
+      position = (gimp_item_get_offset_y (item) +
+                  gimp_item_get_height (item) *
+                  options->preview_position);
+    }
+
+  if (orientation != gimp_guide_get_orientation (filter_tool->percent_guide) ||
+      position    != gimp_guide_get_position (filter_tool->percent_guide))
+    {
+      gimp_guide_set_orientation (filter_tool->percent_guide, orientation);
+      gimp_image_move_guide (gimp_item_get_image (item),
+                             filter_tool->percent_guide, position, FALSE);
+    }
+}
+
+static void
+gimp_filter_tool_guide_removed (GimpGuide      *guide,
+                                GimpFilterTool *filter_tool)
+{
+  GimpFilterOptions *options = GIMP_FILTER_TOOL_GET_OPTIONS (filter_tool);
+
+  g_signal_handlers_disconnect_by_func (G_OBJECT (filter_tool->percent_guide),
+                                        gimp_filter_tool_guide_removed,
+                                        filter_tool);
+  g_signal_handlers_disconnect_by_func (G_OBJECT (filter_tool->percent_guide),
+                                        gimp_filter_tool_guide_moved,
+                                        filter_tool);
+
+  g_object_unref (filter_tool->percent_guide);
+  filter_tool->percent_guide = NULL;
+
+  g_object_set (options,
+                "preview-split", FALSE,
+                NULL);
+}
+
+static void
+gimp_filter_tool_guide_moved (GimpGuide        *guide,
+                              const GParamSpec *pspec,
+                              GimpFilterTool   *filter_tool)
+{
+  GimpFilterOptions *options = GIMP_FILTER_TOOL_GET_OPTIONS (filter_tool);
+  GimpItem          *item    = GIMP_ITEM (filter_tool->drawable);
+  gdouble            position;
+
+  if (options->preview_alignment == GIMP_ALIGN_LEFT ||
+      options->preview_alignment == GIMP_ALIGN_RIGHT)
+    {
+      position = ((gdouble) (gimp_guide_get_position (guide) -
+                             gimp_item_get_offset_x (item)) /
+                  (gdouble) gimp_item_get_width (item));
+    }
+  else
+    {
+      position = ((gdouble) (gimp_guide_get_position (guide) -
+                             gimp_item_get_offset_y (item)) /
+                  (gdouble) gimp_item_get_height (item));
+    }
+
+  g_object_set (options,
+                "preview-position", CLAMP (position, 0.0, 1.0),
+                NULL);
+}
+
+static void
+gimp_filter_tool_response (GimpToolGui    *gui,
+                           gint            response_id,
+                           GimpFilterTool *filter_tool)
+{
+  GimpTool *tool = GIMP_TOOL (filter_tool);
+
+  switch (response_id)
+    {
+    case RESPONSE_RESET:
+      gimp_filter_tool_reset (filter_tool);
+      break;
+
+    case GTK_RESPONSE_OK:
+      gimp_tool_control (tool, GIMP_TOOL_ACTION_COMMIT, tool->display);
+      break;
+
+    default:
+      gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, tool->display);
+      break;
+    }
+}
+
+
+/*  public functions  */
+
+void
+gimp_filter_tool_get_operation (GimpFilterTool *filter_tool)
+{
+  GimpFilterToolClass *klass;
+  GimpToolInfo        *tool_info;
+  gchar               *operation_name;
+
+  g_return_if_fail (GIMP_IS_FILTER_TOOL (filter_tool));
+
+  klass = GIMP_FILTER_TOOL_GET_CLASS (filter_tool);
+
+  tool_info = GIMP_TOOL (filter_tool)->tool_info;
+
+  if (filter_tool->image_map)
+    {
+      gimp_image_map_abort (filter_tool->image_map);
+      g_object_unref (filter_tool->image_map);
+      filter_tool->image_map = NULL;
+    }
+
+  if (filter_tool->operation)
+    {
+      g_object_unref (filter_tool->operation);
+      filter_tool->operation = NULL;
+    }
+
+  if (filter_tool->config)
+    {
+      g_signal_handlers_disconnect_by_func (filter_tool->config,
+                                            gimp_filter_tool_config_notify,
+                                            filter_tool);
+
+      g_object_unref (filter_tool->config);
+      filter_tool->config = NULL;
+    }
+
+  if (filter_tool->default_config)
+    {
+      g_object_unref (filter_tool->default_config);
+      filter_tool->default_config = NULL;
+    }
+
+  if (filter_tool->title)
+    {
+      g_free (filter_tool->title);
+      filter_tool->title = NULL;
+    }
+
+  if (filter_tool->description)
+    {
+      g_free (filter_tool->description);
+      filter_tool->description = NULL;
+    }
+
+  if (filter_tool->undo_desc)
+    {
+      g_free (filter_tool->undo_desc);
+      filter_tool->undo_desc = NULL;
+    }
+
+  if (filter_tool->icon_name)
+    {
+      g_free (filter_tool->icon_name);
+      filter_tool->icon_name = NULL;
+    }
+
+  if (filter_tool->help_id)
+    {
+      g_free (filter_tool->help_id);
+      filter_tool->help_id = NULL;
+    }
+
+  operation_name = klass->get_operation (filter_tool,
+                                         &filter_tool->title,
+                                         &filter_tool->description,
+                                         &filter_tool->undo_desc,
+                                         &filter_tool->icon_name,
+                                         &filter_tool->help_id);
+
+  if (! operation_name)
+    operation_name = g_strdup ("gegl:nop");
+
+  if (! filter_tool->title)
+    filter_tool->title = g_strdup (tool_info->blurb);
+
+  if (! filter_tool->description)
+    filter_tool->description = g_strdup (filter_tool->title);
+
+  if (! filter_tool->undo_desc)
+    filter_tool->undo_desc = g_strdup (tool_info->blurb);
+
+  if (! filter_tool->icon_name)
+    filter_tool->icon_name =
+      g_strdup (gimp_viewable_get_icon_name (GIMP_VIEWABLE (tool_info)));
+
+  if (! filter_tool->help_id)
+    filter_tool->help_id = g_strdup (tool_info->help_id);
+
+  filter_tool->operation = gegl_node_new_child (NULL,
+                                                "operation", operation_name,
+                                                NULL);
+  filter_tool->config = G_OBJECT (gimp_gegl_config_new (operation_name,
+                                                        filter_tool->icon_name,
+                                                        GIMP_TYPE_SETTINGS));
+
+  gimp_gegl_config_sync_node (GIMP_OBJECT (filter_tool->config),
+                              filter_tool->operation);
+  gimp_gegl_config_connect_node (GIMP_OBJECT (filter_tool->config),
+                                 filter_tool->operation);
+
+  if (filter_tool->gui)
+    {
+      gimp_tool_gui_set_title       (filter_tool->gui, filter_tool->title);
+      gimp_tool_gui_set_description (filter_tool->gui, filter_tool->description);
+      gimp_tool_gui_set_icon_name   (filter_tool->gui, filter_tool->icon_name);
+      gimp_tool_gui_set_help_id     (filter_tool->gui, filter_tool->help_id);
+    }
+
+  if (gegl_operation_get_key (operation_name, "position-dependent"))
+    {
+      if (filter_tool->gui)
+        gtk_widget_show (filter_tool->region_combo);
+    }
+  else
+    {
+      if (filter_tool->gui)
+        gtk_widget_hide (filter_tool->region_combo);
+
+      g_object_set (GIMP_FILTER_TOOL_GET_OPTIONS (filter_tool),
+                    "region", GIMP_IMAGE_MAP_REGION_SELECTION,
+                    NULL);
+    }
+
+  g_free (operation_name);
+
+  g_object_set (GIMP_FILTER_TOOL_GET_OPTIONS (filter_tool),
+                "preview-split",    FALSE,
+                "preview-position", 0.5,
+                NULL);
+
+  if (filter_tool->config)
+    g_signal_connect_object (filter_tool->config, "notify",
+                             G_CALLBACK (gimp_filter_tool_config_notify),
+                             G_OBJECT (filter_tool), 0);
+
+  if (GIMP_TOOL (filter_tool)->drawable)
+    gimp_filter_tool_create_map (filter_tool);
+}
+
+void
+gimp_filter_tool_edit_as (GimpFilterTool *filter_tool,
+                          const gchar    *new_tool_id,
+                          GimpConfig     *config)
+{
+  GimpDisplay  *display;
+  GimpContext  *user_context;
+  GimpToolInfo *tool_info;
+  GimpTool     *new_tool;
+
+  g_return_if_fail (GIMP_IS_FILTER_TOOL (filter_tool));
+  g_return_if_fail (new_tool_id != NULL);
+  g_return_if_fail (GIMP_IS_CONFIG (config));
+
+  display = GIMP_TOOL (filter_tool)->display;
+
+  user_context = gimp_get_user_context (display->gimp);
+
+  tool_info = (GimpToolInfo *)
+    gimp_container_get_child_by_name (display->gimp->tool_info_list,
+                                      new_tool_id);
+
+  gimp_tool_control (GIMP_TOOL (filter_tool), GIMP_TOOL_ACTION_HALT, display);
+  gimp_context_set_tool (user_context, tool_info);
+  tool_manager_initialize_active (display->gimp, display);
+
+  new_tool = tool_manager_get_active (display->gimp);
+
+  GIMP_FILTER_TOOL (new_tool)->default_config = g_object_ref (config);
+
+  gimp_filter_tool_reset (GIMP_FILTER_TOOL (new_tool));
+}
+
+gboolean
+gimp_filter_tool_on_guide (GimpFilterTool   *filter_tool,
+                           const GimpCoords *coords,
+                           GimpDisplay      *display)
+{
+  GimpDisplayShell *shell;
+
+  g_return_val_if_fail (GIMP_IS_FILTER_TOOL (filter_tool), FALSE);
+  g_return_val_if_fail (coords != NULL, FALSE);
+  g_return_val_if_fail (GIMP_IS_DISPLAY (display), FALSE);
+
+  shell = gimp_display_get_shell (display);
+
+  if (filter_tool->image_map     &&
+      filter_tool->percent_guide &&
+      gimp_display_shell_get_show_guides (shell))
+    {
+      const gint          snap_distance = display->config->snap_distance;
+      GimpOrientationType orientation;
+      gint                position;
+
+      orientation = gimp_guide_get_orientation (filter_tool->percent_guide);
+      position    = gimp_guide_get_position (filter_tool->percent_guide);
+
+      if (orientation == GIMP_ORIENTATION_HORIZONTAL)
+        {
+          if (fabs (coords->y - position) <= FUNSCALEY (shell, snap_distance))
+            return TRUE;
+        }
+      else
+        {
+          if (fabs (coords->x - position) <= FUNSCALEX (shell, snap_distance))
+            return TRUE;
+        }
+    }
+
+  return FALSE;
+}
+
+GtkWidget *
+gimp_filter_tool_dialog_get_vbox (GimpFilterTool *filter_tool)
+{
+  g_return_val_if_fail (GIMP_IS_FILTER_TOOL (filter_tool), NULL);
+
+  return gimp_tool_gui_get_vbox (filter_tool->gui);
+}
+
+static void
+gimp_filter_tool_color_picker_toggled (GtkWidget      *widget,
+                                       GimpFilterTool *filter_tool)
+{
+  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
+    {
+      if (filter_tool->active_picker == widget)
+        return;
+
+      if (filter_tool->active_picker)
+        gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (filter_tool->active_picker),
+                                      FALSE);
+
+      filter_tool->active_picker = widget;
+
+      gimp_color_tool_enable (GIMP_COLOR_TOOL (filter_tool),
+                              GIMP_COLOR_TOOL_GET_OPTIONS (filter_tool));
+    }
+  else if (filter_tool->active_picker == widget)
+    {
+      filter_tool->active_picker = NULL;
+      gimp_color_tool_disable (GIMP_COLOR_TOOL (filter_tool));
+    }
+}
+
+GtkWidget *
+gimp_filter_tool_add_color_picker (GimpFilterTool *filter_tool,
+                                   gpointer        identifier,
+                                   const gchar    *icon_name,
+                                   const gchar    *tooltip)
+{
+  GtkWidget *button;
+  GtkWidget *image;
+
+  g_return_val_if_fail (GIMP_IS_FILTER_TOOL (filter_tool), NULL);
+  g_return_val_if_fail (icon_name != NULL, NULL);
+
+  button = g_object_new (GTK_TYPE_TOGGLE_BUTTON,
+                         "draw-indicator", FALSE,
+                         NULL);
+
+  image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
+  gtk_misc_set_padding (GTK_MISC (image), 2, 2);
+  gtk_container_add (GTK_CONTAINER (button), image);
+  gtk_widget_show (image);
+
+  if (tooltip)
+    gimp_help_set_help_data (button, tooltip, NULL);
+
+  g_object_set_data (G_OBJECT (button), "picker-identifier", identifier);
+
+  g_signal_connect (button, "toggled",
+                    G_CALLBACK (gimp_filter_tool_color_picker_toggled),
+                    filter_tool);
+
+  return button;
+}
diff --git a/app/tools/gimpimagemaptool.h b/app/tools/gimpfiltertool.h
similarity index 54%
rename from app/tools/gimpimagemaptool.h
rename to app/tools/gimpfiltertool.h
index 0c5356a..1fdff17 100644
--- a/app/tools/gimpimagemaptool.h
+++ b/app/tools/gimpfiltertool.h
@@ -15,26 +15,26 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef  __GIMP_IMAGE_MAP_TOOL_H__
-#define  __GIMP_IMAGE_MAP_TOOL_H__
+#ifndef __GIMP_FILTER_TOOL_H__
+#define __GIMP_FILTER_TOOL_H__
 
 
 #include "gimpcolortool.h"
 
 
-#define GIMP_TYPE_IMAGE_MAP_TOOL            (gimp_image_map_tool_get_type ())
-#define GIMP_IMAGE_MAP_TOOL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_IMAGE_MAP_TOOL, 
GimpImageMapTool))
-#define GIMP_IMAGE_MAP_TOOL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_IMAGE_MAP_TOOL, 
GimpImageMapToolClass))
-#define GIMP_IS_IMAGE_MAP_TOOL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_IMAGE_MAP_TOOL))
-#define GIMP_IS_IMAGE_MAP_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_IMAGE_MAP_TOOL))
-#define GIMP_IMAGE_MAP_TOOL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_IMAGE_MAP_TOOL, 
GimpImageMapToolClass))
+#define GIMP_TYPE_FILTER_TOOL            (gimp_filter_tool_get_type ())
+#define GIMP_FILTER_TOOL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_FILTER_TOOL, 
GimpFilterTool))
+#define GIMP_FILTER_TOOL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_FILTER_TOOL, 
GimpFilterToolClass))
+#define GIMP_IS_FILTER_TOOL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_FILTER_TOOL))
+#define GIMP_IS_FILTER_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_FILTER_TOOL))
+#define GIMP_FILTER_TOOL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_FILTER_TOOL, 
GimpFilterToolClass))
 
-#define GIMP_IMAGE_MAP_TOOL_GET_OPTIONS(t)  (GIMP_IMAGE_MAP_OPTIONS (gimp_tool_get_options (GIMP_TOOL (t))))
+#define GIMP_FILTER_TOOL_GET_OPTIONS(t)  (GIMP_FILTER_OPTIONS (gimp_tool_get_options (GIMP_TOOL (t))))
 
 
-typedef struct _GimpImageMapToolClass GimpImageMapToolClass;
+typedef struct _GimpFilterToolClass GimpFilterToolClass;
 
-struct _GimpImageMapTool
+struct _GimpFilterTool
 {
   GimpColorTool          parent_instance;
 
@@ -62,7 +62,7 @@ struct _GimpImageMapTool
   GtkWidget             *active_picker;
 };
 
-struct _GimpImageMapToolClass
+struct _GimpFilterToolClass
 {
   GimpColorToolClass  parent_class;
 
@@ -71,16 +71,16 @@ struct _GimpImageMapToolClass
   const gchar        *export_dialog_title;
 
   /* virtual functions */
-  gchar     * (* get_operation)   (GimpImageMapTool  *im_tool,
+  gchar     * (* get_operation)   (GimpFilterTool    *filter_tool,
                                    gchar            **title,
                                    gchar            **description,
                                    gchar            **undo_desc,
                                    gchar            **icon_name,
                                    gchar            **help_id);
-  void        (* dialog)          (GimpImageMapTool  *image_map_tool);
-  void        (* reset)           (GimpImageMapTool  *image_map_tool);
+  void        (* dialog)          (GimpFilterTool    *filter_tool);
+  void        (* reset)           (GimpFilterTool    *filter_tool);
 
-  GtkWidget * (* get_settings_ui) (GimpImageMapTool  *im_tool,
+  GtkWidget * (* get_settings_ui) (GimpFilterTool    *filter_tool,
                                    GimpContainer     *settings,
                                    GFile             *settings_file,
                                    const gchar       *import_dialog_title,
@@ -89,14 +89,14 @@ struct _GimpImageMapToolClass
                                    GFile             *default_folder,
                                    GtkWidget        **settings_box);
 
-  gboolean    (* settings_import) (GimpImageMapTool  *im_tool,
+  gboolean    (* settings_import) (GimpFilterTool    *filter_tool,
                                    GInputStream      *input,
                                    GError           **error);
-  gboolean    (* settings_export) (GimpImageMapTool  *im_tool,
+  gboolean    (* settings_export) (GimpFilterTool    *filter_tool,
                                    GOutputStream     *output,
                                    GError           **error);
 
-  void        (* color_picked)    (GimpImageMapTool  *im_tool,
+  void        (* color_picked)    (GimpFilterTool    *filter_tool,
                                    gpointer           identifier,
                                    gdouble            x,
                                    gdouble            y,
@@ -105,24 +105,24 @@ struct _GimpImageMapToolClass
 };
 
 
-GType       gimp_image_map_tool_get_type         (void) G_GNUC_CONST;
+GType       gimp_filter_tool_get_type         (void) G_GNUC_CONST;
 
-void        gimp_image_map_tool_get_operation    (GimpImageMapTool *im_tool);
+void        gimp_filter_tool_get_operation    (GimpFilterTool   *filter_tool);
 
-void        gimp_image_map_tool_edit_as          (GimpImageMapTool *im_tool,
-                                                  const gchar      *new_tool_id,
-                                                  GimpConfig       *config);
+void        gimp_filter_tool_edit_as          (GimpFilterTool   *filter_tool,
+                                               const gchar      *new_tool_id,
+                                               GimpConfig       *config);
 
-gboolean    gimp_image_map_tool_on_guide         (GimpImageMapTool *im_tool,
-                                                  const GimpCoords *coords,
-                                                  GimpDisplay      *display);
+gboolean    gimp_filter_tool_on_guide         (GimpFilterTool   *filter_tool,
+                                               const GimpCoords *coords,
+                                               GimpDisplay      *display);
 
-GtkWidget * gimp_image_map_tool_dialog_get_vbox  (GimpImageMapTool *im_tool);
+GtkWidget * gimp_filter_tool_dialog_get_vbox  (GimpFilterTool   *filter_tool);
 
-GtkWidget * gimp_image_map_tool_add_color_picker (GimpImageMapTool *im_tool,
-                                                  gpointer          identifier,
-                                                  const gchar      *icon_name,
-                                                  const gchar      *tooltip);
+GtkWidget * gimp_filter_tool_add_color_picker (GimpFilterTool   *filter_tool,
+                                               gpointer          identifier,
+                                               const gchar      *icon_name,
+                                               const gchar      *tooltip);
 
 
-#endif  /*  __GIMP_IMAGE_MAP_TOOL_H__  */
+#endif /* __GIMP_FILTER_TOOL_H__ */
diff --git a/app/tools/gimpgegltool.c b/app/tools/gimpgegltool.c
index 8df7edc..21963ea 100644
--- a/app/tools/gimpgegltool.c
+++ b/app/tools/gimpgegltool.c
@@ -49,10 +49,10 @@ enum
 
 /*  local function prototypes  */
 
-static void   gimp_gegl_tool_dialog            (GimpImageMapTool *im_tool);
+static void   gimp_gegl_tool_dialog            (GimpFilterTool *filter_tool);
 
-static void   gimp_gegl_tool_operation_changed (GtkWidget        *widget,
-                                                GimpGeglTool     *tool);
+static void   gimp_gegl_tool_operation_changed (GtkWidget      *widget,
+                                                GimpGeglTool   *tool);
 
 
 G_DEFINE_TYPE (GimpGeglTool, gimp_gegl_tool, GIMP_TYPE_OPERATION_TOOL)
@@ -80,9 +80,9 @@ gimp_gegl_tool_register (GimpToolRegisterCallback  callback,
 static void
 gimp_gegl_tool_class_init (GimpGeglToolClass *klass)
 {
-  GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
+  GimpFilterToolClass *filter_tool_class = GIMP_FILTER_TOOL_CLASS (klass);
 
-  im_tool_class->dialog = gimp_gegl_tool_dialog;
+  filter_tool_class->dialog = gimp_gegl_tool_dialog;
 }
 
 static void
@@ -326,10 +326,10 @@ gimp_get_geglopclasses (void)
 /*****************/
 
 static void
-gimp_gegl_tool_dialog (GimpImageMapTool *image_map_tool)
+gimp_gegl_tool_dialog (GimpFilterTool *filter_tool)
 {
-  GimpGeglTool      *tool   = GIMP_GEGL_TOOL (image_map_tool);
-  GimpOperationTool *o_tool = GIMP_OPERATION_TOOL (image_map_tool);
+  GimpGeglTool      *tool   = GIMP_GEGL_TOOL (filter_tool);
+  GimpOperationTool *o_tool = GIMP_OPERATION_TOOL (filter_tool);
   GtkListStore      *store;
   GtkCellRenderer   *cell;
   GtkWidget         *main_vbox;
@@ -338,9 +338,9 @@ gimp_gegl_tool_dialog (GimpImageMapTool *image_map_tool)
   GList             *opclasses;
   GList             *iter;
 
-  GIMP_IMAGE_MAP_TOOL_CLASS (parent_class)->dialog (image_map_tool);
+  GIMP_FILTER_TOOL_CLASS (parent_class)->dialog (filter_tool);
 
-  main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
+  main_vbox = gimp_filter_tool_dialog_get_vbox (filter_tool);
 
   /*  The operation combo box  */
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
diff --git a/app/tools/gimphuesaturationtool.c b/app/tools/gimphuesaturationtool.c
index eb60fa8..b9382ce 100644
--- a/app/tools/gimphuesaturationtool.c
+++ b/app/tools/gimphuesaturationtool.c
@@ -40,8 +40,8 @@
 
 #include "display/gimpdisplay.h"
 
+#include "gimpfilteroptions.h"
 #include "gimphuesaturationtool.h"
-#include "gimpimagemapoptions.h"
 
 #include "gimp-intl.h"
 
@@ -52,20 +52,20 @@
 
 /*  local function prototypes  */
 
-static void       gimp_hue_saturation_tool_constructed   (GObject          *object);
+static void       gimp_hue_saturation_tool_constructed   (GObject         *object);
 
-static gboolean   gimp_hue_saturation_tool_initialize    (GimpTool         *tool,
-                                                          GimpDisplay      *display,
-                                                          GError          **error);
+static gboolean   gimp_hue_saturation_tool_initialize    (GimpTool        *tool,
+                                                          GimpDisplay     *display,
+                                                          GError         **error);
 
-static gchar    * gimp_hue_saturation_tool_get_operation (GimpImageMapTool *im_tool,
-                                                          gchar           **title,
-                                                          gchar           **description,
-                                                          gchar           **undo_desc,
-                                                          gchar           **icon_name,
-                                                          gchar           **help_id);
-static void       gimp_hue_saturation_tool_dialog        (GimpImageMapTool *im_tool);
-static void       gimp_hue_saturation_tool_reset         (GimpImageMapTool *im_tool);
+static gchar    * gimp_hue_saturation_tool_get_operation (GimpFilterTool  *filter_tool,
+                                                          gchar          **title,
+                                                          gchar          **description,
+                                                          gchar          **undo_desc,
+                                                          gchar          **icon_name,
+                                                          gchar          **help_id);
+static void       gimp_hue_saturation_tool_dialog        (GimpFilterTool  *filter_tool);
+static void       gimp_hue_saturation_tool_reset         (GimpFilterTool  *filter_tool);
 
 static void       hue_saturation_config_notify           (GObject               *object,
                                                           GParamSpec            *pspec,
@@ -74,13 +74,13 @@ static void       hue_saturation_config_notify           (GObject
 static void       hue_saturation_update_color_areas      (GimpHueSaturationTool *hs_tool);
 
 static void       hue_saturation_range_callback          (GtkWidget             *widget,
-                                                          GimpImageMapTool      *im_tool);
+                                                          GimpFilterTool        *filter_tool);
 static void       hue_saturation_range_reset_callback    (GtkWidget             *widget,
-                                                          GimpImageMapTool      *hs_tool);
+                                                          GimpFilterTool        *hs_tool);
 
 
 G_DEFINE_TYPE (GimpHueSaturationTool, gimp_hue_saturation_tool,
-               GIMP_TYPE_IMAGE_MAP_TOOL)
+               GIMP_TYPE_FILTER_TOOL)
 
 #define parent_class gimp_hue_saturation_tool_parent_class
 
@@ -90,7 +90,7 @@ gimp_hue_saturation_tool_register (GimpToolRegisterCallback  callback,
                                    gpointer                  data)
 {
   (* callback) (GIMP_TYPE_HUE_SATURATION_TOOL,
-                GIMP_TYPE_IMAGE_MAP_OPTIONS, NULL,
+                GIMP_TYPE_FILTER_OPTIONS, NULL,
                 0,
                 "gimp-hue-saturation-tool",
                 _("Hue-Saturation"),
@@ -104,21 +104,21 @@ gimp_hue_saturation_tool_register (GimpToolRegisterCallback  callback,
 static void
 gimp_hue_saturation_tool_class_init (GimpHueSaturationToolClass *klass)
 {
-  GObjectClass          *object_class  = G_OBJECT_CLASS (klass);
-  GimpToolClass         *tool_class    = GIMP_TOOL_CLASS (klass);
-  GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
+  GObjectClass        *object_class      = G_OBJECT_CLASS (klass);
+  GimpToolClass       *tool_class        = GIMP_TOOL_CLASS (klass);
+  GimpFilterToolClass *filter_tool_class = GIMP_FILTER_TOOL_CLASS (klass);
 
-  object_class->constructed          = gimp_hue_saturation_tool_constructed;
+  object_class->constructed              = gimp_hue_saturation_tool_constructed;
 
-  tool_class->initialize             = gimp_hue_saturation_tool_initialize;
+  tool_class->initialize                 = gimp_hue_saturation_tool_initialize;
 
-  im_tool_class->settings_name       = "hue-saturation";
-  im_tool_class->import_dialog_title = _("Import Hue-Saturation Settings");
-  im_tool_class->export_dialog_title = _("Export Hue-Saturation Settings");
+  filter_tool_class->settings_name       = "hue-saturation";
+  filter_tool_class->import_dialog_title = _("Import Hue-Saturation Settings");
+  filter_tool_class->export_dialog_title = _("Export Hue-Saturation Settings");
 
-  im_tool_class->get_operation       = gimp_hue_saturation_tool_get_operation;
-  im_tool_class->dialog              = gimp_hue_saturation_tool_dialog;
-  im_tool_class->reset               = gimp_hue_saturation_tool_reset;
+  filter_tool_class->get_operation       = gimp_hue_saturation_tool_get_operation;
+  filter_tool_class->dialog              = gimp_hue_saturation_tool_dialog;
+  filter_tool_class->reset               = gimp_hue_saturation_tool_reset;
 }
 
 static void
@@ -131,7 +131,7 @@ gimp_hue_saturation_tool_constructed (GObject *object)
 {
   G_OBJECT_CLASS (parent_class)->constructed (object);
 
-  g_signal_connect_object (GIMP_IMAGE_MAP_TOOL (object)->config, "notify",
+  g_signal_connect_object (GIMP_FILTER_TOOL (object)->config, "notify",
                            G_CALLBACK (hue_saturation_config_notify),
                            object, 0);
 }
@@ -158,12 +158,12 @@ gimp_hue_saturation_tool_initialize (GimpTool     *tool,
 }
 
 static gchar *
-gimp_hue_saturation_tool_get_operation (GimpImageMapTool  *im_tool,
-                                        gchar            **title,
-                                        gchar            **description,
-                                        gchar            **undo_desc,
-                                        gchar            **icon_name,
-                                        gchar            **help_id)
+gimp_hue_saturation_tool_get_operation (GimpFilterTool  *filter_tool,
+                                        gchar          **title,
+                                        gchar          **description,
+                                        gchar          **undo_desc,
+                                        gchar          **icon_name,
+                                        gchar          **help_id)
 {
   *description = g_strdup (_("Adjust Hue / Lightness / Saturation"));
 
@@ -176,10 +176,10 @@ gimp_hue_saturation_tool_get_operation (GimpImageMapTool  *im_tool,
 /***************************/
 
 static void
-gimp_hue_saturation_tool_dialog (GimpImageMapTool *im_tool)
+gimp_hue_saturation_tool_dialog (GimpFilterTool *filter_tool)
 {
-  GimpHueSaturationTool   *hs_tool = GIMP_HUE_SATURATION_TOOL (im_tool);
-  GimpHueSaturationConfig *config  = GIMP_HUE_SATURATION_CONFIG (im_tool->config);
+  GimpHueSaturationTool   *hs_tool = GIMP_HUE_SATURATION_TOOL (filter_tool);
+  GimpHueSaturationConfig *config  = GIMP_HUE_SATURATION_CONFIG (filter_tool->config);
   GtkWidget               *main_vbox;
   GtkWidget               *frame;
   GtkWidget               *vbox;
@@ -211,7 +211,7 @@ gimp_hue_saturation_tool_dialog (GimpImageMapTool *im_tool)
     { N_("_M"),      N_("Magenta"),           3, 2, 4, 2 }
   };
 
-  main_vbox = gimp_image_map_tool_dialog_get_vbox (im_tool);
+  main_vbox = gimp_filter_tool_dialog_get_vbox (filter_tool);
 
   frame = gimp_frame_new (_("Select Primary Color to Adjust"));
   gtk_box_pack_start (GTK_BOX (main_vbox), frame, TRUE, TRUE, 0);
@@ -293,7 +293,7 @@ gimp_hue_saturation_tool_dialog (GimpImageMapTool *im_tool)
   gtk_widget_show (table);
 
   /* Create the 'Overlap' option slider */
-  scale = gimp_prop_spin_scale_new (im_tool->config, "overlap",
+  scale = gimp_prop_spin_scale_new (filter_tool->config, "overlap",
                                     _("_Overlap"), 0.01, 0.1, 0);
   gimp_prop_widget_set_factor (scale, 100.0, 0.0, 0.0, 1);
   gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
@@ -308,21 +308,21 @@ gimp_hue_saturation_tool_dialog (GimpImageMapTool *im_tool)
   gtk_widget_show (vbox);
 
   /*  Create the hue scale widget  */
-  scale = gimp_prop_spin_scale_new (im_tool->config, "hue",
+  scale = gimp_prop_spin_scale_new (filter_tool->config, "hue",
                                     _("_Hue"), 1.0 / 180.0, 15.0 / 180.0, 0);
   gimp_prop_widget_set_factor (scale, 180.0, 0.0, 0.0, 1);
   gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
   gtk_widget_show (scale);
 
   /*  Create the lightness scale widget  */
-  scale = gimp_prop_spin_scale_new (im_tool->config, "lightness",
+  scale = gimp_prop_spin_scale_new (filter_tool->config, "lightness",
                                     _("_Lightness"), 0.01, 0.1, 0);
   gimp_prop_widget_set_factor (scale, 100.0, 0.0, 0.0, 1);
   gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
   gtk_widget_show (scale);
 
   /*  Create the saturation scale widget  */
-  scale = gimp_prop_spin_scale_new (im_tool->config, "saturation",
+  scale = gimp_prop_spin_scale_new (filter_tool->config, "saturation",
                                     _("_Saturation"), 0.01, 0.1, 0);
   gimp_prop_widget_set_factor (scale, 100.0, 0.0, 0.0, 1);
   gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
@@ -347,32 +347,32 @@ gimp_hue_saturation_tool_dialog (GimpImageMapTool *im_tool)
 }
 
 static void
-gimp_hue_saturation_tool_reset (GimpImageMapTool *im_tool)
+gimp_hue_saturation_tool_reset (GimpFilterTool *filter_tool)
 {
   GimpHueRange range;
 
-  g_object_freeze_notify (im_tool->config);
+  g_object_freeze_notify (filter_tool->config);
 
-  g_object_get (im_tool->config,
+  g_object_get (filter_tool->config,
                 "range", &range,
                 NULL);
 
-  if (im_tool->default_config)
+  if (filter_tool->default_config)
     {
-      gimp_config_copy (GIMP_CONFIG (im_tool->default_config),
-                        GIMP_CONFIG (im_tool->config),
+      gimp_config_copy (GIMP_CONFIG (filter_tool->default_config),
+                        GIMP_CONFIG (filter_tool->config),
                         0);
     }
   else
     {
-      gimp_config_reset (GIMP_CONFIG (im_tool->config));
+      gimp_config_reset (GIMP_CONFIG (filter_tool->config));
     }
 
-  g_object_set (im_tool->config,
+  g_object_set (filter_tool->config,
                 "range", range,
                 NULL);
 
-  g_object_thaw_notify (im_tool->config);
+  g_object_thaw_notify (filter_tool->config);
 }
 
 static void
@@ -407,8 +407,8 @@ hue_saturation_update_color_areas (GimpHueSaturationTool *hs_tool)
     { 1.0,   0, 1.0, }
   };
 
-  GimpImageMapTool        *im_tool = GIMP_IMAGE_MAP_TOOL (hs_tool);
-  GimpHueSaturationConfig *config  = GIMP_HUE_SATURATION_CONFIG (im_tool->config);
+  GimpFilterTool          *filter_tool = GIMP_FILTER_TOOL (hs_tool);
+  GimpHueSaturationConfig *config      = GIMP_HUE_SATURATION_CONFIG (filter_tool->config);
   gint                     i;
 
   for (i = 0; i < 6; i++)
@@ -424,23 +424,23 @@ hue_saturation_update_color_areas (GimpHueSaturationTool *hs_tool)
 }
 
 static void
-hue_saturation_range_callback (GtkWidget        *widget,
-                               GimpImageMapTool *im_tool)
+hue_saturation_range_callback (GtkWidget      *widget,
+                               GimpFilterTool *filter_tool)
 {
   if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
     {
       GimpHueRange range;
 
       gimp_radio_button_update (widget, &range);
-      g_object_set (im_tool->config,
+      g_object_set (filter_tool->config,
                     "range", range,
                     NULL);
     }
 }
 
 static void
-hue_saturation_range_reset_callback (GtkWidget        *widget,
-                                     GimpImageMapTool *im_tool)
+hue_saturation_range_reset_callback (GtkWidget      *widget,
+                                     GimpFilterTool *filter_tool)
 {
-  gimp_hue_saturation_config_reset_range (GIMP_HUE_SATURATION_CONFIG (im_tool->config));
+  gimp_hue_saturation_config_reset_range (GIMP_HUE_SATURATION_CONFIG (filter_tool->config));
 }
diff --git a/app/tools/gimphuesaturationtool.h b/app/tools/gimphuesaturationtool.h
index 9cbf90f..a30d8fa 100644
--- a/app/tools/gimphuesaturationtool.h
+++ b/app/tools/gimphuesaturationtool.h
@@ -19,7 +19,7 @@
 #define __GIMP_HUE_SATURATION_TOOL_H__
 
 
-#include "gimpimagemaptool.h"
+#include "gimpfiltertool.h"
 
 
 #define GIMP_TYPE_HUE_SATURATION_TOOL            (gimp_hue_saturation_tool_get_type ())
@@ -35,16 +35,16 @@ typedef struct _GimpHueSaturationToolClass GimpHueSaturationToolClass;
 
 struct _GimpHueSaturationTool
 {
-  GimpImageMapTool  parent_instance;
+  GimpFilterTool  parent_instance;
 
   /*  dialog  */
-  GtkWidget        *range_radio;
-  GtkWidget        *hue_range_color_area[6];
+  GtkWidget      *range_radio;
+  GtkWidget      *hue_range_color_area[6];
 };
 
 struct _GimpHueSaturationToolClass
 {
-  GimpImageMapToolClass  parent_class;
+  GimpFilterToolClass  parent_class;
 };
 
 
diff --git a/app/tools/gimplevelstool.c b/app/tools/gimplevelstool.c
index caab709..0031dc1 100644
--- a/app/tools/gimplevelstool.c
+++ b/app/tools/gimplevelstool.c
@@ -65,62 +65,62 @@
 
 /*  local function prototypes  */
 
-static void       gimp_levels_tool_constructed    (GObject           *object);
-static void       gimp_levels_tool_finalize       (GObject           *object);
-
-static gboolean   gimp_levels_tool_initialize     (GimpTool          *tool,
-                                                   GimpDisplay       *display,
-                                                   GError           **error);
-
-static gchar    * gimp_levels_tool_get_operation  (GimpImageMapTool  *im_tool,
-                                                   gchar            **title,
-                                                   gchar            **description,
-                                                   gchar            **undo_desc,
-                                                   gchar            **icon_name,
-                                                   gchar            **help_id);
-static void       gimp_levels_tool_dialog         (GimpImageMapTool  *im_tool);
-static void       gimp_levels_tool_reset          (GimpImageMapTool  *im_tool);
-static gboolean   gimp_levels_tool_settings_import(GimpImageMapTool  *im_tool,
-                                                   GInputStream      *input,
-                                                   GError           **error);
-static gboolean   gimp_levels_tool_settings_export(GimpImageMapTool  *im_tool,
-                                                   GOutputStream     *output,
-                                                   GError           **error);
-static void       gimp_levels_tool_color_picked   (GimpImageMapTool  *im_tool,
-                                                   gpointer           identifier,
-                                                   gdouble            x,
-                                                   gdouble            y,
-                                                   const Babl        *sample_format,
-                                                   const GimpRGB     *color);
-
-static void       gimp_levels_tool_export_setup   (GimpSettingsBox   *settings_box,
+static void       gimp_levels_tool_constructed    (GObject          *object);
+static void       gimp_levels_tool_finalize       (GObject          *object);
+
+static gboolean   gimp_levels_tool_initialize     (GimpTool         *tool,
+                                                   GimpDisplay      *display,
+                                                   GError          **error);
+
+static gchar    * gimp_levels_tool_get_operation  (GimpFilterTool   *filter_tool,
+                                                   gchar           **title,
+                                                   gchar           **description,
+                                                   gchar           **undo_desc,
+                                                   gchar           **icon_name,
+                                                   gchar           **help_id);
+static void       gimp_levels_tool_dialog         (GimpFilterTool   *filter_tool);
+static void       gimp_levels_tool_reset          (GimpFilterTool   *filter_tool);
+static gboolean   gimp_levels_tool_settings_import(GimpFilterTool   *filter_tool,
+                                                   GInputStream     *input,
+                                                   GError          **error);
+static gboolean   gimp_levels_tool_settings_export(GimpFilterTool   *filter_tool,
+                                                   GOutputStream    *output,
+                                                   GError          **error);
+static void       gimp_levels_tool_color_picked   (GimpFilterTool   *filter_tool,
+                                                   gpointer          identifier,
+                                                   gdouble           x,
+                                                   gdouble           y,
+                                                   const Babl       *sample_format,
+                                                   const GimpRGB    *color);
+
+static void       gimp_levels_tool_export_setup   (GimpSettingsBox  *settings_box,
                                                    GtkFileChooserDialog *dialog,
-                                                   gboolean           export,
-                                                   GimpLevelsTool    *tool);
-static void       gimp_levels_tool_config_notify  (GObject           *object,
-                                                   GParamSpec        *pspec,
-                                                   GimpLevelsTool    *tool);
+                                                   gboolean          export,
+                                                   GimpLevelsTool   *tool);
+static void       gimp_levels_tool_config_notify  (GObject          *object,
+                                                   GParamSpec       *pspec,
+                                                   GimpLevelsTool   *tool);
 
-static void       levels_update_input_bar         (GimpLevelsTool    *tool);
+static void       levels_update_input_bar         (GimpLevelsTool   *tool);
 
-static void       levels_channel_callback         (GtkWidget         *widget,
-                                                   GimpImageMapTool  *im_tool);
-static void       levels_channel_reset_callback   (GtkWidget         *widget,
-                                                   GimpImageMapTool  *im_tool);
+static void       levels_channel_callback         (GtkWidget        *widget,
+                                                   GimpFilterTool   *filter_tool);
+static void       levels_channel_reset_callback   (GtkWidget        *widget,
+                                                   GimpFilterTool   *filter_tool);
 
-static gboolean   levels_menu_sensitivity         (gint               value,
-                                                   gpointer           data);
+static gboolean   levels_menu_sensitivity         (gint              value,
+                                                   gpointer          data);
 
-static void       levels_stretch_callback         (GtkWidget         *widget,
-                                                   GimpLevelsTool    *tool);
-static void       levels_linear_gamma_changed     (GtkAdjustment     *adjustment,
-                                                   GimpLevelsTool    *tool);
+static void       levels_stretch_callback         (GtkWidget        *widget,
+                                                   GimpLevelsTool   *tool);
+static void       levels_linear_gamma_changed     (GtkAdjustment    *adjustment,
+                                                   GimpLevelsTool   *tool);
 
-static void       levels_to_curves_callback       (GtkWidget         *widget,
-                                                   GimpImageMapTool  *im_tool);
+static void       levels_to_curves_callback       (GtkWidget        *widget,
+                                                   GimpFilterTool   *filter_tool);
 
 
-G_DEFINE_TYPE (GimpLevelsTool, gimp_levels_tool, GIMP_TYPE_IMAGE_MAP_TOOL)
+G_DEFINE_TYPE (GimpLevelsTool, gimp_levels_tool, GIMP_TYPE_FILTER_TOOL)
 
 #define parent_class gimp_levels_tool_parent_class
 
@@ -145,25 +145,25 @@ gimp_levels_tool_register (GimpToolRegisterCallback  callback,
 static void
 gimp_levels_tool_class_init (GimpLevelsToolClass *klass)
 {
-  GObjectClass          *object_class  = G_OBJECT_CLASS (klass);
-  GimpToolClass         *tool_class    = GIMP_TOOL_CLASS (klass);
-  GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
+  GObjectClass        *object_class      = G_OBJECT_CLASS (klass);
+  GimpToolClass       *tool_class        = GIMP_TOOL_CLASS (klass);
+  GimpFilterToolClass *filter_tool_class = GIMP_FILTER_TOOL_CLASS (klass);
 
-  object_class->constructed          = gimp_levels_tool_constructed;
-  object_class->finalize             = gimp_levels_tool_finalize;
+  object_class->constructed              = gimp_levels_tool_constructed;
+  object_class->finalize                 = gimp_levels_tool_finalize;
 
-  tool_class->initialize             = gimp_levels_tool_initialize;
+  tool_class->initialize                 = gimp_levels_tool_initialize;
 
-  im_tool_class->settings_name       = "levels";
-  im_tool_class->import_dialog_title = _("Import Levels");
-  im_tool_class->export_dialog_title = _("Export Levels");
+  filter_tool_class->settings_name       = "levels";
+  filter_tool_class->import_dialog_title = _("Import Levels");
+  filter_tool_class->export_dialog_title = _("Export Levels");
 
-  im_tool_class->get_operation       = gimp_levels_tool_get_operation;
-  im_tool_class->dialog              = gimp_levels_tool_dialog;
-  im_tool_class->reset               = gimp_levels_tool_reset;
-  im_tool_class->settings_import     = gimp_levels_tool_settings_import;
-  im_tool_class->settings_export     = gimp_levels_tool_settings_export;
-  im_tool_class->color_picked        = gimp_levels_tool_color_picked;
+  filter_tool_class->get_operation       = gimp_levels_tool_get_operation;
+  filter_tool_class->dialog              = gimp_levels_tool_dialog;
+  filter_tool_class->reset               = gimp_levels_tool_reset;
+  filter_tool_class->settings_import     = gimp_levels_tool_settings_import;
+  filter_tool_class->settings_export     = gimp_levels_tool_settings_export;
+  filter_tool_class->color_picked        = gimp_levels_tool_color_picked;
 }
 
 static void
@@ -177,7 +177,7 @@ gimp_levels_tool_constructed (GObject *object)
 {
   G_OBJECT_CLASS (parent_class)->constructed (object);
 
-  g_signal_connect_object (GIMP_IMAGE_MAP_TOOL (object)->config, "notify",
+  g_signal_connect_object (GIMP_FILTER_TOOL (object)->config, "notify",
                            G_CALLBACK (gimp_levels_tool_config_notify),
                            object, 0);
 }
@@ -257,12 +257,12 @@ gimp_levels_tool_initialize (GimpTool     *tool,
 }
 
 static gchar *
-gimp_levels_tool_get_operation (GimpImageMapTool  *im_tool,
-                                gchar            **title,
-                                gchar            **description,
-                                gchar            **undo_desc,
-                                gchar            **icon_name,
-                                gchar            **help_id)
+gimp_levels_tool_get_operation (GimpFilterTool  *filter_tool,
+                                gchar          **title,
+                                gchar          **description,
+                                gchar          **undo_desc,
+                                gchar          **icon_name,
+                                gchar          **help_id)
 {
   *description = g_strdup (_("Adjust Color Levels"));
 
@@ -315,18 +315,18 @@ gimp_levels_tool_color_picker_new (GimpLevelsTool *tool,
       return NULL;
     }
 
-  return gimp_image_map_tool_add_color_picker (GIMP_IMAGE_MAP_TOOL (tool),
-                                               GUINT_TO_POINTER (value),
-                                               icon_name,
-                                               help);
+  return gimp_filter_tool_add_color_picker (GIMP_FILTER_TOOL (tool),
+                                            GUINT_TO_POINTER (value),
+                                            icon_name,
+                                            help);
 }
 
 static void
-gimp_levels_tool_dialog (GimpImageMapTool *im_tool)
+gimp_levels_tool_dialog (GimpFilterTool *filter_tool)
 {
-  GimpLevelsTool   *tool         = GIMP_LEVELS_TOOL (im_tool);
-  GimpToolOptions  *tool_options = GIMP_TOOL_GET_OPTIONS (im_tool);
-  GimpLevelsConfig *config       = GIMP_LEVELS_CONFIG (im_tool->config);
+  GimpLevelsTool   *tool         = GIMP_LEVELS_TOOL (filter_tool);
+  GimpToolOptions  *tool_options = GIMP_TOOL_GET_OPTIONS (filter_tool);
+  GimpLevelsConfig *config       = GIMP_LEVELS_CONFIG (filter_tool->config);
   GtkListStore     *store;
   GtkWidget        *main_vbox;
   GtkWidget        *frame_vbox;
@@ -345,11 +345,11 @@ gimp_levels_tool_dialog (GimpImageMapTool *im_tool)
   GtkWidget        *handle_bar;
   gint              border;
 
-  g_signal_connect (im_tool->settings_box, "file-dialog-setup",
+  g_signal_connect (filter_tool->settings_box, "file-dialog-setup",
                     G_CALLBACK (gimp_levels_tool_export_setup),
-                    im_tool);
+                    filter_tool);
 
-  main_vbox = gimp_image_map_tool_dialog_get_vbox (im_tool);
+  main_vbox = gimp_filter_tool_dialog_get_vbox (filter_tool);
 
   /*  The combo box for selecting channels  */
   main_frame = gimp_frame_new (NULL);
@@ -470,7 +470,7 @@ gimp_levels_tool_dialog (GimpImageMapTool *im_tool)
   gtk_widget_show (button);
 
   tool->low_input_spinbutton = spinbutton =
-    gimp_prop_spin_button_new (im_tool->config, "low-input",
+    gimp_prop_spin_button_new (filter_tool->config, "low-input",
                                0.01, 0.1, 1);
   gtk_box_pack_start (GTK_BOX (hbox2), spinbutton, FALSE, FALSE, 0);
   gtk_widget_show (spinbutton);
@@ -480,7 +480,7 @@ gimp_levels_tool_dialog (GimpImageMapTool *im_tool)
                                   tool->low_input);
 
   /*  input gamma spin  */
-  spinbutton = gimp_prop_spin_button_new (im_tool->config, "gamma",
+  spinbutton = gimp_prop_spin_button_new (filter_tool->config, "gamma",
                                           0.01, 0.1, 2);
   gtk_box_pack_start (GTK_BOX (hbox), spinbutton, TRUE, FALSE, 0);
   gimp_help_set_help_data (spinbutton, _("Gamma"), NULL);
@@ -507,7 +507,7 @@ gimp_levels_tool_dialog (GimpImageMapTool *im_tool)
   gtk_box_pack_start (GTK_BOX (hbox2), button, FALSE, FALSE, 0);
   gtk_widget_show (button);
 
-  spinbutton = gimp_prop_spin_button_new (im_tool->config, "high-input",
+  spinbutton = gimp_prop_spin_button_new (filter_tool->config, "high-input",
                                           0.01, 0.1, 1);
   gtk_box_pack_start (GTK_BOX (hbox2), spinbutton, FALSE, FALSE, 0);
   gtk_widget_show (spinbutton);
@@ -556,7 +556,7 @@ gimp_levels_tool_dialog (GimpImageMapTool *im_tool)
 
   /*  low output spin  */
   tool->low_output_spinbutton = spinbutton =
-    gimp_prop_spin_button_new (im_tool->config, "low-output",
+    gimp_prop_spin_button_new (filter_tool->config, "low-output",
                                0.01, 0.1, 1);
   gtk_box_pack_start (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
   gtk_widget_show (spinbutton);
@@ -566,7 +566,7 @@ gimp_levels_tool_dialog (GimpImageMapTool *im_tool)
 
   /*  high output spin  */
   tool->high_output_spinbutton = spinbutton =
-    gimp_prop_spin_button_new (im_tool->config, "high-output",
+    gimp_prop_spin_button_new (filter_tool->config, "high-output",
                                0.01, 0.1, 1);
   gtk_box_pack_end (GTK_BOX (hbox), spinbutton, FALSE, FALSE, 0);
   gtk_widget_show (spinbutton);
@@ -631,27 +631,27 @@ gimp_levels_tool_dialog (GimpImageMapTool *im_tool)
 }
 
 static void
-gimp_levels_tool_reset (GimpImageMapTool *im_tool)
+gimp_levels_tool_reset (GimpFilterTool *filter_tool)
 {
   GimpHistogramChannel channel;
 
-  g_object_get (im_tool->config,
+  g_object_get (filter_tool->config,
                 "channel", &channel,
                 NULL);
 
-  GIMP_IMAGE_MAP_TOOL_CLASS (parent_class)->reset (im_tool);
+  GIMP_FILTER_TOOL_CLASS (parent_class)->reset (filter_tool);
 
-  g_object_set (im_tool->config,
+  g_object_set (filter_tool->config,
                 "channel", channel,
                 NULL);
 }
 
 static gboolean
-gimp_levels_tool_settings_import (GimpImageMapTool  *im_tool,
-                                  GInputStream      *input,
-                                  GError           **error)
+gimp_levels_tool_settings_import (GimpFilterTool  *filter_tool,
+                                  GInputStream    *input,
+                                  GError         **error)
 {
-  GimpLevelsConfig *config = GIMP_LEVELS_CONFIG (im_tool->config);
+  GimpLevelsConfig *config = GIMP_LEVELS_CONFIG (filter_tool->config);
   gchar             header[64];
   gsize             bytes_read;
 
@@ -668,25 +668,25 @@ gimp_levels_tool_settings_import (GimpImageMapTool  *im_tool,
   if (g_str_has_prefix (header, "# GIMP Levels File\n"))
     return gimp_levels_config_load_cruft (config, input, error);
 
-  return GIMP_IMAGE_MAP_TOOL_CLASS (parent_class)->settings_import (im_tool,
-                                                                    input,
-                                                                    error);
+  return GIMP_FILTER_TOOL_CLASS (parent_class)->settings_import (filter_tool,
+                                                                 input,
+                                                                 error);
 }
 
 static gboolean
-gimp_levels_tool_settings_export (GimpImageMapTool  *im_tool,
-                                  GOutputStream     *output,
-                                  GError           **error)
+gimp_levels_tool_settings_export (GimpFilterTool  *filter_tool,
+                                  GOutputStream   *output,
+                                  GError         **error)
 {
-  GimpLevelsTool   *tool   = GIMP_LEVELS_TOOL (im_tool);
-  GimpLevelsConfig *config = GIMP_LEVELS_CONFIG (im_tool->config);
+  GimpLevelsTool   *tool   = GIMP_LEVELS_TOOL (filter_tool);
+  GimpLevelsConfig *config = GIMP_LEVELS_CONFIG (filter_tool->config);
 
   if (tool->export_old_format)
     return gimp_levels_config_save_cruft (config, output, error);
 
-  return GIMP_IMAGE_MAP_TOOL_CLASS (parent_class)->settings_export (im_tool,
-                                                                    output,
-                                                                    error);
+  return GIMP_FILTER_TOOL_CLASS (parent_class)->settings_export (filter_tool,
+                                                                 output,
+                                                                 error);
 }
 
 static void
@@ -712,16 +712,16 @@ levels_input_adjust_by_color (GimpLevelsConfig     *config,
 }
 
 static void
-gimp_levels_tool_color_picked (GimpImageMapTool *color_tool,
-                               gpointer          identifier,
-                               gdouble           x,
-                               gdouble           y,
-                               const Babl       *sample_format,
-                               const GimpRGB    *color)
+gimp_levels_tool_color_picked (GimpFilterTool *color_tool,
+                               gpointer        identifier,
+                               gdouble         x,
+                               gdouble         y,
+                               const Babl     *sample_format,
+                               const GimpRGB  *color)
 {
-  GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (color_tool);
-  GimpLevelsConfig *config  = GIMP_LEVELS_CONFIG (im_tool->config);
-  guint             value   = GPOINTER_TO_UINT (identifier);
+  GimpFilterTool   *filter_tool = GIMP_FILTER_TOOL (color_tool);
+  GimpLevelsConfig *config      = GIMP_LEVELS_CONFIG (filter_tool->config);
+  guint             value       = GPOINTER_TO_UINT (identifier);
 
   if (value & PICK_ALL_CHANNELS &&
       gimp_babl_format_get_base_type (sample_format) == GIMP_RGB)
@@ -827,8 +827,8 @@ gimp_levels_tool_config_notify (GObject        *object,
 static void
 levels_update_input_bar (GimpLevelsTool *tool)
 {
-  GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (tool);
-  GimpLevelsConfig *config  = GIMP_LEVELS_CONFIG (im_tool->config);
+  GimpFilterTool   *filter_tool = GIMP_FILTER_TOOL (tool);
+  GimpLevelsConfig *config      = GIMP_LEVELS_CONFIG (filter_tool->config);
 
   switch (config->channel)
     {
@@ -890,10 +890,10 @@ levels_update_input_bar (GimpLevelsTool *tool)
 }
 
 static void
-levels_channel_callback (GtkWidget        *widget,
-                         GimpImageMapTool *im_tool)
+levels_channel_callback (GtkWidget      *widget,
+                         GimpFilterTool *filter_tool)
 {
-  GimpLevelsConfig *config = GIMP_LEVELS_CONFIG (im_tool->config);
+  GimpLevelsConfig *config = GIMP_LEVELS_CONFIG (filter_tool->config);
   gint              value;
 
   if (gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (widget), &value) &&
@@ -906,10 +906,10 @@ levels_channel_callback (GtkWidget        *widget,
 }
 
 static void
-levels_channel_reset_callback (GtkWidget        *widget,
-                               GimpImageMapTool *im_tool)
+levels_channel_reset_callback (GtkWidget      *widget,
+                               GimpFilterTool *filter_tool)
 {
-  gimp_levels_config_reset_channel (GIMP_LEVELS_CONFIG (im_tool->config));
+  gimp_levels_config_reset_channel (GIMP_LEVELS_CONFIG (filter_tool->config));
 }
 
 static gboolean
@@ -946,11 +946,11 @@ static void
 levels_stretch_callback (GtkWidget      *widget,
                          GimpLevelsTool *tool)
 {
-  GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (tool);
+  GimpFilterTool *filter_tool = GIMP_FILTER_TOOL (tool);
 
-  gimp_levels_config_stretch (GIMP_LEVELS_CONFIG (im_tool->config),
+  gimp_levels_config_stretch (GIMP_LEVELS_CONFIG (filter_tool->config),
                               tool->histogram,
-                              gimp_drawable_is_rgb (im_tool->drawable));
+                              gimp_drawable_is_rgb (filter_tool->drawable));
 }
 
 static void
@@ -977,17 +977,17 @@ levels_linear_gamma_changed (GtkAdjustment  *adjustment,
 }
 
 static void
-levels_to_curves_callback (GtkWidget        *widget,
-                           GimpImageMapTool *im_tool)
+levels_to_curves_callback (GtkWidget      *widget,
+                           GimpFilterTool *filter_tool)
 {
-  GimpLevelsConfig *config = GIMP_LEVELS_CONFIG (im_tool->config);
+  GimpLevelsConfig *config = GIMP_LEVELS_CONFIG (filter_tool->config);
   GimpCurvesConfig *curves;
 
   curves = gimp_levels_config_to_curves_config (config);
 
-  gimp_image_map_tool_edit_as (im_tool,
-                               "gimp-curves-tool",
-                               GIMP_CONFIG (curves));
+  gimp_filter_tool_edit_as (filter_tool,
+                            "gimp-curves-tool",
+                            GIMP_CONFIG (curves));
 
   g_object_unref (curves);
 }
diff --git a/app/tools/gimplevelstool.h b/app/tools/gimplevelstool.h
index 229539b..6d62b24 100644
--- a/app/tools/gimplevelstool.h
+++ b/app/tools/gimplevelstool.h
@@ -19,7 +19,7 @@
 #define __GIMP_LEVELS_TOOL_H__
 
 
-#include "gimpimagemaptool.h"
+#include "gimpfiltertool.h"
 
 
 #define GIMP_TYPE_LEVELS_TOOL            (gimp_levels_tool_get_type ())
@@ -35,34 +35,34 @@ typedef struct _GimpLevelsToolClass GimpLevelsToolClass;
 
 struct _GimpLevelsTool
 {
-  GimpImageMapTool  parent_instance;
+  GimpFilterTool  parent_instance;
 
   /* dialog */
-  GimpHistogram    *histogram;
+  GimpHistogram  *histogram;
 
-  GtkWidget        *channel_menu;
+  GtkWidget      *channel_menu;
 
-  GtkWidget        *histogram_view;
+  GtkWidget      *histogram_view;
 
-  GtkWidget        *input_bar;
-  GtkWidget        *low_input_spinbutton;
-  GtkWidget        *high_input_spinbutton;
-  GtkWidget        *low_output_spinbutton;
-  GtkWidget        *high_output_spinbutton;
-  GtkAdjustment    *low_input;
-  GtkAdjustment    *gamma;
-  GtkAdjustment    *gamma_linear;
-  GtkAdjustment    *high_input;
+  GtkWidget      *input_bar;
+  GtkWidget      *low_input_spinbutton;
+  GtkWidget      *high_input_spinbutton;
+  GtkWidget      *low_output_spinbutton;
+  GtkWidget      *high_output_spinbutton;
+  GtkAdjustment  *low_input;
+  GtkAdjustment  *gamma;
+  GtkAdjustment  *gamma_linear;
+  GtkAdjustment  *high_input;
 
-  GtkWidget        *output_bar;
+  GtkWidget      *output_bar;
 
   /* export dialog */
-  gboolean              export_old_format;
+  gboolean        export_old_format;
 };
 
 struct _GimpLevelsToolClass
 {
-  GimpImageMapToolClass  parent_class;
+  GimpFilterToolClass  parent_class;
 };
 
 
diff --git a/app/tools/gimpoperationtool.c b/app/tools/gimpoperationtool.c
index 87b1aa1..985d4af 100644
--- a/app/tools/gimpoperationtool.c
+++ b/app/tools/gimpoperationtool.c
@@ -80,15 +80,15 @@ static void        gimp_operation_tool_control         (GimpTool          *tool,
                                                         GimpToolAction     action,
                                                         GimpDisplay       *display);
 
-static gchar     * gimp_operation_tool_get_operation   (GimpImageMapTool  *im_tool,
+static gchar     * gimp_operation_tool_get_operation   (GimpFilterTool    *filter_tool,
                                                         gchar            **title,
                                                         gchar            **description,
                                                         gchar            **undo_desc,
                                                         gchar            **icon_name,
                                                         gchar            **help_id);
-static void        gimp_operation_tool_dialog          (GimpImageMapTool  *im_tool);
-static void        gimp_operation_tool_reset           (GimpImageMapTool  *im_tool);
-static GtkWidget * gimp_operation_tool_get_settings_ui (GimpImageMapTool  *im_tool,
+static void        gimp_operation_tool_dialog          (GimpFilterTool    *filter_tool);
+static void        gimp_operation_tool_reset           (GimpFilterTool    *filter_tool);
+static GtkWidget * gimp_operation_tool_get_settings_ui (GimpFilterTool    *filter_tool,
                                                         GimpContainer     *settings,
                                                         GFile             *settings_file,
                                                         const gchar       *import_dialog_title,
@@ -96,7 +96,7 @@ static GtkWidget * gimp_operation_tool_get_settings_ui (GimpImageMapTool  *im_to
                                                         const gchar       *file_dialog_help_id,
                                                         GFile             *default_folder,
                                                         GtkWidget        **settings_box);
-static void        gimp_operation_tool_color_picked    (GimpImageMapTool  *im_tool,
+static void        gimp_operation_tool_color_picked    (GimpFilterTool    *filter_tool,
                                                         gpointer           identifier,
                                                         gdouble            x,
                                                         gdouble            y,
@@ -115,7 +115,7 @@ static void        gimp_operation_tool_aux_input_free  (AuxInput          *input
 
 
 G_DEFINE_TYPE (GimpOperationTool, gimp_operation_tool,
-               GIMP_TYPE_IMAGE_MAP_TOOL)
+               GIMP_TYPE_FILTER_TOOL)
 
 #define parent_class gimp_operation_tool_parent_class
 
@@ -141,26 +141,26 @@ gimp_operation_tool_register (GimpToolRegisterCallback  callback,
 static void
 gimp_operation_tool_class_init (GimpOperationToolClass *klass)
 {
-  GObjectClass          *object_class  = G_OBJECT_CLASS (klass);
-  GimpToolClass         *tool_class    = GIMP_TOOL_CLASS (klass);
-  GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
+  GObjectClass        *object_class      = G_OBJECT_CLASS (klass);
+  GimpToolClass       *tool_class        = GIMP_TOOL_CLASS (klass);
+  GimpFilterToolClass *filter_tool_class = GIMP_FILTER_TOOL_CLASS (klass);
 
-  object_class->finalize         = gimp_operation_tool_finalize;
+  object_class->finalize             = gimp_operation_tool_finalize;
 
-  tool_class->initialize         = gimp_operation_tool_initialize;
-  tool_class->control            = gimp_operation_tool_control;
+  tool_class->initialize             = gimp_operation_tool_initialize;
+  tool_class->control                = gimp_operation_tool_control;
 
-  im_tool_class->get_operation   = gimp_operation_tool_get_operation;
-  im_tool_class->dialog          = gimp_operation_tool_dialog;
-  im_tool_class->reset           = gimp_operation_tool_reset;
-  im_tool_class->get_settings_ui = gimp_operation_tool_get_settings_ui;
-  im_tool_class->color_picked    = gimp_operation_tool_color_picked;
+  filter_tool_class->get_operation   = gimp_operation_tool_get_operation;
+  filter_tool_class->dialog          = gimp_operation_tool_dialog;
+  filter_tool_class->reset           = gimp_operation_tool_reset;
+  filter_tool_class->get_settings_ui = gimp_operation_tool_get_settings_ui;
+  filter_tool_class->color_picked    = gimp_operation_tool_color_picked;
 }
 
 static void
 gimp_operation_tool_init (GimpOperationTool *tool)
 {
-  GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool)->settings_name = NULL; /* XXX hack */
+  GIMP_FILTER_TOOL_GET_CLASS (tool)->settings_name = NULL; /* XXX hack */
 }
 
 static void
@@ -218,12 +218,12 @@ gimp_operation_tool_initialize (GimpTool     *tool,
 {
   if (GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error))
     {
-      GimpImageMapTool  *im_tool  = GIMP_IMAGE_MAP_TOOL (tool);
-      GimpOperationTool *op_tool  = GIMP_OPERATION_TOOL (tool);
-      GimpImage         *image    = gimp_display_get_image (display);
-      GimpDrawable      *drawable = gimp_image_get_active_drawable (image);
+      GimpFilterTool    *filter_tool = GIMP_FILTER_TOOL (tool);
+      GimpOperationTool *op_tool     = GIMP_OPERATION_TOOL (tool);
+      GimpImage         *image       = gimp_display_get_image (display);
+      GimpDrawable      *drawable    = gimp_image_get_active_drawable (image);
 
-      if (im_tool->config)
+      if (filter_tool->config)
         gimp_operation_tool_sync_op (op_tool, drawable);
 
       return TRUE;
@@ -258,14 +258,14 @@ gimp_operation_tool_control (GimpTool       *tool,
 }
 
 static gchar *
-gimp_operation_tool_get_operation (GimpImageMapTool  *im_tool,
-                                   gchar            **title,
-                                   gchar            **description,
-                                   gchar            **undo_desc,
-                                   gchar            **icon_name,
-                                   gchar            **help_id)
+gimp_operation_tool_get_operation (GimpFilterTool  *filter_tool,
+                                   gchar          **title,
+                                   gchar          **description,
+                                   gchar          **undo_desc,
+                                   gchar          **icon_name,
+                                   gchar          **help_id)
 {
-  GimpOperationTool *tool = GIMP_OPERATION_TOOL (im_tool);
+  GimpOperationTool *tool = GIMP_OPERATION_TOOL (filter_tool);
 
   *title       = g_strdup (tool->title);
   *description = g_strdup (tool->description);
@@ -277,13 +277,13 @@ gimp_operation_tool_get_operation (GimpImageMapTool  *im_tool,
 }
 
 static void
-gimp_operation_tool_dialog (GimpImageMapTool *im_tool)
+gimp_operation_tool_dialog (GimpFilterTool *filter_tool)
 {
-  GimpOperationTool *tool = GIMP_OPERATION_TOOL (im_tool);
+  GimpOperationTool *tool = GIMP_OPERATION_TOOL (filter_tool);
   GtkWidget         *main_vbox;
   GList             *list;
 
-  main_vbox = gimp_image_map_tool_dialog_get_vbox (im_tool);
+  main_vbox = gimp_filter_tool_dialog_get_vbox (filter_tool);
 
   /*  The options vbox  */
   tool->options_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
@@ -309,34 +309,34 @@ gimp_operation_tool_dialog (GimpImageMapTool *im_tool)
 }
 
 static void
-gimp_operation_tool_reset (GimpImageMapTool *im_tool)
+gimp_operation_tool_reset (GimpFilterTool *filter_tool)
 {
-  GimpOperationTool *tool = GIMP_OPERATION_TOOL (im_tool);
+  GimpOperationTool *tool = GIMP_OPERATION_TOOL (filter_tool);
 
-  GIMP_IMAGE_MAP_TOOL_CLASS (parent_class)->reset (im_tool);
+  GIMP_FILTER_TOOL_CLASS (parent_class)->reset (filter_tool);
 
-  if (im_tool->config && GIMP_TOOL (tool)->drawable)
+  if (filter_tool->config && GIMP_TOOL (tool)->drawable)
     gimp_operation_tool_sync_op (tool, GIMP_TOOL (tool)->drawable);
 }
 
 static GtkWidget *
-gimp_operation_tool_get_settings_ui (GimpImageMapTool  *im_tool,
-                                     GimpContainer     *settings,
-                                     GFile             *settings_file,
-                                     const gchar       *import_dialog_title,
-                                     const gchar       *export_dialog_title,
-                                     const gchar       *file_dialog_help_id,
-                                     GFile             *default_folder,
-                                     GtkWidget        **settings_box)
+gimp_operation_tool_get_settings_ui (GimpFilterTool  *filter_tool,
+                                     GimpContainer   *settings,
+                                     GFile           *settings_file,
+                                     const gchar     *import_dialog_title,
+                                     const gchar     *export_dialog_title,
+                                     const gchar     *file_dialog_help_id,
+                                     GFile           *default_folder,
+                                     GtkWidget      **settings_box)
 {
-  GimpOperationTool *tool = GIMP_OPERATION_TOOL (im_tool);
+  GimpOperationTool *tool = GIMP_OPERATION_TOOL (filter_tool);
   GtkWidget         *widget;
   gchar             *basename;
   GFile             *file;
   gchar             *import_title;
   gchar             *export_title;
 
-  basename = g_strconcat (G_OBJECT_TYPE_NAME (im_tool->config),
+  basename = g_strconcat (G_OBJECT_TYPE_NAME (filter_tool->config),
                           ".settings", NULL);
   file = gimp_directory_file ("filters", basename, NULL);
   g_free (basename);
@@ -345,14 +345,14 @@ gimp_operation_tool_get_settings_ui (GimpImageMapTool  *im_tool,
   export_title = g_strdup_printf (_("Export '%s' Settings"), tool->title);
 
   widget =
-    GIMP_IMAGE_MAP_TOOL_CLASS (parent_class)->get_settings_ui (im_tool,
-                                                               settings,
-                                                               file,
-                                                               import_title,
-                                                               export_title,
-                                                               "help-foo",
-                                                               NULL, /* sic */
-                                                               settings_box);
+    GIMP_FILTER_TOOL_CLASS (parent_class)->get_settings_ui (filter_tool,
+                                                            settings,
+                                                            file,
+                                                            import_title,
+                                                            export_title,
+                                                            "help-foo",
+                                                            NULL, /* sic */
+                                                            settings_box);
 
   g_free (import_title);
   g_free (export_title);
@@ -363,27 +363,27 @@ gimp_operation_tool_get_settings_ui (GimpImageMapTool  *im_tool,
 }
 
 static void
-gimp_operation_tool_color_picked (GimpImageMapTool  *im_tool,
-                                  gpointer           identifier,
-                                  gdouble            x,
-                                  gdouble            y,
-                                  const Babl        *sample_format,
-                                  const GimpRGB     *color)
+gimp_operation_tool_color_picked (GimpFilterTool  *filter_tool,
+                                  gpointer         identifier,
+                                  gdouble          x,
+                                  gdouble          y,
+                                  const Babl      *sample_format,
+                                  const GimpRGB   *color)
 {
-  GimpOperationTool  *tool = GIMP_OPERATION_TOOL (im_tool);
+  GimpOperationTool  *tool = GIMP_OPERATION_TOOL (filter_tool);
   gchar             **pspecs;
 
   pspecs = g_strsplit (identifier, ":", 2);
 
   if (pspecs[1])
     {
-      GimpImageMapOptions *options      = GIMP_IMAGE_MAP_TOOL_GET_OPTIONS (tool);
-      GimpDrawable        *drawable     = GIMP_TOOL (im_tool)->drawable;
-      GObjectClass        *object_class = G_OBJECT_GET_CLASS (im_tool->config);
-      GParamSpec          *pspec_x;
-      GParamSpec          *pspec_y;
-      gint                 width        = 1;
-      gint                 height       = 1;
+      GimpFilterOptions *options      = GIMP_FILTER_TOOL_GET_OPTIONS (tool);
+      GimpDrawable      *drawable     = GIMP_TOOL (filter_tool)->drawable;
+      GObjectClass      *object_class = G_OBJECT_GET_CLASS (filter_tool->config);
+      GParamSpec        *pspec_x;
+      GParamSpec        *pspec_y;
+      gint               width        = 1;
+      gint               height       = 1;
 
       if (drawable)
         {
@@ -441,7 +441,7 @@ gimp_operation_tool_color_picked (GimpImageMapTool  *im_tool,
               g_param_value_validate (pspec_x, &value_x);
               g_param_value_validate (pspec_y, &value_y);
 
-              g_object_set (im_tool->config,
+              g_object_set (filter_tool->config,
                             pspecs[0], g_value_get_int (&value_x),
                             pspecs[1], g_value_get_int (&value_y),
                             NULL);
@@ -454,7 +454,7 @@ gimp_operation_tool_color_picked (GimpImageMapTool  *im_tool,
               g_param_value_validate (pspec_x, &value_x);
               g_param_value_validate (pspec_y, &value_y);
 
-              g_object_set (im_tool->config,
+              g_object_set (filter_tool->config,
                             pspecs[0], g_value_get_double (&value_x),
                             pspecs[1], g_value_get_double (&value_y),
                             NULL);
@@ -471,7 +471,7 @@ gimp_operation_tool_color_picked (GimpImageMapTool  *im_tool,
     }
   else
     {
-      g_object_set (im_tool->config,
+      g_object_set (filter_tool->config,
                     pspecs[0], color,
                     NULL);
     }
@@ -483,8 +483,8 @@ static void
 gimp_operation_tool_sync_op (GimpOperationTool *op_tool,
                              GimpDrawable      *drawable)
 {
-  GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (op_tool);
-  GimpToolOptions  *options = GIMP_TOOL_GET_OPTIONS (op_tool);
+  GimpFilterTool   *filter_tool = GIMP_FILTER_TOOL (op_tool);
+  GimpToolOptions  *options     = GIMP_TOOL_GET_OPTIONS (op_tool);
   GParamSpec      **pspecs;
   guint             n_pspecs;
   gint              bounds_x;
@@ -497,7 +497,7 @@ gimp_operation_tool_sync_op (GimpOperationTool *op_tool,
                             &bounds_x, &bounds_y,
                             &bounds_width, &bounds_height);
 
-  pspecs = g_object_class_list_properties (G_OBJECT_GET_CLASS (im_tool->config),
+  pspecs = g_object_class_list_properties (G_OBJECT_GET_CLASS (filter_tool->config),
                                            &n_pspecs);
 
   for (i = 0; i < n_pspecs; i++)
@@ -511,22 +511,22 @@ gimp_operation_tool_sync_op (GimpOperationTool *op_tool,
           if (HAS_KEY (pspec, "unit", "pixel-coordinate") &&
               HAS_KEY (pspec, "axis", "x"))
             {
-              g_object_set (im_tool->config, pspec->name, 0, NULL);
+              g_object_set (filter_tool->config, pspec->name, 0, NULL);
             }
           else if (HAS_KEY (pspec, "unit", "pixel-coordinate") &&
                    HAS_KEY (pspec, "axis", "y"))
             {
-              g_object_set (im_tool->config, pspec->name, 0, NULL);
+              g_object_set (filter_tool->config, pspec->name, 0, NULL);
             }
           else if (HAS_KEY (pspec, "unit", "pixel-distance") &&
                    HAS_KEY (pspec, "axis", "x"))
             {
-              g_object_set (im_tool->config, pspec->name, bounds_width, NULL);
+              g_object_set (filter_tool->config, pspec->name, bounds_width, NULL);
             }
           else if (HAS_KEY (pspec, "unit", "pixel-distance") &&
                    HAS_KEY (pspec, "axis", "y"))
             {
-              g_object_set (im_tool->config, pspec->name, bounds_height, NULL);
+              g_object_set (filter_tool->config, pspec->name, bounds_height, NULL);
             }
         }
       else if (HAS_KEY (pspec, "role", "color-primary"))
@@ -534,14 +534,14 @@ gimp_operation_tool_sync_op (GimpOperationTool *op_tool,
           GimpRGB color;
 
           gimp_context_get_foreground (GIMP_CONTEXT (options), &color);
-          g_object_set (im_tool->config, pspec->name, &color, NULL);
+          g_object_set (filter_tool->config, pspec->name, &color, NULL);
         }
       else if (HAS_KEY (pspec, "role", "color-secondary"))
         {
           GimpRGB color;
 
           gimp_context_get_background (GIMP_CONTEXT (options), &color);
-          g_object_set (im_tool->config, pspec->name, &color, NULL);
+          g_object_set (filter_tool->config, pspec->name, &color, NULL);
         }
     }
 
@@ -556,12 +556,12 @@ gimp_operation_tool_aux_input_notify (GimpBufferSourceBox *box,
                                       const GParamSpec    *pspec,
                                       AuxInput            *input)
 {
-  /* emit "notify" so GimpImageMapTool will update its preview
+  /* emit "notify" so GimpFilterTool will update its preview
    *
    * FIXME: this is a bad hack that should go away once GimpImageMap
-   * and GimpImageMapTool are refactored to be more filter-ish.
+   * and GimpFilterTool are refactored to be more filter-ish.
    */
-  g_signal_emit_by_name (GIMP_IMAGE_MAP_TOOL (input->tool)->config,
+  g_signal_emit_by_name (GIMP_FILTER_TOOL (input->tool)->config,
                          "notify", NULL);
 }
 
@@ -627,14 +627,14 @@ gimp_operation_tool_set_operation (GimpOperationTool *tool,
                                    const gchar       *icon_name,
                                    const gchar       *help_id)
 {
-  GimpImageMapTool *im_tool;
-  GtkSizeGroup     *size_group = NULL;
-  gint              aux;
+  GimpFilterTool *filter_tool;
+  GtkSizeGroup   *size_group = NULL;
+  gint            aux;
 
   g_return_if_fail (GIMP_IS_OPERATION_TOOL (tool));
   g_return_if_fail (operation != NULL);
 
-  im_tool = GIMP_IMAGE_MAP_TOOL (tool);
+  filter_tool = GIMP_FILTER_TOOL (tool);
 
   if (tool->operation)
     g_free (tool->operation);
@@ -665,21 +665,21 @@ gimp_operation_tool_set_operation (GimpOperationTool *tool,
                     (GDestroyNotify) gimp_operation_tool_aux_input_free);
   tool->aux_inputs = NULL;
 
-  gimp_image_map_tool_get_operation (im_tool);
+  gimp_filter_tool_get_operation (filter_tool);
 
   if (undo_desc)
-    GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool)->settings_name = "yes"; /* XXX hack */
+    GIMP_FILTER_TOOL_GET_CLASS (tool)->settings_name = "yes"; /* XXX hack */
   else
-    GIMP_IMAGE_MAP_TOOL_GET_CLASS (tool)->settings_name = NULL; /* XXX hack */
+    GIMP_FILTER_TOOL_GET_CLASS (tool)->settings_name = NULL; /* XXX hack */
 
   if (tool->options_gui)
     {
       gtk_widget_destroy (tool->options_gui);
       tool->options_gui = NULL;
 
-      if (im_tool->active_picker)
+      if (filter_tool->active_picker)
         {
-          im_tool->active_picker = NULL;
+          filter_tool->active_picker = NULL;
           gimp_color_tool_disable (GIMP_COLOR_TOOL (tool));
         }
     }
@@ -702,7 +702,7 @@ gimp_operation_tool_set_operation (GimpOperationTool *tool,
           g_snprintf (label, sizeof (label), _("Aux%d Input"), aux);
         }
 
-      if (gegl_node_has_pad (im_tool->operation, pad))
+      if (gegl_node_has_pad (filter_tool->operation, pad))
         {
           AuxInput  *input;
           GtkWidget *toggle;
@@ -711,7 +711,7 @@ gimp_operation_tool_set_operation (GimpOperationTool *tool,
             size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
           input = gimp_operation_tool_aux_input_new (tool,
-                                                     im_tool->operation, pad,
+                                                     filter_tool->operation, pad,
                                                      label);
 
           tool->aux_inputs = g_list_append (tool->aux_inputs, input);
@@ -735,13 +735,13 @@ gimp_operation_tool_set_operation (GimpOperationTool *tool,
   if (size_group)
     g_object_unref (size_group);
 
-  if (im_tool->config)
+  if (filter_tool->config)
     {
       tool->options_gui =
-        gimp_prop_gui_new (G_OBJECT (im_tool->config),
-                           G_TYPE_FROM_INSTANCE (im_tool->config), 0,
+        gimp_prop_gui_new (G_OBJECT (filter_tool->config),
+                           G_TYPE_FROM_INSTANCE (filter_tool->config), 0,
                            GIMP_CONTEXT (GIMP_TOOL_GET_OPTIONS (tool)),
-                           (GimpCreatePickerFunc) gimp_image_map_tool_add_color_picker,
+                           (GimpCreatePickerFunc) gimp_filter_tool_add_color_picker,
                            tool);
 
       if (tool->options_box)
diff --git a/app/tools/gimpoperationtool.h b/app/tools/gimpoperationtool.h
index b7fda95..3ed81d1 100644
--- a/app/tools/gimpoperationtool.h
+++ b/app/tools/gimpoperationtool.h
@@ -19,7 +19,7 @@
 #define __GIMP_OPERATION_TOOL_H__
 
 
-#include "gimpimagemaptool.h"
+#include "gimpfiltertool.h"
 
 
 #define GIMP_TYPE_OPERATION_TOOL            (gimp_operation_tool_get_type ())
@@ -35,25 +35,25 @@ typedef struct _GimpOperationToolClass GimpOperationToolClass;
 
 struct _GimpOperationTool
 {
-  GimpImageMapTool  parent_instance;
+  GimpFilterTool  parent_instance;
 
-  gchar            *operation;
-  gchar            *title;
-  gchar            *description;
-  gchar            *undo_desc;
-  gchar            *icon_name;
-  gchar            *help_id;
+  gchar          *operation;
+  gchar          *title;
+  gchar          *description;
+  gchar          *undo_desc;
+  gchar          *icon_name;
+  gchar          *help_id;
 
-  GList            *aux_inputs;
+  GList          *aux_inputs;
 
   /* dialog */
-  GtkWidget        *options_box;
-  GtkWidget        *options_gui;
+  GtkWidget      *options_box;
+  GtkWidget      *options_gui;
 };
 
 struct _GimpOperationToolClass
 {
-  GimpImageMapToolClass  parent_class;
+  GimpFilterToolClass  parent_class;
 };
 
 
diff --git a/app/tools/gimpthresholdtool.c b/app/tools/gimpthresholdtool.c
index de54561..76e6cdd 100644
--- a/app/tools/gimpthresholdtool.c
+++ b/app/tools/gimpthresholdtool.c
@@ -52,13 +52,13 @@ static gboolean   gimp_threshold_tool_initialize      (GimpTool          *tool,
                                                        GimpDisplay       *display,
                                                        GError           **error);
 
-static gchar    * gimp_threshold_tool_get_operation   (GimpImageMapTool  *im_tool,
+static gchar    * gimp_threshold_tool_get_operation   (GimpFilterTool    *filter_tool,
                                                        gchar            **title,
                                                        gchar            **description,
                                                        gchar            **undo_desc,
                                                        gchar            **icon_name,
                                                        gchar            **help_id);
-static void       gimp_threshold_tool_dialog          (GimpImageMapTool  *im_tool);
+static void       gimp_threshold_tool_dialog          (GimpFilterTool    *filter_tool);
 
 static void       gimp_threshold_tool_config_notify   (GObject           *object,
                                                        GParamSpec        *pspec,
@@ -73,7 +73,7 @@ static void       gimp_threshold_tool_auto_clicked    (GtkWidget         *button
 
 
 G_DEFINE_TYPE (GimpThresholdTool, gimp_threshold_tool,
-               GIMP_TYPE_IMAGE_MAP_TOOL)
+               GIMP_TYPE_FILTER_TOOL)
 
 #define parent_class gimp_threshold_tool_parent_class
 
@@ -98,21 +98,21 @@ gimp_threshold_tool_register (GimpToolRegisterCallback  callback,
 static void
 gimp_threshold_tool_class_init (GimpThresholdToolClass *klass)
 {
-  GObjectClass          *object_class  = G_OBJECT_CLASS (klass);
-  GimpToolClass         *tool_class    = GIMP_TOOL_CLASS (klass);
-  GimpImageMapToolClass *im_tool_class = GIMP_IMAGE_MAP_TOOL_CLASS (klass);
+  GObjectClass        *object_class      = G_OBJECT_CLASS (klass);
+  GimpToolClass       *tool_class        = GIMP_TOOL_CLASS (klass);
+  GimpFilterToolClass *filter_tool_class = GIMP_FILTER_TOOL_CLASS (klass);
 
-  object_class->constructed          = gimp_threshold_tool_constructed;
-  object_class->finalize             = gimp_threshold_tool_finalize;
+  object_class->constructed              = gimp_threshold_tool_constructed;
+  object_class->finalize                 = gimp_threshold_tool_finalize;
 
-  tool_class->initialize             = gimp_threshold_tool_initialize;
+  tool_class->initialize                 = gimp_threshold_tool_initialize;
 
-  im_tool_class->settings_name       = "threshold";
-  im_tool_class->import_dialog_title = _("Import Threshold Settings");
-  im_tool_class->export_dialog_title = _("Export Threshold Settings");
+  filter_tool_class->settings_name       = "threshold";
+  filter_tool_class->import_dialog_title = _("Import Threshold Settings");
+  filter_tool_class->export_dialog_title = _("Export Threshold Settings");
 
-  im_tool_class->get_operation       = gimp_threshold_tool_get_operation;
-  im_tool_class->dialog              = gimp_threshold_tool_dialog;
+  filter_tool_class->get_operation       = gimp_threshold_tool_get_operation;
+  filter_tool_class->dialog              = gimp_threshold_tool_dialog;
 }
 
 static void
@@ -126,7 +126,7 @@ gimp_threshold_tool_constructed (GObject *object)
 {
   G_OBJECT_CLASS (parent_class)->constructed (object);
 
-  g_signal_connect_object (GIMP_IMAGE_MAP_TOOL (object)->config, "notify",
+  g_signal_connect_object (GIMP_FILTER_TOOL (object)->config, "notify",
                            G_CALLBACK (gimp_threshold_tool_config_notify),
                            object, 0);
 }
@@ -167,12 +167,12 @@ gimp_threshold_tool_initialize (GimpTool     *tool,
 }
 
 static gchar *
-gimp_threshold_tool_get_operation (GimpImageMapTool  *im_tool,
-                                   gchar            **title,
-                                   gchar            **description,
-                                   gchar            **undo_desc,
-                                   gchar            **icon_name,
-                                   gchar            **help_id)
+gimp_threshold_tool_get_operation (GimpFilterTool  *filter_tool,
+                                   gchar          **title,
+                                   gchar          **description,
+                                   gchar          **undo_desc,
+                                   gchar          **icon_name,
+                                   gchar          **help_id)
 {
   *description = g_strdup (_("Apply Threshold"));
 
@@ -185,10 +185,10 @@ gimp_threshold_tool_get_operation (GimpImageMapTool  *im_tool,
 /**********************/
 
 static void
-gimp_threshold_tool_dialog (GimpImageMapTool *im_tool)
+gimp_threshold_tool_dialog (GimpFilterTool *filter_tool)
 {
-  GimpThresholdTool *t_tool       = GIMP_THRESHOLD_TOOL (im_tool);
-  GimpToolOptions   *tool_options = GIMP_TOOL_GET_OPTIONS (im_tool);
+  GimpThresholdTool *t_tool       = GIMP_THRESHOLD_TOOL (filter_tool);
+  GimpToolOptions   *tool_options = GIMP_TOOL_GET_OPTIONS (filter_tool);
   GtkWidget         *main_vbox;
   GtkWidget         *hbox;
   GtkWidget         *menu;
@@ -198,7 +198,7 @@ gimp_threshold_tool_dialog (GimpImageMapTool *im_tool)
   gdouble            high;
   gint               n_bins;
 
-  main_vbox = gimp_image_map_tool_dialog_get_vbox (im_tool);
+  main_vbox = gimp_filter_tool_dialog_get_vbox (filter_tool);
 
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
   gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
@@ -216,7 +216,7 @@ gimp_threshold_tool_dialog (GimpImageMapTool *im_tool)
 
   t_tool->histogram_box = GIMP_HISTOGRAM_BOX (box);
 
-  g_object_get (im_tool->config,
+  g_object_get (filter_tool->config,
                 "low",  &low,
                 "high", &high,
                 NULL);
@@ -279,14 +279,14 @@ gimp_threshold_tool_histogram_range (GimpHistogramView *widget,
                                      gint               end,
                                      GimpThresholdTool *t_tool)
 {
-  GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (t_tool);
-  gint              n_bins  = gimp_histogram_n_bins (t_tool->histogram);
-  gdouble           low     = (gdouble) start / (n_bins - 1);
-  gdouble           high    = (gdouble) end   / (n_bins - 1);
-  gdouble           config_low;
-  gdouble           config_high;
-
-  g_object_get (im_tool->config,
+  GimpFilterTool *filter_tool = GIMP_FILTER_TOOL (t_tool);
+  gint            n_bins      = gimp_histogram_n_bins (t_tool->histogram);
+  gdouble         low         = (gdouble) start / (n_bins - 1);
+  gdouble         high        = (gdouble) end   / (n_bins - 1);
+  gdouble         config_low;
+  gdouble         config_high;
+
+  g_object_get (filter_tool->config,
                 "low",  &config_low,
                 "high", &config_high,
                 NULL);
@@ -294,7 +294,7 @@ gimp_threshold_tool_histogram_range (GimpHistogramView *widget,
   if (low  != config_low ||
       high != config_high)
     {
-      g_object_set (im_tool->config,
+      g_object_set (filter_tool->config,
                     "low",  low,
                     "high", high,
                     NULL);
@@ -305,7 +305,7 @@ static void
 gimp_threshold_tool_auto_clicked (GtkWidget         *button,
                                   GimpThresholdTool *t_tool)
 {
-  GimpDrawable *drawable = GIMP_IMAGE_MAP_TOOL (t_tool)->drawable;
+  GimpDrawable *drawable = GIMP_FILTER_TOOL (t_tool)->drawable;
   gint          n_bins   = gimp_histogram_n_bins (t_tool->histogram);
   gdouble       low;
 
diff --git a/app/tools/gimpthresholdtool.h b/app/tools/gimpthresholdtool.h
index 3915836..6e4f7dc 100644
--- a/app/tools/gimpthresholdtool.h
+++ b/app/tools/gimpthresholdtool.h
@@ -19,7 +19,7 @@
 #define __GIMP_THRESHOLD_TOOL_H__
 
 
-#include "gimpimagemaptool.h"
+#include "gimpfiltertool.h"
 
 
 #define GIMP_TYPE_THRESHOLD_TOOL            (gimp_threshold_tool_get_type ())
@@ -35,7 +35,7 @@ typedef struct _GimpThresholdToolClass GimpThresholdToolClass;
 
 struct _GimpThresholdTool
 {
-  GimpImageMapTool  parent_instance;
+  GimpFilterTool    parent_instance;
 
   /*  dialog  */
   GimpHistogram    *histogram;
@@ -44,7 +44,7 @@ struct _GimpThresholdTool
 
 struct _GimpThresholdToolClass
 {
-  GimpImageMapToolClass  parent_class;
+  GimpFilterToolClass  parent_class;
 };
 
 
diff --git a/app/tools/tools-types.h b/app/tools/tools-types.h
index 25bc3dc..bb6bd4b 100644
--- a/app/tools/tools-types.h
+++ b/app/tools/tools-types.h
@@ -33,14 +33,14 @@ typedef struct _GimpToolControl              GimpToolControl;
 typedef struct _GimpBrushTool                GimpBrushTool;
 typedef struct _GimpColorTool                GimpColorTool;
 typedef struct _GimpDrawTool                 GimpDrawTool;
+typedef struct _GimpFilterTool               GimpFilterTool;
 typedef struct _GimpForegroundSelectToolUndo GimpForegroundSelectToolUndo;
-typedef struct _GimpImageMapTool             GimpImageMapTool;
 typedef struct _GimpPaintTool                GimpPaintTool;
 typedef struct _GimpTransformTool            GimpTransformTool;
 typedef struct _GimpTransformToolUndo        GimpTransformToolUndo;
 
 typedef struct _GimpColorOptions             GimpColorOptions;
-typedef struct _GimpImageMapOptions          GimpImageMapOptions;
+typedef struct _GimpFilterOptions            GimpFilterOptions;
 
 
 /*  functions  */
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8138ee9..7dd389d 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -386,6 +386,9 @@ app/tools/gimpdodgeburntool.c
 app/tools/gimpeditselectiontool.c
 app/tools/gimpellipseselecttool.c
 app/tools/gimperasertool.c
+app/tools/gimpfilteroptions.c
+app/tools/gimpfiltertool.c
+app/tools/gimpfiltertool-settings.c
 app/tools/gimpflipoptions.c
 app/tools/gimpfliptool.c
 app/tools/gimpforegroundselectoptions.c
@@ -399,9 +402,6 @@ app/tools/gimphandletransformtool.c
 app/tools/gimphealtool.c
 app/tools/gimphistogramoptions.c
 app/tools/gimphuesaturationtool.c
-app/tools/gimpimagemapoptions.c
-app/tools/gimpimagemaptool.c
-app/tools/gimpimagemaptool-settings.c
 app/tools/gimpinkoptions-gui.c
 app/tools/gimpinktool.c
 app/tools/gimpiscissorsoptions.c


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