gimp r24712 - in branches/weskaggs: . app app/actions app/base app/core app/dialogs app/display app/gegl app/gui app/paint app/pdb app/tools app/widgets data/images libgimpwidgets plug-ins/common plug-ins/imagemap po po-plug-ins themes/Default/images tools/pdbgen/pdb



Author: weskaggs
Date: Fri Jan 25 18:43:27 2008
New Revision: 24712
URL: http://svn.gnome.org/viewvc/gimp?rev=24712&view=rev

Log:
Bill Skaggs  <weskaggs primate ucdavis edu>

	Merged 24663:24709 from trunk.


Added:
   branches/weskaggs/app/gegl/gimpcolorbalanceconfig.c
      - copied unchanged from r24709, /trunk/app/gegl/gimpcolorbalanceconfig.c
   branches/weskaggs/app/gegl/gimpcolorbalanceconfig.h
      - copied unchanged from r24709, /trunk/app/gegl/gimpcolorbalanceconfig.h
   branches/weskaggs/app/gegl/gimpcurvesconfig.c
      - copied unchanged from r24709, /trunk/app/gegl/gimpcurvesconfig.c
   branches/weskaggs/app/gegl/gimpcurvesconfig.h
      - copied unchanged from r24709, /trunk/app/gegl/gimpcurvesconfig.h
   branches/weskaggs/app/gegl/gimphuesaturationconfig.c
      - copied unchanged from r24709, /trunk/app/gegl/gimphuesaturationconfig.c
   branches/weskaggs/app/gegl/gimphuesaturationconfig.h
      - copied unchanged from r24709, /trunk/app/gegl/gimphuesaturationconfig.h
   branches/weskaggs/app/gegl/gimpoperationcurves.c
      - copied unchanged from r24709, /trunk/app/gegl/gimpoperationcurves.c
   branches/weskaggs/app/gegl/gimpoperationcurves.h
      - copied unchanged from r24709, /trunk/app/gegl/gimpoperationcurves.h
   branches/weskaggs/app/gegl/gimpthresholdconfig.c
      - copied unchanged from r24709, /trunk/app/gegl/gimpthresholdconfig.c
   branches/weskaggs/app/gegl/gimpthresholdconfig.h
      - copied unchanged from r24709, /trunk/app/gegl/gimpthresholdconfig.h
   branches/weskaggs/data/images/wilber.png
      - copied unchanged from r24709, /trunk/data/images/wilber.png
Removed:
   branches/weskaggs/libgimpwidgets/wilber-22.png
   branches/weskaggs/libgimpwidgets/wilber-256.png
   branches/weskaggs/themes/Default/images/stock-wilber-48.png
Modified:
   branches/weskaggs/ChangeLog
   branches/weskaggs/app/about.h
   branches/weskaggs/app/actions/tools-commands.c
   branches/weskaggs/app/base/boundary.c
   branches/weskaggs/app/base/color-balance.c
   branches/weskaggs/app/base/color-balance.h
   branches/weskaggs/app/base/hue-saturation.c
   branches/weskaggs/app/base/hue-saturation.h
   branches/weskaggs/app/base/levels.c
   branches/weskaggs/app/base/levels.h
   branches/weskaggs/app/core/gimp.c
   branches/weskaggs/app/core/gimp.h
   branches/weskaggs/app/core/gimpdrawable-desaturate.c
   branches/weskaggs/app/core/gimpdrawable-invert.c
   branches/weskaggs/app/core/gimpdrawable-levels.c
   branches/weskaggs/app/core/gimpimage-undo.c
   branches/weskaggs/app/core/gimpimage.c
   branches/weskaggs/app/core/gimpprojection.c
   branches/weskaggs/app/dialogs/about-dialog.c
   branches/weskaggs/app/display/gimpdisplayshell-callbacks.c
   branches/weskaggs/app/display/gimpdisplayshell-coords.c
   branches/weskaggs/app/display/gimpdisplayshell-coords.h
   branches/weskaggs/app/display/gimpdisplayshell-selection.c
   branches/weskaggs/app/gegl/Makefile.am
   branches/weskaggs/app/gegl/gegl-types.h
   branches/weskaggs/app/gegl/gimp-gegl.c
   branches/weskaggs/app/gegl/gimpcolorizeconfig.c
   branches/weskaggs/app/gegl/gimpcolorizeconfig.h
   branches/weskaggs/app/gegl/gimplevelsconfig.c
   branches/weskaggs/app/gegl/gimplevelsconfig.h
   branches/weskaggs/app/gegl/gimpoperationcolorbalance.c
   branches/weskaggs/app/gegl/gimpoperationcolorbalance.h
   branches/weskaggs/app/gegl/gimpoperationcolorize.h
   branches/weskaggs/app/gegl/gimpoperationdesaturate.h
   branches/weskaggs/app/gegl/gimpoperationhuesaturation.c
   branches/weskaggs/app/gegl/gimpoperationhuesaturation.h
   branches/weskaggs/app/gegl/gimpoperationlevels.c
   branches/weskaggs/app/gegl/gimpoperationlevels.h
   branches/weskaggs/app/gegl/gimpoperationposterize.h
   branches/weskaggs/app/gegl/gimpoperationthreshold.c
   branches/weskaggs/app/gegl/gimpoperationthreshold.h
   branches/weskaggs/app/gegl/gimpoperationtilesink.h
   branches/weskaggs/app/gegl/gimpoperationtilesource.h
   branches/weskaggs/app/gui/gui.c
   branches/weskaggs/app/paint/gimpbrushcore.c
   branches/weskaggs/app/pdb/color_cmds.c
   branches/weskaggs/app/sanity.c
   branches/weskaggs/app/tools/gimp-tools.c
   branches/weskaggs/app/tools/gimpbrightnesscontrasttool.c
   branches/weskaggs/app/tools/gimpbrushtool.c
   branches/weskaggs/app/tools/gimpcolorbalancetool.c
   branches/weskaggs/app/tools/gimpcolorbalancetool.h
   branches/weskaggs/app/tools/gimpcolorizetool.c
   branches/weskaggs/app/tools/gimpcurvestool.c
   branches/weskaggs/app/tools/gimpcurvestool.h
   branches/weskaggs/app/tools/gimphuesaturationtool.c
   branches/weskaggs/app/tools/gimphuesaturationtool.h
   branches/weskaggs/app/tools/gimpimagemaptool.c
   branches/weskaggs/app/tools/gimpimagemaptool.h
   branches/weskaggs/app/tools/gimplevelstool.c
   branches/weskaggs/app/tools/gimplevelstool.h
   branches/weskaggs/app/tools/gimpposterizetool.c
   branches/weskaggs/app/tools/gimprectangleselecttool.c
   branches/weskaggs/app/tools/gimprectangletool.c
   branches/weskaggs/app/tools/gimpthresholdtool.c
   branches/weskaggs/app/tools/gimpthresholdtool.h
   branches/weskaggs/app/widgets/gimpcolormapeditor.c
   branches/weskaggs/libgimpwidgets/gimpstock.c
   branches/weskaggs/plug-ins/common/pcx.c
   branches/weskaggs/plug-ins/imagemap/imap_about.c
   branches/weskaggs/plug-ins/imagemap/imap_csim.y
   branches/weskaggs/plug-ins/imagemap/imap_csim_parse.c
   branches/weskaggs/plug-ins/imagemap/imap_csim_parse.h
   branches/weskaggs/plug-ins/imagemap/imap_mru.c
   branches/weskaggs/po-plug-ins/ChangeLog
   branches/weskaggs/po-plug-ins/POTFILES.in
   branches/weskaggs/po-plug-ins/POTFILES.skip
   branches/weskaggs/po/POTFILES.skip
   branches/weskaggs/themes/Default/images/Makefile.am
   branches/weskaggs/themes/Default/images/stock-wilber-22.png
   branches/weskaggs/tools/pdbgen/pdb/color.pdb

Modified: branches/weskaggs/app/about.h
==============================================================================
--- branches/weskaggs/app/about.h	(original)
+++ branches/weskaggs/app/about.h	Fri Jan 25 18:43:27 2008
@@ -27,7 +27,7 @@
   _("GNU Image Manipulation Program")
 
 #define GIMP_COPYRIGHT \
-  _("Copyright  1995-2007\n" \
+  _("Copyright  1995-2008\n" \
     "Spencer Kimball, Peter Mattis and the GIMP Development Team")
 
 #define GIMP_LICENSE \

Modified: branches/weskaggs/app/actions/tools-commands.c
==============================================================================
--- branches/weskaggs/app/actions/tools-commands.c	(original)
+++ branches/weskaggs/app/actions/tools-commands.c	Fri Jan 25 18:43:27 2008
@@ -20,6 +20,7 @@
 
 #include <string.h>
 
+#include <gegl.h>
 #include <gtk/gtk.h>
 
 #include "actions-types.h"

Modified: branches/weskaggs/app/base/boundary.c
==============================================================================
--- branches/weskaggs/app/base/boundary.c	(original)
+++ branches/weskaggs/app/base/boundary.c	Fri Jan 25 18:43:27 2008
@@ -431,11 +431,12 @@
       boundary->segs = g_renew (BoundSeg, boundary->segs, boundary->max_segs);
     }
 
-  boundary->segs[boundary->num_segs].x1 = x1;
-  boundary->segs[boundary->num_segs].y1 = y1;
-  boundary->segs[boundary->num_segs].x2 = x2;
-  boundary->segs[boundary->num_segs].y2 = y2;
+  boundary->segs[boundary->num_segs].x1   = x1;
+  boundary->segs[boundary->num_segs].y1   = y1;
+  boundary->segs[boundary->num_segs].x2   = x2;
+  boundary->segs[boundary->num_segs].y2   = y2;
   boundary->segs[boundary->num_segs].open = open;
+
   boundary->num_segs ++;
 }
 
@@ -457,10 +458,11 @@
   gint          start = 0;
   gint          end   = 0;
   gint          endx  = 0;
-  gint          dstep = 0;
-  gint          val, last;
-  gint          x, tilex;
+  gint          bpp   = 0;
+  gint          tilex = -1;
+  gint          last  = -1;
   gint          l_num_empty;
+  gint          x;
 
   *num_empty = 0;
 
@@ -491,17 +493,15 @@
         x2 = -1;
     }
 
-  tilex = -1;
   empty_segs[(*num_empty)++] = 0;
-  last = -1;
 
   l_num_empty = *num_empty;
 
+  bpp = maskPR->bytes;
+
   if (! maskPR->tiles)
     {
       data  = maskPR->data + scanline * maskPR->rowstride;
-      dstep = maskPR->bytes;
-
       endx = end;
     }
 
@@ -518,13 +518,12 @@
               tile = tile_manager_get_tile (maskPR->tiles,
                                             x, scanline, TRUE, FALSE);
               data = ((const guchar *) tile_data_pointer (tile, x, scanline) +
-                      tile_bpp (tile) - 1);
+                      bpp - 1);
 
               tilex = x / TILE_WIDTH;
-              dstep = tile_bpp (tile);
             }
 
-          endx = x + (TILE_WIDTH - (x%TILE_WIDTH));
+          endx = x + (TILE_WIDTH - (x % TILE_WIDTH));
           endx = MIN (end, endx);
         }
 
@@ -532,15 +531,21 @@
         {
           for (; x < endx; x++)
             {
+              gint val;
+
               if (*data > threshold)
-                if (x >= x1 && x < x2)
-                  val = -1;
-                else
-                  val = 1;
+                {
+                  if (x >= x1 && x < x2)
+                    val = -1;
+                  else
+                    val = 1;
+                }
               else
-                val = -1;
+                {
+                  val = -1;
+                }
 
-              data += dstep;
+              data += bpp;
 
               if (last != val)
                 empty_segs[l_num_empty++] = x;
@@ -552,12 +557,14 @@
         {
           for (; x < endx; x++)
             {
+              gint val;
+
               if (*data > threshold)
                 val = 1;
               else
                 val = -1;
 
-              data += dstep;
+              data += bpp;
 
               if (last != val)
                 empty_segs[l_num_empty++] = x;
@@ -626,13 +633,17 @@
       e_e = *empty++;
 
       if (e_s <= start && e_e >= end)
-        process_horiz_seg (boundary,
-                           start, scanline, end, scanline, top);
+        {
+          process_horiz_seg (boundary,
+                             start, scanline, end, scanline, top);
+        }
       else if ((e_s > start && e_s < end) ||
                (e_e < end && e_e > start))
-        process_horiz_seg (boundary,
-                           MAX (e_s, start), scanline,
-                           MIN (e_e, end), scanline, top);
+        {
+          process_horiz_seg (boundary,
+                             MAX (e_s, start), scanline,
+                             MIN (e_e, end), scanline, top);
+        }
     }
 }
 

Modified: branches/weskaggs/app/base/color-balance.c
==============================================================================
--- branches/weskaggs/app/base/color-balance.c	(original)
+++ branches/weskaggs/app/base/color-balance.c	Fri Jan 25 18:43:27 2008
@@ -59,23 +59,16 @@
   g_return_if_fail (cb != NULL);
 
   for (range = GIMP_SHADOWS; range <= GIMP_HIGHLIGHTS; range++)
-    color_balance_range_reset (cb, range);
+    {
+      cb->cyan_red[range]      = 0.0;
+      cb->magenta_green[range] = 0.0;
+      cb->yellow_blue[range]   = 0.0;
+    }
 
   cb->preserve_luminosity = TRUE;
 }
 
 void
-color_balance_range_reset (ColorBalance     *cb,
-                           GimpTransferMode  range)
-{
-  g_return_if_fail (cb != NULL);
-
-  cb->cyan_red[range]      = 0.0;
-  cb->magenta_green[range] = 0.0;
-  cb->yellow_blue[range]   = 0.0;
-}
-
-void
 color_balance_create_lookup_tables (ColorBalance *cb)
 {
   gdouble *cyan_red_transfer[3];

Modified: branches/weskaggs/app/base/color-balance.h
==============================================================================
--- branches/weskaggs/app/base/color-balance.h	(original)
+++ branches/weskaggs/app/base/color-balance.h	Fri Jan 25 18:43:27 2008
@@ -35,8 +35,6 @@
 
 
 void   color_balance_init                 (ColorBalance     *cb);
-void   color_balance_range_reset          (ColorBalance     *cb,
-                                           GimpTransferMode  range);
 void   color_balance_create_lookup_tables (ColorBalance     *cb);
 void   color_balance                      (ColorBalance     *cb,
                                            PixelRegion      *srcPR,

Modified: branches/weskaggs/app/base/hue-saturation.c
==============================================================================
--- branches/weskaggs/app/base/hue-saturation.c	(original)
+++ branches/weskaggs/app/base/hue-saturation.c	Fri Jan 25 18:43:27 2008
@@ -37,19 +37,13 @@
   g_return_if_fail (hs != NULL);
 
   hs->overlap = 0.0;
-  for (partition = GIMP_ALL_HUES; partition <= GIMP_MAGENTA_HUES; partition++)
-    hue_saturation_partition_reset (hs, partition);
-}
 
-void
-hue_saturation_partition_reset (HueSaturation *hs,
-                                GimpHueRange   partition)
-{
-  g_return_if_fail (hs != NULL);
-
-  hs->hue[partition]        = 0.0;
-  hs->lightness[partition]  = 0.0;
-  hs->saturation[partition] = 0.0;
+  for (partition = GIMP_ALL_HUES; partition <= GIMP_MAGENTA_HUES; partition++)
+    {
+      hs->hue[partition]        = 0.0;
+      hs->lightness[partition]  = 0.0;
+      hs->saturation[partition] = 0.0;
+    }
 }
 
 void
@@ -65,6 +59,7 @@
   for (hue = 0; hue < 6; hue++)
     for (i = 0; i < 256; i++)
       {
+        /*  Hue  */
         value = (hs->hue[0] + hs->hue[hue + 1]) * 255.0 / 360.0;
         if ((i + value) < 0)
           hs->hue_transfer[hue][i] = 255 + (i + value);

Modified: branches/weskaggs/app/base/hue-saturation.h
==============================================================================
--- branches/weskaggs/app/base/hue-saturation.h	(original)
+++ branches/weskaggs/app/base/hue-saturation.h	Fri Jan 25 18:43:27 2008
@@ -34,8 +34,6 @@
 
 
 void   hue_saturation_init                (HueSaturation *hs);
-void   hue_saturation_partition_reset     (HueSaturation *hs,
-                                           GimpHueRange   partition);
 void   hue_saturation_calculate_transfers (HueSaturation *hs);
 void   hue_saturation                     (HueSaturation *hs,
                                            PixelRegion   *srcPR,

Modified: branches/weskaggs/app/base/levels.c
==============================================================================
--- branches/weskaggs/app/base/levels.c	(original)
+++ branches/weskaggs/app/base/levels.c	Fri Jan 25 18:43:27 2008
@@ -51,40 +51,6 @@
     }
 }
 
-void
-levels_calculate_transfers (Levels *levels)
-{
-  gdouble inten;
-  gint    i, j;
-
-  g_return_if_fail (levels != NULL);
-
-  /*  Recalculate the levels arrays  */
-  for (j = 0; j < 5; j++)
-    {
-      for (i = 0; i < 256; i++)
-        {
-          /*  determine input intensity  */
-          if (levels->high_input[j] != levels->low_input[j])
-            {
-              inten = ((gdouble) (i - levels->low_input[j]) /
-                       (double) (levels->high_input[j] - levels->low_input[j]));
-            }
-          else
-            {
-              inten = (gdouble) (i - levels->low_input[j]);
-            }
-
-          inten = CLAMP (inten, 0.0, 1.0);
-
-          if (levels->gamma[j] != 0.0)
-            inten = pow (inten, (1.0 / levels->gamma[j]));
-
-          levels->input[j][i] = (guchar) (inten * 255.0 + 0.5);
-        }
-    }
-}
-
 gfloat
 levels_lut_func (Levels *levels,
                  gint    n_channels,

Modified: branches/weskaggs/app/base/levels.h
==============================================================================
--- branches/weskaggs/app/base/levels.h	(original)
+++ branches/weskaggs/app/base/levels.h	Fri Jan 25 18:43:27 2008
@@ -29,17 +29,14 @@
 
   gint    low_output[5];
   gint    high_output[5];
-
-  guchar  input[5][256]; /* this is used only by the gui */
 };
 
 
-void     levels_init                (Levels *levels);
-void     levels_calculate_transfers (Levels *levels);
-gfloat   levels_lut_func            (Levels *levels,
-                                     gint    n_channels,
-                                     gint    channel,
-                                     gfloat  value);
+void     levels_init     (Levels *levels);
+gfloat   levels_lut_func (Levels *levels,
+                          gint    n_channels,
+                          gint    channel,
+                          gfloat  value);
 
 
 #endif  /*  __LEVELS_H__  */

Modified: branches/weskaggs/app/core/gimp.c
==============================================================================
--- branches/weskaggs/app/core/gimp.c	(original)
+++ branches/weskaggs/app/core/gimp.c	Fri Jan 25 18:43:27 2008
@@ -1079,4 +1079,3 @@
 
   g_free (message);
 }
-

Modified: branches/weskaggs/app/core/gimp.h
==============================================================================
--- branches/weskaggs/app/core/gimp.h	(original)
+++ branches/weskaggs/app/core/gimp.h	Fri Jan 25 18:43:27 2008
@@ -190,5 +190,7 @@
                                           const gchar         *format,
                                           va_list              args);
 
+gboolean       gimp_use_gegl             (Gimp                *gimp);
+
 
 #endif  /* __GIMP_H__ */

Modified: branches/weskaggs/app/core/gimpdrawable-desaturate.c
==============================================================================
--- branches/weskaggs/app/core/gimpdrawable-desaturate.c	(original)
+++ branches/weskaggs/app/core/gimpdrawable-desaturate.c	Fri Jan 25 18:43:27 2008
@@ -28,7 +28,6 @@
 #include "base/pixel-region.h"
 
 /* temp */
-#include "config/gimpcoreconfig.h"
 #include "gimp.h"
 #include "gimpimage.h"
 
@@ -60,7 +59,7 @@
   g_return_if_fail (gimp_drawable_is_rgb (drawable));
   g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
 
-  if (GIMP_ITEM (drawable)->image->gimp->config->use_gegl)
+  if (gimp_use_gegl (GIMP_ITEM (drawable)->image->gimp))
     {
       GeglNode *desaturate;
 

Modified: branches/weskaggs/app/core/gimpdrawable-invert.c
==============================================================================
--- branches/weskaggs/app/core/gimpdrawable-invert.c	(original)
+++ branches/weskaggs/app/core/gimpdrawable-invert.c	Fri Jan 25 18:43:27 2008
@@ -28,7 +28,6 @@
 #include "base/pixel-region.h"
 
 /* temp */
-#include "config/gimpcoreconfig.h"
 #include "gimp.h"
 #include "gimpimage.h"
 
@@ -48,7 +47,7 @@
   g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
   g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
 
-  if (GIMP_ITEM (drawable)->image->gimp->config->use_gegl)
+  if (gimp_use_gegl (GIMP_ITEM (drawable)->image->gimp))
     {
       GeglNode *invert;
 

Modified: branches/weskaggs/app/core/gimpdrawable-levels.c
==============================================================================
--- branches/weskaggs/app/core/gimpdrawable-levels.c	(original)
+++ branches/weskaggs/app/core/gimpdrawable-levels.c	Fri Jan 25 18:43:27 2008
@@ -31,7 +31,6 @@
 #include "gegl/gimplevelsconfig.h"
 
 /* temp */
-#include "config/gimpcoreconfig.h"
 #include "gimp.h"
 #include "gimpimage.h"
 
@@ -87,7 +86,7 @@
                 "high-output", high_output / 255.0,
                 NULL);
 
-  if (GIMP_ITEM (drawable)->image->gimp->config->use_gegl)
+  if (gimp_use_gegl (GIMP_ITEM (drawable)->image->gimp))
     {
       GeglNode *levels;
 
@@ -115,8 +114,8 @@
       if (! gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
         return;
 
-      gimp_levels_config_to_levels_cruft (config, &levels,
-                                          gimp_drawable_is_rgb (drawable));
+      gimp_levels_config_to_cruft (config, &levels,
+                                   gimp_drawable_is_rgb (drawable));
 
       lut = gimp_lut_new ();
       gimp_lut_setup (lut,
@@ -169,7 +168,7 @@
 
   gimp_histogram_free (histogram);
 
-  if (GIMP_ITEM (drawable)->image->gimp->config->use_gegl)
+  if (gimp_use_gegl (GIMP_ITEM (drawable)->image->gimp))
     {
       GeglNode *levels;
 
@@ -192,8 +191,8 @@
       Levels       levels;
       GimpLut     *lut;
 
-      gimp_levels_config_to_levels_cruft (config, &levels,
-                                          gimp_drawable_is_rgb (drawable));
+      gimp_levels_config_to_cruft (config, &levels,
+                                   gimp_drawable_is_rgb (drawable));
 
       lut  = gimp_lut_new ();
       gimp_lut_setup (lut,

Modified: branches/weskaggs/app/core/gimpimage-undo.c
==============================================================================
--- branches/weskaggs/app/core/gimpimage-undo.c	(original)
+++ branches/weskaggs/app/core/gimpimage-undo.c	Fri Jan 25 18:43:27 2008
@@ -150,11 +150,10 @@
   /* If the image was dirty, but could become clean by redo-ing
    * some actions, then it should now become 'infinitely' dirty.
    * This is because we've just nuked the actions that would allow
-   * the image to become clean again.  The only hope for salvation
-   * is to save the image now!  -- austin
+   * the image to become clean again.
    */
   if (image->dirty < 0)
-    image->dirty = 10000;
+    image->dirty = 100000;
 
   /* The same applies to the case where the image would become clean
    * due to undo actions, but since user can't undo without an undo
@@ -195,15 +194,6 @@
   /*  nuke the redo stack  */
   gimp_image_undo_free_redo (image);
 
-  /* If the image was dirty, but could become clean by redo-ing
-   * some actions, then it should now become 'infinitely' dirty.
-   * This is because we've just nuked the actions that would allow
-   * the image to become clean again.  The only hope for salvation
-   * is to save the image now!  -- austin
-   */
-  if (image->dirty < 0)
-    image->dirty = 10000;
-
   undo_group = gimp_undo_stack_new (image);
 
   gimp_object_set_name (GIMP_OBJECT (undo_group), name);
@@ -246,11 +236,11 @@
 }
 
 GimpUndo *
-gimp_image_undo_push (GimpImage        *image,
-                      GType             object_type,
-                      GimpUndoType      undo_type,
-                      const gchar      *name,
-                      GimpDirtyMask     dirty_mask,
+gimp_image_undo_push (GimpImage     *image,
+                      GType          object_type,
+                      GimpUndoType   undo_type,
+                      const gchar   *name,
+                      GimpDirtyMask  dirty_mask,
                       ...)
 {
   GParameter *params   = NULL;
@@ -292,15 +282,6 @@
   /*  nuke the redo stack  */
   gimp_image_undo_free_redo (image);
 
-  /* If the image was dirty, but could become clean by redo-ing
-   * some actions, then it should now become 'infinitely' dirty.
-   * This is because we've just nuked the actions that would allow
-   * the image to become clean again.  The only hope for salvation
-   * is to save the image now!  -- austin
-   */
-  if (image->dirty < 0)
-    image->dirty = 10000;
-
   if (image->pushing_undo_group == GIMP_UNDO_GROUP_NONE)
     {
       gimp_undo_stack_push_undo (image->undo_stack, undo);
@@ -473,9 +454,7 @@
 static void
 gimp_image_undo_free_redo (GimpImage *image)
 {
-  GimpContainer *container;
-
-  container = image->redo_stack->undos;
+  GimpContainer *container = image->redo_stack->undos;
 
 #ifdef DEBUG_IMAGE_UNDO
   g_printerr ("redo_steps: %d    redo_bytes: %ld\n",
@@ -483,6 +462,9 @@
               (glong) gimp_object_get_memsize (GIMP_OBJECT (container), NULL));
 #endif
 
+  if (gimp_container_is_empty (container))
+    return;
+
   while (gimp_container_num_children (container) > 0)
     {
       GimpUndo *freed = gimp_undo_stack_free_bottom (image->redo_stack,
@@ -499,6 +481,19 @@
 
       g_object_unref (freed);
     }
+
+  /* We need to use <= here because the undo counter has already been
+   * incremented at this point.
+   */
+  if (image->dirty <= 0)
+    {
+      /* If the image was dirty, but could become clean by redo-ing
+       * some actions, then it should now become 'infinitely' dirty.
+       * This is because we've just nuked the actions that would allow
+       * the image to become clean again.
+       */
+      image->dirty = 100000;
+    }
 }
 
 static GimpDirtyMask

Modified: branches/weskaggs/app/core/gimpimage.c
==============================================================================
--- branches/weskaggs/app/core/gimpimage.c	(original)
+++ branches/weskaggs/app/core/gimpimage.c	Fri Jan 25 18:43:27 2008
@@ -1978,11 +1978,11 @@
  *
  *   The image is dirty (ie, needs saving) if counter is non-zero.
  *
- *   If the counter is around 10000, this is due to undo-ing back
- *   before a saved version, then mutating the image (thus destroying
+ *   If the counter is around 100000, this is due to undo-ing back
+ *   before a saved version, then changing the image (thus destroying
  *   the redo stack).  Once this has happened, it's impossible to get
  *   the image back to the state on disk, since the redo info has been
- *   freed.  See undo.c for the gorey details.
+ *   freed.  See gimpimage-undo.c for the gory details.
  */
 
 

Modified: branches/weskaggs/app/core/gimpprojection.c
==============================================================================
--- branches/weskaggs/app/core/gimpprojection.c	(original)
+++ branches/weskaggs/app/core/gimpprojection.c	Fri Jan 25 18:43:27 2008
@@ -35,6 +35,10 @@
 #include "gimpprojection-construct.h"
 
 
+/*  halfway between G_PRIORITY_HIGH_IDLE and G_PRIORITY_DEFAULT_IDLE  */
+#define  GIMP_PROJECTION_IDLE_PRIORITY  150
+
+
 enum
 {
   UPDATE,
@@ -544,7 +548,7 @@
       gimp_projection_idle_render_next_area (proj);
 
       proj->idle_render.idle_id =
-        g_idle_add_full (G_PRIORITY_HIGH_IDLE,
+        g_idle_add_full (GIMP_PROJECTION_IDLE_PRIORITY,
                          gimp_projection_idle_render_callback, proj,
                          NULL);
     }

Modified: branches/weskaggs/app/dialogs/about-dialog.c
==============================================================================
--- branches/weskaggs/app/dialogs/about-dialog.c	(original)
+++ branches/weskaggs/app/dialogs/about-dialog.c	Fri Jan 25 18:43:27 2008
@@ -112,11 +112,7 @@
                              "role",               "about-dialog",
                              "window-position",    GTK_WIN_POS_CENTER,
                              "title",              _("About GIMP"),
-#if GTK_CHECK_VERSION (2, 11, 0)
                              "program-name",       GIMP_ACRONYM,
-#else
-                             "name",               GIMP_ACRONYM,
-#endif
                              "version",            GIMP_VERSION,
                              "copyright",          GIMP_COPYRIGHT,
                              "comments",           GIMP_NAME,

Modified: branches/weskaggs/app/display/gimpdisplayshell-callbacks.c
==============================================================================
--- branches/weskaggs/app/display/gimpdisplayshell-callbacks.c	(original)
+++ branches/weskaggs/app/display/gimpdisplayshell-callbacks.c	Fri Jan 25 18:43:27 2008
@@ -20,6 +20,7 @@
 
 #include <stdlib.h>
 
+#include <gegl.h>
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
@@ -81,7 +82,7 @@
 
 
 #define DEFAULT_EVENT_SMOOTHING  0.7
-
+#define DEFAULT_EVENT_FILTER  0.5
 
 /*  local function prototypes  */
 
@@ -1251,6 +1252,7 @@
                         if (gimp_display_shell_eval_event (shell,
                                                            &image_coords,
                                                            DEFAULT_EVENT_SMOOTHING,
+                                                           DEFAULT_EVENT_FILTER,
                                                            history_events[i]->time))
                           {
                             tool_manager_motion_active (gimp,
@@ -1272,6 +1274,7 @@
                     if (gimp_display_shell_eval_event (shell,
                                                        &image_coords,
                                                        DEFAULT_EVENT_SMOOTHING,
+                                                       DEFAULT_EVENT_FILTER,
                                                        time))
                       {
                         tool_manager_motion_active (gimp,
@@ -1292,7 +1295,11 @@
             /* Early removal of useless events saves CPU time.
              * Smoothing is 0.0 here for coasting.
              */
-            if (gimp_display_shell_eval_event (shell, &image_coords, 0.0, time))
+            if (gimp_display_shell_eval_event (shell,
+                                               &image_coords, 
+                                               0.0, 
+                                               DEFAULT_EVENT_FILTER,
+                                               time))
               {
                 tool_manager_oper_update_active (gimp,
                                                  &image_coords, state,

Modified: branches/weskaggs/app/display/gimpdisplayshell-coords.c
==============================================================================
--- branches/weskaggs/app/display/gimpdisplayshell-coords.c	(original)
+++ branches/weskaggs/app/display/gimpdisplayshell-coords.c	Fri Jan 25 18:43:27 2008
@@ -210,6 +210,7 @@
 gimp_display_shell_eval_event (GimpDisplayShell *shell,
                                GimpCoords       *coords,
 			       gdouble           inertia_factor,
+                               gdouble           filter_treshhold,
 			       guint32           time)
 {
   const gdouble  smooth_factor = 0.3;
@@ -230,10 +231,10 @@
       gdouble dx = coords->delta_x = shell->last_coords.x - coords->x;
       gdouble dy = coords->delta_y = shell->last_coords.y - coords->y;
 
-      /* Events with distances less than 1 in either motion direction
-       * are not worth handling.
+      /* Events with distances less than the filter_threshold are not
+         worth handling.
        */
-      if (fabs (dx) < 1.0 && fabs (dy) < 1.0)
+      if (fabs (dx) < filter_treshhold && fabs (dy) < filter_treshhold)
         return FALSE;
 
       coords->delta_time = thistime - shell->last_disp_motion_time;
@@ -260,7 +261,7 @@
           coords->velocity = MIN (coords->velocity, 1.0);
         }
 
-      if (inertia_factor > 0)
+      if (inertia_factor > 0 && coords->distance > 0)
         {
           /* Apply smoothing to X and Y. */
 
@@ -292,7 +293,7 @@
           new_x = (shell->last_coords.x - coords->delta_x) * 0.5 + coords->x * 0.5;
           new_y = (shell->last_coords.y - coords->delta_y) * 0.5 + coords->y * 0.5;
 
-          cur_deviation = SQR(coords->x-new_x) + SQR(coords->y-new_y);
+          cur_deviation = SQR (coords->x - new_x) + SQR (coords->y - new_y);
 
           while (cur_deviation >= max_deviation)
             {

Modified: branches/weskaggs/app/display/gimpdisplayshell-coords.h
==============================================================================
--- branches/weskaggs/app/display/gimpdisplayshell-coords.h	(original)
+++ branches/weskaggs/app/display/gimpdisplayshell-coords.h	Fri Jan 25 18:43:27 2008
@@ -41,6 +41,7 @@
 gboolean gimp_display_shell_eval_event        (GimpDisplayShell *shell,
                                                GimpCoords       *coords,
                                                gdouble           inertia_factor,
+                                               gdouble           filter_threshhold,
                                                guint32           time);
 
 

Modified: branches/weskaggs/app/display/gimpdisplayshell-selection.c
==============================================================================
--- branches/weskaggs/app/display/gimpdisplayshell-selection.c	(original)
+++ branches/weskaggs/app/display/gimpdisplayshell-selection.c	Fri Jan 25 18:43:27 2008
@@ -251,8 +251,8 @@
 {
   selection_stop (selection);
 
-  /*  If this selection is paused or invisible, do not start it  */
-  if (selection->paused == 0 && selection->visible)
+  /*  If this selection is paused, do not start it  */
+  if (selection->paused == 0)
     {
       selection->timeout = g_idle_add ((GSourceFunc) selection_start_timeout,
                                        selection);
@@ -706,11 +706,11 @@
                                    selection->num_segs_out);
 
 
-      if (selection->segs_in)
+      if (selection->segs_in && selection->visible)
         selection->timeout = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE,
                                                  config->marching_ants_speed,
                                                  (GSourceFunc) selection_timeout,
-                                                  selection, NULL);
+                                                 selection, NULL);
     }
 
   return FALSE;

Modified: branches/weskaggs/app/gegl/Makefile.am
==============================================================================
--- branches/weskaggs/app/gegl/Makefile.am	(original)
+++ branches/weskaggs/app/gegl/Makefile.am	Fri Jan 25 18:43:27 2008
@@ -8,15 +8,25 @@
 	gimp-gegl-utils.c		\
 	gimp-gegl-utils.h		\
 	\
+	gimpcolorbalanceconfig.c	\
+	gimpcolorbalanceconfig.h	\
 	gimpcolorizeconfig.c		\
 	gimpcolorizeconfig.h		\
+	gimpcurvesconfig.c		\
+	gimpcurvesconfig.h		\
+	gimphuesaturationconfig.c	\
+	gimphuesaturationconfig.h	\
 	gimplevelsconfig.c		\
 	gimplevelsconfig.h		\
+	gimpthresholdconfig.c		\
+	gimpthresholdconfig.h		\
 	\
 	gimpoperationcolorbalance.c	\
 	gimpoperationcolorbalance.h	\
 	gimpoperationcolorize.c		\
 	gimpoperationcolorize.h		\
+	gimpoperationcurves.c		\
+	gimpoperationcurves.h		\
 	gimpoperationdesaturate.c	\
 	gimpoperationdesaturate.h	\
 	gimpoperationhuesaturation.c	\
@@ -39,4 +49,5 @@
 	-I$(top_builddir)/app	\
 	-I$(top_srcdir)/app	\
 	$(GEGL_CFLAGS)		\
+	$(GDK_PIXBUF_CFLAGS)	\
 	-I$(includedir)

Modified: branches/weskaggs/app/gegl/gegl-types.h
==============================================================================
--- branches/weskaggs/app/gegl/gegl-types.h	(original)
+++ branches/weskaggs/app/gegl/gegl-types.h	Fri Jan 25 18:43:27 2008
@@ -30,6 +30,7 @@
 
 typedef struct _GimpOperationColorBalance  GimpOperationColorBalance;
 typedef struct _GimpOperationColorize      GimpOperationColorize;
+typedef struct _GimpOperationCurves        GimpOperationCurves;
 typedef struct _GimpOperationDesaturate    GimpOperationDesaturate;
 typedef struct _GimpOperationHueSaturation GimpOperationHueSaturation;
 typedef struct _GimpOperationLevels        GimpOperationLevels;
@@ -41,8 +42,12 @@
 
 /*  operation config objects  */
 
+typedef struct _GimpColorBalanceConfig     GimpColorBalanceConfig;
 typedef struct _GimpColorizeConfig         GimpColorizeConfig;
+typedef struct _GimpCurvesConfig           GimpCurvesConfig;
+typedef struct _GimpHueSaturationConfig    GimpHueSaturationConfig;
 typedef struct _GimpLevelsConfig           GimpLevelsConfig;
+typedef struct _GimpThresholdConfig        GimpThresholdConfig;
 
 
 #endif /* __GEGL_TYPES_H__ */

Modified: branches/weskaggs/app/gegl/gimp-gegl.c
==============================================================================
--- branches/weskaggs/app/gegl/gimp-gegl.c	(original)
+++ branches/weskaggs/app/gegl/gimp-gegl.c	Fri Jan 25 18:43:27 2008
@@ -28,6 +28,7 @@
 #include "gimp-gegl.h"
 #include "gimpoperationcolorbalance.h"
 #include "gimpoperationcolorize.h"
+#include "gimpoperationcurves.h"
 #include "gimpoperationdesaturate.h"
 #include "gimpoperationhuesaturation.h"
 #include "gimpoperationlevels.h"
@@ -42,6 +43,7 @@
 {
   g_type_class_ref (GIMP_TYPE_OPERATION_COLOR_BALANCE);
   g_type_class_ref (GIMP_TYPE_OPERATION_COLORIZE);
+  g_type_class_ref (GIMP_TYPE_OPERATION_CURVES);
   g_type_class_ref (GIMP_TYPE_OPERATION_DESATURATE);
   g_type_class_ref (GIMP_TYPE_OPERATION_HUE_SATURATION);
   g_type_class_ref (GIMP_TYPE_OPERATION_LEVELS);

Modified: branches/weskaggs/app/gegl/gimpcolorizeconfig.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpcolorizeconfig.c	(original)
+++ branches/weskaggs/app/gegl/gimpcolorizeconfig.c	Fri Jan 25 18:43:27 2008
@@ -25,6 +25,9 @@
 
 #include "gegl-types.h"
 
+/*  temp cruft  */
+#include "base/colorize.h"
+
 #include "gimpcolorizeconfig.h"
 
 
@@ -145,3 +148,33 @@
       break;
     }
 }
+
+
+/*  public functions  */
+
+void
+gimp_colorize_config_reset (GimpColorizeConfig *config)
+{
+  g_return_if_fail (GIMP_IS_COLORIZE_CONFIG (config));
+
+  config->hue        = 0.5;
+  config->saturation = 0.5;
+  config->lightness  = 0.0;
+}
+
+
+/*  temp cruft  */
+
+void
+gimp_colorize_config_to_cruft (GimpColorizeConfig *config,
+                               Colorize           *cruft)
+{
+  g_return_if_fail (GIMP_IS_COLORIZE_CONFIG (config));
+  g_return_if_fail (cruft != NULL);
+
+  cruft->hue        = config->hue        * 360.0;
+  cruft->saturation = config->saturation * 100.0;
+  cruft->lightness  = config->lightness  * 100.0;
+
+  colorize_calculate (cruft);
+}

Modified: branches/weskaggs/app/gegl/gimpcolorizeconfig.h
==============================================================================
--- branches/weskaggs/app/gegl/gimpcolorizeconfig.h	(original)
+++ branches/weskaggs/app/gegl/gimpcolorizeconfig.h	Fri Jan 25 18:43:27 2008
@@ -50,5 +50,11 @@
 
 GType   gimp_colorize_config_get_type (void) G_GNUC_CONST;
 
+void    gimp_colorize_config_reset    (GimpColorizeConfig *config);
+
+/*  temp cruft  */
+void    gimp_colorize_config_to_cruft (GimpColorizeConfig *config,
+                                       Colorize           *cruft);
+
 
 #endif /* __GIMP_COLORIZE_CONFIG_H__ */

Modified: branches/weskaggs/app/gegl/gimplevelsconfig.c
==============================================================================
--- branches/weskaggs/app/gegl/gimplevelsconfig.c	(original)
+++ branches/weskaggs/app/gegl/gimplevelsconfig.c	Fri Jan 25 18:43:27 2008
@@ -21,10 +21,15 @@
 
 #include "config.h"
 
+#include <errno.h>
+#include <string.h>
+
 #include <gegl.h>
+#include <glib/gstdio.h>
 
 #include "libgimpcolor/gimpcolor.h"
 #include "libgimpmath/gimpmath.h"
+#include "libgimpconfig/gimpconfig.h"
 
 #include "gegl-types.h"
 
@@ -35,6 +40,8 @@
 
 #include "gimplevelsconfig.h"
 
+#include "gimp-intl.h"
+
 
 enum
 {
@@ -413,13 +420,106 @@
     }
 }
 
+gboolean
+gimp_levels_config_load_cruft (GimpLevelsConfig  *config,
+                               gpointer           fp,
+                               GError           **error)
+{
+  FILE    *file = fp;
+  gint     low_input[5];
+  gint     high_input[5];
+  gint     low_output[5];
+  gint     high_output[5];
+  gdouble  gamma[5];
+  gint     i;
+  gint     fields;
+  gchar    buf[50];
+  gchar   *nptr;
+
+  g_return_val_if_fail (GIMP_IS_LEVELS_CONFIG (config), FALSE);
+  g_return_val_if_fail (file != NULL, FALSE);
+  g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+  if (! fgets (buf, sizeof (buf), file) ||
+      strcmp (buf, "# GIMP Levels File\n") != 0)
+    {
+      g_set_error (error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_PARSE,
+                   _("not a GIMP Levels file"));
+      return FALSE;
+    }
+
+  for (i = 0; i < 5; i++)
+    {
+      fields = fscanf (file, "%d %d %d %d ",
+                       &low_input[i],
+                       &high_input[i],
+                       &low_output[i],
+                       &high_output[i]);
+
+      if (fields != 4)
+        goto error;
+
+      if (! fgets (buf, 50, file))
+        goto error;
+
+      gamma[i] = g_ascii_strtod (buf, &nptr);
+
+      if (buf == nptr || errno == ERANGE)
+        goto error;
+    }
+
+  for (i = 0; i < 5; i++)
+    {
+      config->low_input[i]   = low_input[i]   / 255.0;
+      config->high_input[i]  = high_input[i]  / 255.0;
+      config->low_output[i]  = low_output[i]  / 255.0;
+      config->high_output[i] = high_output[i] / 255.0;
+      config->gamma[i]       = gamma[i];
+    }
+
+  return TRUE;
+
+ error:
+  g_set_error (error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_PARSE,
+               _("parse error"));
+  return FALSE;
+}
+
+gboolean
+gimp_levels_config_save_cruft (GimpLevelsConfig *config,
+                               gpointer          fp)
+{
+  FILE *file = fp;
+  gint  i;
+
+  g_return_val_if_fail (GIMP_IS_LEVELS_CONFIG (config), FALSE);
+  g_return_val_if_fail (file != NULL, FALSE);
+
+  fprintf (file, "# GIMP Levels File\n");
+
+  for (i = 0; i < 5; i++)
+    {
+      gchar buf[G_ASCII_DTOSTR_BUF_SIZE];
+
+      fprintf (file, "%d %d %d %d %s\n",
+               (gint) (config->low_input[i]   * 255.999),
+               (gint) (config->high_input[i]  * 255.999),
+               (gint) (config->low_output[i]  * 255.999),
+               (gint) (config->high_output[i] * 255.999),
+               g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
+                                config->gamma[i]));
+    }
+
+  return TRUE;
+}
+
 
 /*  temp cruft  */
 
 void
-gimp_levels_config_to_levels_cruft (GimpLevelsConfig *config,
-                                    Levels           *cruft,
-                                    gboolean          is_color)
+gimp_levels_config_to_cruft (GimpLevelsConfig *config,
+                             Levels           *cruft,
+                             gboolean          is_color)
 {
   GimpHistogramChannel channel;
 

Modified: branches/weskaggs/app/gegl/gimplevelsconfig.h
==============================================================================
--- branches/weskaggs/app/gegl/gimplevelsconfig.h	(original)
+++ branches/weskaggs/app/gegl/gimplevelsconfig.h	Fri Jan 25 18:43:27 2008
@@ -54,28 +54,35 @@
 };
 
 
-GType   gimp_levels_config_get_type         (void) G_GNUC_CONST;
+GType      gimp_levels_config_get_type         (void) G_GNUC_CONST;
+
+void       gimp_levels_config_reset            (GimpLevelsConfig      *config);
+void       gimp_levels_config_reset_channel    (GimpLevelsConfig      *config,
+                                                GimpHistogramChannel   channel);
+
+void       gimp_levels_config_stretch          (GimpLevelsConfig      *config,
+                                                GimpHistogram         *histogram,
+                                                gboolean               is_color);
+void       gimp_levels_config_stretch_channel  (GimpLevelsConfig      *config,
+                                                GimpHistogram         *histogram,
+                                                GimpHistogramChannel   channel);
+void       gimp_levels_config_adjust_by_colors (GimpLevelsConfig      *config,
+                                                GimpHistogramChannel   channel,
+                                                const GimpRGB         *black,
+                                                const GimpRGB         *gray,
+                                                const GimpRGB         *white);
+
+gboolean   gimp_levels_config_load_cruft       (GimpLevelsConfig      *config,
+                                                gpointer               fp,
+                                                GError               **error);
+gboolean   gimp_levels_config_save_cruft       (GimpLevelsConfig      *config,
+                                                gpointer               fp);
 
-void    gimp_levels_config_reset            (GimpLevelsConfig     *config);
-void    gimp_levels_config_reset_channel    (GimpLevelsConfig     *config,
-                                             GimpHistogramChannel  channel);
-
-void    gimp_levels_config_stretch          (GimpLevelsConfig     *config,
-                                             GimpHistogram        *histogram,
-                                             gboolean              is_color);
-void    gimp_levels_config_stretch_channel  (GimpLevelsConfig     *config,
-                                             GimpHistogram        *histogram,
-                                             GimpHistogramChannel  channel);
-void    gimp_levels_config_adjust_by_colors (GimpLevelsConfig     *config,
-                                             GimpHistogramChannel  channel,
-                                             const GimpRGB        *black,
-                                             const GimpRGB        *gray,
-                                             const GimpRGB        *white);
 
 /*  temp cruft  */
-void    gimp_levels_config_to_levels_cruft  (GimpLevelsConfig     *config,
-                                             Levels               *cruft,
-                                             gboolean              is_color);
+void       gimp_levels_config_to_cruft         (GimpLevelsConfig      *config,
+                                                Levels                *cruft,
+                                                gboolean               is_color);
 
 
 #endif /* __GIMP_LEVELS_CONFIG_H__ */

Modified: branches/weskaggs/app/gegl/gimpoperationcolorbalance.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationcolorbalance.c	(original)
+++ branches/weskaggs/app/gegl/gimpoperationcolorbalance.c	Fri Jan 25 18:43:27 2008
@@ -28,20 +28,18 @@
 
 #include "gegl-types.h"
 
+#include "gimpcolorbalanceconfig.h"
 #include "gimpoperationcolorbalance.h"
 
 
 enum
 {
   PROP_0,
-  PROP_RANGE,
-  PROP_CYAN_RED,
-  PROP_MAGENTA_GREEN,
-  PROP_YELLOW_BLUE,
-  PROP_PRESERVE_LUMINOSITY
+  PROP_CONFIG
 };
 
 
+static void     gimp_operation_color_balance_finalize     (GObject       *object);
 static void     gimp_operation_color_balance_get_property (GObject       *object,
                                                            guint          property_id,
                                                            GValue        *value,
@@ -70,6 +68,7 @@
   GeglOperationClass            *operation_class = GEGL_OPERATION_CLASS (klass);
   GeglOperationPointFilterClass *point_class     = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
 
+  object_class->finalize     = gimp_operation_color_balance_finalize;
   object_class->set_property = gimp_operation_color_balance_set_property;
   object_class->get_property = gimp_operation_color_balance_get_property;
 
@@ -77,63 +76,32 @@
 
   gegl_operation_class_set_name (operation_class, "gimp-color-balance");
 
-  g_object_class_install_property (object_class, PROP_RANGE,
-                                   g_param_spec_enum ("range",
-                                                      "range",
-                                                      "The affected range",
-                                                      GIMP_TYPE_TRANSFER_MODE,
-                                                      GIMP_MIDTONES,
-                                                      G_PARAM_READWRITE |
-                                                      G_PARAM_CONSTRUCT));
-
-  g_object_class_install_property (object_class, PROP_CYAN_RED,
-                                   g_param_spec_double ("cyan-red",
-                                                        "Cyan-Red",
-                                                        "Cyan-Red",
-                                                        -1.0, 1.0, 0.0,
+  g_object_class_install_property (object_class, PROP_CONFIG,
+                                   g_param_spec_object ("config",
+                                                        "Config",
+                                                        "The config object",
+                                                        GIMP_TYPE_COLOR_BALANCE_CONFIG,
                                                         G_PARAM_READWRITE |
                                                         G_PARAM_CONSTRUCT));
-
-  g_object_class_install_property (object_class, PROP_MAGENTA_GREEN,
-                                   g_param_spec_double ("magenta-green",
-                                                        "Magenta-Green",
-                                                        "Magenta-Green",
-                                                        -1.0, 1.0, 0.0,
-                                                        G_PARAM_READWRITE |
-                                                        G_PARAM_CONSTRUCT));
-
-  g_object_class_install_property (object_class, PROP_YELLOW_BLUE,
-                                   g_param_spec_double ("yellow-blue",
-                                                        "Yellow-Blue",
-                                                        "Yellow-Blue",
-                                                        -1.0, 1.0, 1.0,
-                                                        G_PARAM_READWRITE |
-                                                        G_PARAM_CONSTRUCT));
-
-  g_object_class_install_property (object_class, PROP_PRESERVE_LUMINOSITY,
-                                   g_param_spec_boolean ("preserve-luminosity",
-                                                         "Preserve Luminosity",
-                                                         "Preserve Luminosity",
-                                                         TRUE,
-                                                         G_PARAM_READWRITE |
-                                                         G_PARAM_CONSTRUCT));
 }
 
 static void
 gimp_operation_color_balance_init (GimpOperationColorBalance *self)
 {
-  GimpTransferMode range;
+}
 
-  self->range = GIMP_MIDTONES;
+static void
+gimp_operation_color_balance_finalize (GObject *object)
+{
+  GimpOperationColorBalance *self = GIMP_OPERATION_COLOR_BALANCE (object);
 
-  for (range = GIMP_SHADOWS; range <= GIMP_HIGHLIGHTS; range++)
+  if (self->config)
     {
-      self->cyan_red[range]      = 0.0;
-      self->magenta_green[range] = 0.0;
-      self->yellow_blue[range]   = 0.0;
+      g_object_unref (self->config);
+      self->config = NULL;
     }
 
-  self->preserve_luminosity = TRUE;
+  G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
 static void
@@ -146,24 +114,8 @@
 
   switch (property_id)
     {
-    case PROP_RANGE:
-      g_value_set_enum (value, self->range);
-      break;
-
-    case PROP_CYAN_RED:
-      g_value_set_double (value, self->cyan_red[self->range]);
-      break;
-
-    case PROP_MAGENTA_GREEN:
-      g_value_set_double (value, self->magenta_green[self->range]);
-      break;
-
-    case PROP_YELLOW_BLUE:
-      g_value_set_double (value, self->yellow_blue[self->range]);
-      break;
-
-    case PROP_PRESERVE_LUMINOSITY:
-      g_value_set_boolean (value, self->preserve_luminosity);
+    case PROP_CONFIG:
+      g_value_set_object (value, self->config);
       break;
 
     default:
@@ -182,24 +134,10 @@
 
   switch (property_id)
     {
-    case PROP_RANGE:
-      self->range = g_value_get_enum (value);
-      break;
-
-    case PROP_CYAN_RED:
-      self->cyan_red[self->range] = g_value_get_double (value);
-      break;
-
-    case PROP_MAGENTA_GREEN:
-      self->magenta_green[self->range] = g_value_get_double (value);
-      break;
-
-    case PROP_YELLOW_BLUE:
-      self->yellow_blue[self->range] = g_value_get_double (value);
-      break;
-
-    case PROP_PRESERVE_LUMINOSITY:
-      self->preserve_luminosity = g_value_get_boolean (value);
+    case PROP_CONFIG:
+      if (self->config)
+        g_object_unref (self->config);
+      self->config = g_value_dup_object (value);
       break;
 
    default:
@@ -250,11 +188,15 @@
                                       void          *out_buf,
                                       glong          samples)
 {
-  GimpOperationColorBalance *self = GIMP_OPERATION_COLOR_BALANCE (operation);
-  gfloat                    *src  = in_buf;
-  gfloat                    *dest = out_buf;
+  GimpOperationColorBalance *self   = GIMP_OPERATION_COLOR_BALANCE (operation);
+  GimpColorBalanceConfig    *config = self->config;
+  gfloat                    *src    = in_buf;
+  gfloat                    *dest   = out_buf;
   glong                      sample;
 
+  if (! config)
+    return FALSE;
+
   for (sample = 0; sample < samples; sample++)
     {
       gfloat r = src[RED_PIX];
@@ -265,21 +207,21 @@
       gfloat b_n;
 
       r_n = gimp_operation_color_balance_map (r,
-                                              self->cyan_red[GIMP_SHADOWS],
-                                              self->cyan_red[GIMP_MIDTONES],
-                                              self->cyan_red[GIMP_HIGHLIGHTS]);
+                                              config->cyan_red[GIMP_SHADOWS],
+                                              config->cyan_red[GIMP_MIDTONES],
+                                              config->cyan_red[GIMP_HIGHLIGHTS]);
 
       g_n = gimp_operation_color_balance_map (g,
-                                              self->magenta_green[GIMP_SHADOWS],
-                                              self->magenta_green[GIMP_MIDTONES],
-                                              self->magenta_green[GIMP_HIGHLIGHTS]);
+                                              config->magenta_green[GIMP_SHADOWS],
+                                              config->magenta_green[GIMP_MIDTONES],
+                                              config->magenta_green[GIMP_HIGHLIGHTS]);
 
       b_n = gimp_operation_color_balance_map (b,
-                                              self->yellow_blue[GIMP_SHADOWS],
-                                              self->yellow_blue[GIMP_MIDTONES],
-                                              self->yellow_blue[GIMP_HIGHLIGHTS]);
+                                              config->yellow_blue[GIMP_SHADOWS],
+                                              config->yellow_blue[GIMP_MIDTONES],
+                                              config->yellow_blue[GIMP_HIGHLIGHTS]);
 
-      if (self->preserve_luminosity)
+      if (config->preserve_luminosity)
         {
           GimpRGB rgb;
           GimpHSL hsl;

Modified: branches/weskaggs/app/gegl/gimpoperationcolorbalance.h
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationcolorbalance.h	(original)
+++ branches/weskaggs/app/gegl/gimpoperationcolorbalance.h	Fri Jan 25 18:43:27 2008
@@ -23,6 +23,7 @@
 #define __GIMP_OPERATION_COLOR_BALANCE_H__
 
 
+#include <gegl-plugin.h>
 #include <operation/gegl-operation-point-filter.h>
 
 
@@ -40,13 +41,7 @@
 {
   GeglOperationPointFilter  parent_instance;
 
-  GimpTransferMode          range;
-
-  gdouble                   cyan_red[3];
-  gdouble                   magenta_green[3];
-  gdouble                   yellow_blue[3];
-
-  gboolean                  preserve_luminosity;
+  GimpColorBalanceConfig   *config;
 };
 
 struct _GimpOperationColorBalanceClass

Modified: branches/weskaggs/app/gegl/gimpoperationcolorize.h
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationcolorize.h	(original)
+++ branches/weskaggs/app/gegl/gimpoperationcolorize.h	Fri Jan 25 18:43:27 2008
@@ -22,7 +22,7 @@
 #ifndef __GIMP_OPERATION_COLORIZE_H__
 #define __GIMP_OPERATION_COLORIZE_H__
 
-
+#include <gegl-plugin.h>
 #include <operation/gegl-operation-point-filter.h>
 
 

Modified: branches/weskaggs/app/gegl/gimpoperationdesaturate.h
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationdesaturate.h	(original)
+++ branches/weskaggs/app/gegl/gimpoperationdesaturate.h	Fri Jan 25 18:43:27 2008
@@ -22,7 +22,7 @@
 #ifndef __GIMP_OPERATION_DESATURATE_H__
 #define __GIMP_OPERATION_DESATURATE_H__
 
-
+#include <gegl-plugin.h>
 #include <operation/gegl-operation-point-filter.h>
 
 

Modified: branches/weskaggs/app/gegl/gimpoperationhuesaturation.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationhuesaturation.c	(original)
+++ branches/weskaggs/app/gegl/gimpoperationhuesaturation.c	Fri Jan 25 18:43:27 2008
@@ -28,20 +28,18 @@
 
 #include "gegl-types.h"
 
+#include "gimphuesaturationconfig.h"
 #include "gimpoperationhuesaturation.h"
 
 
 enum
 {
   PROP_0,
-  PROP_RANGE,
-  PROP_HUE,
-  PROP_SATURATION,
-  PROP_LIGHTNESS,
-  PROP_OVERLAP
+  PROP_CONFIG
 };
 
 
+static void     gimp_operation_hue_saturation_finalize     (GObject       *object);
 static void     gimp_operation_hue_saturation_get_property (GObject       *object,
                                                             guint          property_id,
                                                             GValue        *value,
@@ -70,6 +68,7 @@
   GeglOperationClass            *operation_class = GEGL_OPERATION_CLASS (klass);
   GeglOperationPointFilterClass *point_class     = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
 
+  object_class->finalize     = gimp_operation_hue_saturation_finalize;
   object_class->set_property = gimp_operation_hue_saturation_set_property;
   object_class->get_property = gimp_operation_hue_saturation_get_property;
 
@@ -77,44 +76,11 @@
 
   gegl_operation_class_set_name (operation_class, "gimp-hue-saturation");
 
-  g_object_class_install_property (object_class, PROP_RANGE,
-                                   g_param_spec_enum ("range",
-                                                      "range",
-                                                      "The affected range",
-                                                      GIMP_TYPE_HUE_RANGE,
-                                                      GIMP_ALL_HUES,
-                                                      G_PARAM_READWRITE |
-                                                      G_PARAM_CONSTRUCT));
-
-  g_object_class_install_property (object_class, PROP_HUE,
-                                   g_param_spec_double ("hue",
-                                                        "Hue",
-                                                        "Hue",
-                                                        -1.0, 1.0, 0.0,
-                                                        G_PARAM_READWRITE |
-                                                        G_PARAM_CONSTRUCT));
-
-  g_object_class_install_property (object_class, PROP_SATURATION,
-                                   g_param_spec_double ("saturation",
-                                                        "Saturation",
-                                                        "Saturation",
-                                                        -1.0, 1.0, 0.0,
-                                                        G_PARAM_READWRITE |
-                                                        G_PARAM_CONSTRUCT));
-
-  g_object_class_install_property (object_class, PROP_LIGHTNESS,
-                                   g_param_spec_double ("lightness",
-                                                        "Lightness",
-                                                        "Lightness",
-                                                        -1.0, 1.0, 0.0,
-                                                        G_PARAM_READWRITE |
-                                                        G_PARAM_CONSTRUCT));
-
-  g_object_class_install_property (object_class, PROP_OVERLAP,
-                                   g_param_spec_double ("overlap",
-                                                        "Overlap",
-                                                        "Overlap",
-                                                        0.0, 1.0, 0.0,
+  g_object_class_install_property (object_class, PROP_CONFIG,
+                                   g_param_spec_object ("config",
+                                                        "Config",
+                                                        "The config object",
+                                                        GIMP_TYPE_HUE_SATURATION_CONFIG,
                                                         G_PARAM_READWRITE |
                                                         G_PARAM_CONSTRUCT));
 }
@@ -122,18 +88,20 @@
 static void
 gimp_operation_hue_saturation_init (GimpOperationHueSaturation *self)
 {
-  GimpHueRange range;
+}
 
-  self->range = GIMP_ALL_HUES;
+static void
+gimp_operation_hue_saturation_finalize (GObject *object)
+{
+  GimpOperationHueSaturation *self = GIMP_OPERATION_HUE_SATURATION (object);
 
-  for (range = GIMP_ALL_HUES; range <= GIMP_MAGENTA_HUES; range++)
+  if (self->config)
     {
-      self->hue[range]        = 0.0;
-      self->saturation[range] = 0.0;
-      self->lightness[range]  = 0.0;
+      g_object_unref (self->config);
+      self->config = NULL;
     }
 
-  self->overlap = 0.0;
+  G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
 static void
@@ -146,24 +114,8 @@
 
   switch (property_id)
     {
-    case PROP_RANGE:
-      g_value_set_enum (value, self->range);
-      break;
-
-    case PROP_HUE:
-      g_value_set_double (value, self->hue[self->range]);
-      break;
-
-    case PROP_SATURATION:
-      g_value_set_double (value, self->saturation[self->range]);
-      break;
-
-    case PROP_LIGHTNESS:
-      g_value_set_double (value, self->lightness[self->range]);
-      break;
-
-    case PROP_OVERLAP:
-      g_value_set_double (value, self->overlap);
+    case PROP_CONFIG:
+      g_value_set_object (value, self->config);
       break;
 
     default:
@@ -182,24 +134,10 @@
 
   switch (property_id)
     {
-    case PROP_RANGE:
-      self->range = g_value_get_enum (value);
-      break;
-
-    case PROP_HUE:
-      self->hue[self->range] = g_value_get_double (value);
-      break;
-
-    case PROP_SATURATION:
-      self->saturation[self->range] = g_value_get_double (value);
-      break;
-
-    case PROP_LIGHTNESS:
-      self->lightness[self->range] = g_value_get_double (value);
-      break;
-
-    case PROP_OVERLAP:
-      self->overlap = g_value_get_double (value);
+    case PROP_CONFIG:
+      if (self->config)
+        g_object_unref (self->config);
+      self->config = g_value_dup_object (value);
       break;
 
    default:
@@ -209,11 +147,11 @@
 }
 
 static inline gdouble
-map_hue (GimpOperationHueSaturation *self,
-         gint                        hue,
-         gdouble                     value)
+map_hue (GimpHueSaturationConfig *config,
+         GimpHueRange             range,
+         gdouble                  value)
 {
-  value += (self->hue[0] + self->hue[hue + 1]) / 2.0;
+  value += (config->hue[GIMP_ALL_HUES] + config->hue[range]) / 2.0;
 
   if (value < 0)
     return value + 1.0;
@@ -224,13 +162,11 @@
 }
 
 static inline gdouble
-map_saturation (GimpOperationHueSaturation *self,
-                gint                        hue,
-                gdouble                     value)
+map_saturation (GimpHueSaturationConfig *config,
+                GimpHueRange             range,
+                gdouble                  value)
 {
-  gdouble v = self->saturation[0] + self->saturation[hue + 1];
-
-  // v = CLAMP (v, -1.0, 1.0);
+  gdouble v = config->saturation[GIMP_ALL_HUES] + config->saturation[range];
 
   /* This change affects the way saturation is computed. With the old
    * code (different code for value < 0), increasing the saturation
@@ -246,13 +182,11 @@
 }
 
 static inline gdouble
-map_lightness (GimpOperationHueSaturation *self,
-               gint                        hue,
-               gdouble                     value)
+map_lightness (GimpHueSaturationConfig *config,
+               GimpHueRange             range,
+               gdouble                  value)
 {
-  gdouble v = (self->lightness[0] + self->lightness[hue + 1]) / 2.0;
-
-  // v = CLAMP (v, -1.0, 1.0);
+  gdouble v = (config->lightness[GIMP_ALL_HUES] + config->lightness[range]) / 2.0;
 
   if (v < 0)
     return value * (v + 1.0);
@@ -267,9 +201,10 @@
                                        glong          samples)
 {
   GimpOperationHueSaturation *self    = GIMP_OPERATION_HUE_SATURATION (operation);
+  GimpHueSaturationConfig    *config  = self->config;
   gfloat                     *src     = in_buf;
   gfloat                     *dest    = out_buf;
-  gfloat                      overlap = self->overlap / 2.0;
+  gfloat                      overlap = config->overlap / 2.0;
   glong                       sample;
 
   for (sample = 0; sample < samples; sample++)
@@ -331,22 +266,26 @@
           secondary_hue = 0;
         }
 
+      /*  transform into GimpHueRange values  */
+      hue++;
+      secondary_hue++;
+
       if (use_secondary_hue)
         {
-          hsl.h = (map_hue        (self, hue,           hsl.h) * primary_intensity +
-                   map_hue        (self, secondary_hue, hsl.h) * secondary_intensity);
+          hsl.h = (map_hue        (config, hue,           hsl.h) * primary_intensity +
+                   map_hue        (config, secondary_hue, hsl.h) * secondary_intensity);
 
-          hsl.s = (map_saturation (self, hue,           hsl.s) * primary_intensity +
-                   map_saturation (self, secondary_hue, hsl.s) * secondary_intensity);
+          hsl.s = (map_saturation (config, hue,           hsl.s) * primary_intensity +
+                   map_saturation (config, secondary_hue, hsl.s) * secondary_intensity);
 
-          hsl.l = (map_lightness  (self, hue,           hsl.l) * primary_intensity +
-                   map_lightness  (self, secondary_hue, hsl.l) * secondary_intensity);
+          hsl.l = (map_lightness  (config, hue,           hsl.l) * primary_intensity +
+                   map_lightness  (config, secondary_hue, hsl.l) * secondary_intensity);
         }
       else
         {
-          hsl.h = map_hue        (self, hue, hsl.h);
-          hsl.s = map_saturation (self, hue, hsl.s);
-          hsl.l = map_lightness  (self, hue, hsl.l);
+          hsl.h = map_hue        (config, hue, hsl.h);
+          hsl.s = map_saturation (config, hue, hsl.s);
+          hsl.l = map_lightness  (config, hue, hsl.l);
         }
 
       gimp_hsl_to_rgb (&hsl, &rgb);
@@ -362,3 +301,27 @@
 
   return TRUE;
 }
+
+
+/*  public functions  */
+
+void
+gimp_operation_hue_saturation_map (GimpHueSaturationConfig *config,
+                                   const GimpRGB           *color,
+                                   GimpHueRange             range,
+                                   GimpRGB                 *result)
+{
+  GimpHSL hsl;
+
+  g_return_if_fail (GIMP_IS_HUE_SATURATION_CONFIG (config));
+  g_return_if_fail (color != NULL);
+  g_return_if_fail (result != NULL);
+
+  gimp_rgb_to_hsl (color, &hsl);
+
+  hsl.h = map_hue        (config, range, hsl.h);
+  hsl.s = map_saturation (config, range, hsl.s);
+  hsl.l = map_lightness  (config, range, hsl.l);
+
+  gimp_hsl_to_rgb (&hsl, result);
+}

Modified: branches/weskaggs/app/gegl/gimpoperationhuesaturation.h
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationhuesaturation.h	(original)
+++ branches/weskaggs/app/gegl/gimpoperationhuesaturation.h	Fri Jan 25 18:43:27 2008
@@ -22,7 +22,7 @@
 #ifndef __GIMP_OPERATION_HUE_SATURATION_H__
 #define __GIMP_OPERATION_HUE_SATURATION_H__
 
-
+#include <gegl-plugin.h>
 #include <operation/gegl-operation-point-filter.h>
 
 
@@ -40,13 +40,7 @@
 {
   GeglOperationPointFilter  parent_instance;
 
-  GimpHueRange              range;
-
-  gdouble                   hue[7];
-  gdouble                   saturation[7];
-  gdouble                   lightness[7];
-
-  gdouble                   overlap;
+  GimpHueSaturationConfig  *config;
 };
 
 struct _GimpOperationHueSaturationClass
@@ -57,5 +51,10 @@
 
 GType   gimp_operation_hue_saturation_get_type (void) G_GNUC_CONST;
 
+void    gimp_operation_hue_saturation_map      (GimpHueSaturationConfig *config,
+                                                const GimpRGB           *color,
+                                                GimpHueRange             range,
+                                                GimpRGB                 *result);
+
 
 #endif /* __GIMP_OPERATION_HUE_SATURATION_H__ */

Modified: branches/weskaggs/app/gegl/gimpoperationlevels.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationlevels.c	(original)
+++ branches/weskaggs/app/gegl/gimpoperationlevels.c	Fri Jan 25 18:43:27 2008
@@ -225,3 +225,31 @@
 
   return TRUE;
 }
+
+
+/*  public functions  */
+
+gdouble
+gimp_operation_levels_map_input (GimpLevelsConfig     *config,
+                                 GimpHistogramChannel  channel,
+                                 gdouble               value)
+{
+  g_return_val_if_fail (GIMP_IS_LEVELS_CONFIG (config), 0.0);
+
+  /*  determine input intensity  */
+  if (config->high_input[channel] != config->low_input[channel])
+    value = ((value - config->low_input[channel]) /
+             (config->high_input[channel] - config->low_input[channel]));
+  else
+    value = (value - config->low_input[channel]);
+
+  value = CLAMP (value, 0.0, 1.0);
+
+  if (config->gamma[channel] != 0.0)
+    {
+      value = pow (value, 1.0 / config->gamma[channel]);
+    }
+
+  return value;
+}
+

Modified: branches/weskaggs/app/gegl/gimpoperationlevels.h
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationlevels.h	(original)
+++ branches/weskaggs/app/gegl/gimpoperationlevels.h	Fri Jan 25 18:43:27 2008
@@ -23,6 +23,7 @@
 #define __GIMP_OPERATION_LEVELS_H__
 
 
+#include <gegl-plugin.h>
 #include <operation/gegl-operation-point-filter.h>
 
 
@@ -49,7 +50,11 @@
 };
 
 
-GType   gimp_operation_levels_get_type (void) G_GNUC_CONST;
+GType     gimp_operation_levels_get_type  (void) G_GNUC_CONST;
+
+gdouble   gimp_operation_levels_map_input (GimpLevelsConfig     *config,
+                                           GimpHistogramChannel  channel,
+                                           gdouble               value);
 
 
 #endif /* __GIMP_OPERATION_LEVELS_H__ */

Modified: branches/weskaggs/app/gegl/gimpoperationposterize.h
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationposterize.h	(original)
+++ branches/weskaggs/app/gegl/gimpoperationposterize.h	Fri Jan 25 18:43:27 2008
@@ -23,6 +23,7 @@
 #define __GIMP_OPERATION_POSTERIZE_H__
 
 
+#include <gegl-plugin.h>
 #include <operation/gegl-operation-point-filter.h>
 
 

Modified: branches/weskaggs/app/gegl/gimpoperationthreshold.c
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationthreshold.c	(original)
+++ branches/weskaggs/app/gegl/gimpoperationthreshold.c	Fri Jan 25 18:43:27 2008
@@ -28,16 +28,17 @@
 #include "gegl-types.h"
 
 #include "gimpoperationthreshold.h"
+#include "gimpthresholdconfig.h"
 
 
 enum
 {
   PROP_0,
-  PROP_LOW,
-  PROP_HIGH
+  PROP_CONFIG
 };
 
 
+static void     gimp_operation_threshold_finalize     (GObject       *object);
 static void     gimp_operation_threshold_get_property (GObject       *object,
                                                        guint          property_id,
                                                        GValue        *value,
@@ -66,6 +67,7 @@
   GeglOperationClass            *operation_class = GEGL_OPERATION_CLASS (klass);
   GeglOperationPointFilterClass *point_class     = GEGL_OPERATION_POINT_FILTER_CLASS (klass);
 
+  object_class->finalize     = gimp_operation_threshold_finalize;
   object_class->set_property = gimp_operation_threshold_set_property;
   object_class->get_property = gimp_operation_threshold_get_property;
 
@@ -73,19 +75,11 @@
 
   gegl_operation_class_set_name (operation_class, "gimp-threshold");
 
-  g_object_class_install_property (object_class, PROP_LOW,
-                                   g_param_spec_double ("low",
-                                                        "Low",
-                                                        "Low threshold",
-                                                        0.0, 1.0, 0.5,
-                                                        G_PARAM_READWRITE |
-                                                        G_PARAM_CONSTRUCT));
-
-  g_object_class_install_property (object_class, PROP_HIGH,
-                                   g_param_spec_double ("high",
-                                                        "High",
-                                                        "High threshold",
-                                                        0.0, 1.0, 1.0,
+  g_object_class_install_property (object_class, PROP_CONFIG,
+                                   g_param_spec_object ("config",
+                                                        "Config",
+                                                        "The config object",
+                                                        GIMP_TYPE_THRESHOLD_CONFIG,
                                                         G_PARAM_READWRITE |
                                                         G_PARAM_CONSTRUCT));
 }
@@ -96,6 +90,20 @@
 }
 
 static void
+gimp_operation_threshold_finalize (GObject *object)
+{
+  GimpOperationThreshold *self = GIMP_OPERATION_THRESHOLD (object);
+
+  if (self->config)
+    {
+      g_object_unref (self->config);
+      self->config = NULL;
+    }
+
+  G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
 gimp_operation_threshold_get_property (GObject    *object,
                                        guint       property_id,
                                        GValue     *value,
@@ -105,12 +113,8 @@
 
   switch (property_id)
     {
-    case PROP_LOW:
-      g_value_set_double (value, self->low);
-      break;
-
-    case PROP_HIGH:
-      g_value_set_double (value, self->high);
+    case PROP_CONFIG:
+      g_value_set_object (value, self->config);
       break;
 
     default:
@@ -129,12 +133,10 @@
 
   switch (property_id)
     {
-    case PROP_LOW:
-      self->low = g_value_get_double (value);
-      break;
-
-    case PROP_HIGH:
-      self->high = g_value_get_double (value);
+    case PROP_CONFIG:
+      if (self->config)
+        g_object_unref (self->config);
+      self->config = g_value_dup_object (value);
       break;
 
     default:
@@ -149,11 +151,15 @@
                                   void          *out_buf,
                                   glong          samples)
 {
-  GimpOperationThreshold *self = GIMP_OPERATION_THRESHOLD (operation);
-  gfloat                 *src  = in_buf;
-  gfloat                 *dest = out_buf;
+  GimpOperationThreshold *self   = GIMP_OPERATION_THRESHOLD (operation);
+  GimpThresholdConfig    *config = self->config;
+  gfloat                 *src    = in_buf;
+  gfloat                 *dest   = out_buf;
   glong                   sample;
 
+  if (! config)
+    return FALSE;
+
   for (sample = 0; sample < samples; sample++)
     {
       gfloat value;
@@ -161,7 +167,7 @@
       value = MAX (src[RED_PIX], src[GREEN_PIX]);
       value = MAX (value, src[BLUE_PIX]);
 
-      value = (value >= self->low && value <= self->high) ? 1.0 : 0.0;
+      value = (value >= config->low && value <= config->high) ? 1.0 : 0.0;
 
       dest[RED_PIX]   = value;
       dest[GREEN_PIX] = value;

Modified: branches/weskaggs/app/gegl/gimpoperationthreshold.h
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationthreshold.h	(original)
+++ branches/weskaggs/app/gegl/gimpoperationthreshold.h	Fri Jan 25 18:43:27 2008
@@ -23,13 +23,16 @@
 #define __GIMP_OPERATION_THRESHOLD_H__
 
 
+#include <gegl-plugin.h>
 #include <operation/gegl-operation-point-filter.h>
 
 
-#define GIMP_TYPE_OPERATION_THRESHOLD           (gimp_operation_threshold_get_type ())
-#define GIMP_OPERATION_THRESHOLD(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_THRESHOLD, GimpOperationThreshold))
-#define GIMP_OPERATION_THRESHOLD_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass),  GIMP_TYPE_OPERATION_THRESHOLD, GimpOperationThresholdClass))
-#define GIMP_OPERATION_THRESHOLD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),  GIMP_TYPE_OPERATION_THRESHOLD, GimpOperationThresholdClass))
+#define GIMP_TYPE_OPERATION_THRESHOLD            (gimp_operation_threshold_get_type ())
+#define GIMP_OPERATION_THRESHOLD(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_OPERATION_THRESHOLD, GimpOperationThreshold))
+#define GIMP_OPERATION_THRESHOLD_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  GIMP_TYPE_OPERATION_THRESHOLD, GimpOperationThresholdClass))
+#define GIMP_IS_OPERATION_THRESHOLD(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_OPERATION_THRESHOLD))
+#define GIMP_IS_OPERATION_THRESHOLD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  GIMP_TYPE_OPERATION_THRESHOLD))
+#define GIMP_OPERATION_THRESHOLD_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  GIMP_TYPE_OPERATION_THRESHOLD, GimpOperationThresholdClass))
 
 
 typedef struct _GimpOperationThresholdClass GimpOperationThresholdClass;
@@ -38,8 +41,7 @@
 {
   GeglOperationPointFilter  parent_instance;
 
-  gdouble                   low;
-  gdouble                   high;
+  GimpThresholdConfig      *config;
 };
 
 struct _GimpOperationThresholdClass

Modified: branches/weskaggs/app/gegl/gimpoperationtilesink.h
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationtilesink.h	(original)
+++ branches/weskaggs/app/gegl/gimpoperationtilesink.h	Fri Jan 25 18:43:27 2008
@@ -22,7 +22,7 @@
 #ifndef __GIMP_OPERATION_TILE_SINK_H__
 #define __GIMP_OPERATION_TILE_SINK_H__
 
-
+#include <gegl-plugin.h>
 #include <operation/gegl-operation-sink.h>
 
 

Modified: branches/weskaggs/app/gegl/gimpoperationtilesource.h
==============================================================================
--- branches/weskaggs/app/gegl/gimpoperationtilesource.h	(original)
+++ branches/weskaggs/app/gegl/gimpoperationtilesource.h	Fri Jan 25 18:43:27 2008
@@ -22,7 +22,7 @@
 #ifndef __GIMP_OPERATION_TILE_SOURCE_H__
 #define __GIMP_OPERATION_TILE_SOURCE_H__
 
-
+#include <gegl-plugin.h>
 #include <operation/gegl-operation-source.h>
 
 

Modified: branches/weskaggs/app/gui/gui.c
==============================================================================
--- branches/weskaggs/app/gui/gui.c	(original)
+++ branches/weskaggs/app/gui/gui.c	Fri Jan 25 18:43:27 2008
@@ -268,15 +268,13 @@
 static gchar *
 gui_sanity_check (void)
 {
-  const gchar *mismatch;
-
 #define GTK_REQUIRED_MAJOR 2
 #define GTK_REQUIRED_MINOR 12
 #define GTK_REQUIRED_MICRO 1
 
-  mismatch = gtk_check_version (GTK_REQUIRED_MAJOR,
-                                GTK_REQUIRED_MINOR,
-                                GTK_REQUIRED_MICRO);
+  const gchar *mismatch = gtk_check_version (GTK_REQUIRED_MAJOR,
+                                             GTK_REQUIRED_MINOR,
+                                             GTK_REQUIRED_MICRO);
 
   if (mismatch)
     {

Modified: branches/weskaggs/app/paint/gimpbrushcore.c
==============================================================================
--- branches/weskaggs/app/paint/gimpbrushcore.c	(original)
+++ branches/weskaggs/app/paint/gimpbrushcore.c	Fri Jan 25 18:43:27 2008
@@ -30,6 +30,8 @@
 #include "base/pixel-region.h"
 #include "base/temp-buf.h"
 
+#include "paint-funcs/paint-funcs.h"
+
 #include "core/gimpbrush.h"
 #include "core/gimpdrawable.h"
 #include "core/gimpimage.h"
@@ -784,6 +786,9 @@
       pixel_region_init_temp_buf (&PR, mask,
                                   0, 0, mask->width, mask->height);
 
+      /*  smooth the mask in order to obtain a simpler boundary  */
+      smooth_region (&PR);
+
       boundary = boundary_find (&PR, BOUNDARY_WITHIN_BOUNDS,
                                 0, 0, PR.w, PR.h,
                                 0,

Modified: branches/weskaggs/app/pdb/color_cmds.c
==============================================================================
--- branches/weskaggs/app/pdb/color_cmds.c	(original)
+++ branches/weskaggs/app/pdb/color_cmds.c	Fri Jan 25 18:43:27 2008
@@ -39,7 +39,6 @@
 #include "base/pixel-processor.h"
 #include "base/pixel-region.h"
 #include "base/threshold.h"
-#include "config/gimpcoreconfig.h"
 #include "core/gimp.h"
 #include "core/gimpcurve.h"
 #include "core/gimpdrawable-desaturate.h"
@@ -80,7 +79,7 @@
 
       if (success)
         {
-      if (gimp->config->use_gegl)
+      if (gimp_use_gegl (gimp))
         {
           GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                          "operation",  "brightness-contrast",
@@ -254,7 +253,7 @@
 
       if (success)
         {
-      if (gimp->config->use_gegl)
+      if (gimp_use_gegl (gimp))
         {
           GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                          "operation", "gimp-posterize",
@@ -675,7 +674,7 @@
 
       if (success)
         {
-      if (gimp->config->use_gegl)
+      if (gimp_use_gegl (gimp))
         {
           GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                          "operation", "gimp-colorize",
@@ -889,7 +888,7 @@
 
       if (success)
         {
-      if (gimp->config->use_gegl)
+      if (gimp_use_gegl (gimp))
         {
           GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                          "operation", "gimp-threshold",

Modified: branches/weskaggs/app/sanity.c
==============================================================================
--- branches/weskaggs/app/sanity.c	(original)
+++ branches/weskaggs/app/sanity.c	Fri Jan 25 18:43:27 2008
@@ -89,15 +89,13 @@
 static gchar *
 sanity_check_glib (void)
 {
-  const gchar *mismatch;
-
 #define GLIB_REQUIRED_MAJOR 2
 #define GLIB_REQUIRED_MINOR 14
 #define GLIB_REQUIRED_MICRO 1
 
-  mismatch = glib_check_version (GLIB_REQUIRED_MAJOR,
-                                 GLIB_REQUIRED_MINOR,
-                                 GLIB_REQUIRED_MICRO);
+  const gchar *mismatch = glib_check_version (GLIB_REQUIRED_MAJOR,
+                                              GLIB_REQUIRED_MINOR,
+                                              GLIB_REQUIRED_MICRO);
 
   if (mismatch)
     {
@@ -124,21 +122,20 @@
 static gchar *
 sanity_check_pango (void)
 {
-  gint         pango_major_version = pango_version () / 100 / 100;
-  gint         pango_minor_version = pango_version () / 100 % 100;
-  gint         pango_micro_version = pango_version () % 100;
-  const gchar *mismatch;
-
 #define PANGO_REQUIRED_MAJOR 1
 #define PANGO_REQUIRED_MINOR 18
 #define PANGO_REQUIRED_MICRO 0
 
-  mismatch = pango_version_check (PANGO_REQUIRED_MAJOR,
-                                  PANGO_REQUIRED_MINOR,
-                                  PANGO_REQUIRED_MICRO);
+  const gchar *mismatch = pango_version_check (PANGO_REQUIRED_MAJOR,
+                                               PANGO_REQUIRED_MINOR,
+                                               PANGO_REQUIRED_MICRO);
 
   if (mismatch)
     {
+      const gint pango_major_version = pango_version () / 100 / 100;
+      const gint pango_minor_version = pango_version () / 100 % 100;
+      const gint pango_micro_version = pango_version () % 100;
+
       return g_strdup_printf
         ("%s\n\n"
          "GIMP requires Pango version %d.%d.%d or later.\n"
@@ -162,10 +159,7 @@
 static gchar *
 sanity_check_fontconfig (void)
 {
-  gint   fc_version       = FcGetVersion ();
-  gint   fc_major_version = fc_version / 100 / 100;
-  gint   fc_minor_version = fc_version / 100 % 100;
-  gint   fc_micro_version = fc_version % 100;
+  const gint fc_version = FcGetVersion ();
 
 #define FC_REQUIRED_MAJOR 2
 #define FC_REQUIRED_MINOR 2
@@ -175,6 +169,10 @@
                     (FC_REQUIRED_MINOR *   100) +
                     (FC_REQUIRED_MICRO *     1)))
     {
+      const gint fc_major_version = fc_version / 100 / 100;
+      const gint fc_minor_version = fc_version / 100 % 100;
+      const gint fc_micro_version = fc_version % 100;
+
       return g_strdup_printf
         ("The Fontconfig version being used is too old!\n\n"
          "GIMP requires Fontconfig version %d.%d.%d or later.\n"

Modified: branches/weskaggs/app/tools/gimp-tools.c
==============================================================================
--- branches/weskaggs/app/tools/gimp-tools.c	(original)
+++ branches/weskaggs/app/tools/gimp-tools.c	Fri Jan 25 18:43:27 2008
@@ -18,6 +18,7 @@
 
 #include "config.h"
 
+#include <gegl.h>
 #include <gtk/gtk.h>
 
 #include "libgimpbase/gimpbase.h"

Modified: branches/weskaggs/app/tools/gimpbrightnesscontrasttool.c
==============================================================================
--- branches/weskaggs/app/tools/gimpbrightnesscontrasttool.c	(original)
+++ branches/weskaggs/app/tools/gimpbrightnesscontrasttool.c	Fri Jan 25 18:43:27 2008
@@ -28,10 +28,8 @@
 #include "base/gimplut.h"
 #include "base/lut-funcs.h"
 
-#include "core/gimpcontext.h"
 #include "core/gimpdrawable.h"
 #include "core/gimpimage.h"
-#include "core/gimpimagemap.h"
 
 #include "widgets/gimphelp-ids.h"
 

Modified: branches/weskaggs/app/tools/gimpbrushtool.c
==============================================================================
--- branches/weskaggs/app/tools/gimpbrushtool.c	(original)
+++ branches/weskaggs/app/tools/gimpbrushtool.c	Fri Jan 25 18:43:27 2008
@@ -295,8 +295,8 @@
   if (brush_core->brush_bound_segs)
     {
       GimpDisplayShell *shell  = GIMP_DISPLAY_SHELL (draw_tool->display->shell);
-      gdouble           width  = (gdouble) brush_core->brush_bound_width;
-      gdouble           height = (gdouble) brush_core->brush_bound_height;
+      gdouble           width  = brush_core->brush_bound_width;
+      gdouble           height = brush_core->brush_bound_height;
 
       /*  don't draw the boundary if it becomes too small  */
       if (SCALEX (shell, width) > 4 && SCALEY (shell, height) > 4)

Modified: branches/weskaggs/app/tools/gimpcolorbalancetool.c
==============================================================================
--- branches/weskaggs/app/tools/gimpcolorbalancetool.c	(original)
+++ branches/weskaggs/app/tools/gimpcolorbalancetool.c	Fri Jan 25 18:43:27 2008
@@ -27,9 +27,10 @@
 
 #include "base/color-balance.h"
 
+#include "gegl/gimpcolorbalanceconfig.h"
+
 #include "core/gimpdrawable.h"
 #include "core/gimpimage.h"
-#include "core/gimpimagemap.h"
 
 #include "widgets/gimphelp-ids.h"
 
@@ -116,7 +117,6 @@
   GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (cb_tool);
 
   cb_tool->color_balance = g_slice_new0 (ColorBalance);
-  cb_tool->transfer_mode = GIMP_MIDTONES;
 
   color_balance_init (cb_tool->color_balance);
 
@@ -129,6 +129,12 @@
 {
   GimpColorBalanceTool *cb_tool = GIMP_COLOR_BALANCE_TOOL (object);
 
+  if (cb_tool->config)
+    {
+      g_object_unref (cb_tool->config);
+      cb_tool->config = NULL;
+    }
+
   g_slice_free (ColorBalance, cb_tool->color_balance);
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -154,12 +160,13 @@
       return FALSE;
     }
 
-  color_balance_init (cb_tool->color_balance);
-
-  cb_tool->transfer_mode = GIMP_MIDTONES;
+  gimp_color_balance_config_reset (cb_tool->config);
 
   GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error);
 
+  gimp_int_radio_group_set_active (GTK_RADIO_BUTTON (cb_tool->range_radio),
+                                   cb_tool->config->range);
+
   color_balance_update (cb_tool);
 
   return TRUE;
@@ -168,36 +175,28 @@
 static GeglNode *
 gimp_color_balance_tool_get_operation (GimpImageMapTool *im_tool)
 {
-  return g_object_new (GEGL_TYPE_NODE,
+  GimpColorBalanceTool *cb_tool = GIMP_COLOR_BALANCE_TOOL (im_tool);
+  GeglNode             *node;
+
+  node = g_object_new (GEGL_TYPE_NODE,
                        "operation", "gimp-color-balance",
                        NULL);
+
+  cb_tool->config = g_object_new (GIMP_TYPE_COLOR_BALANCE_CONFIG, NULL);
+
+  gegl_node_set (node,
+                 "config", cb_tool->config,
+                 NULL);
+
+  return node;
 }
 
 static void
 gimp_color_balance_tool_map (GimpImageMapTool *image_map_tool)
 {
   GimpColorBalanceTool *cb_tool = GIMP_COLOR_BALANCE_TOOL (image_map_tool);
-  ColorBalance         *cb      = cb_tool->color_balance;
-  GimpTransferMode      range;
 
-  for (range = GIMP_SHADOWS; range <= GIMP_HIGHLIGHTS; range++)
-    {
-      gegl_node_set (image_map_tool->operation,
-                     "range", range,
-                     NULL);
-
-      gegl_node_set (image_map_tool->operation,
-                     "cyan-red",      cb->cyan_red[range]      / 256.0,
-                     "magenta-green", cb->magenta_green[range] / 256.0,
-                     "yellow-blue",   cb->yellow_blue[range]   / 256.0,
-                     NULL);
-    }
-
-  gegl_node_set (image_map_tool->operation,
-                 "preserve-luminosity", cb->preserve_luminosity,
-                 NULL);
-
-  color_balance_create_lookup_tables (cb_tool->color_balance);
+  gimp_color_balance_config_to_cruft (cb_tool->config, cb_tool->color_balance);
 }
 
 
@@ -252,7 +251,6 @@
   GtkWidget            *vbox;
   GtkWidget            *hbox;
   GtkWidget            *table;
-  GtkWidget            *toggle;
   GtkWidget            *button;
   GtkWidget            *frame;
 
@@ -260,7 +258,7 @@
                                      gtk_label_new (_("Select Range to Adjust")),
                                      G_CALLBACK (color_balance_range_callback),
                                      cb_tool,
-                                     &toggle);
+                                     &cb_tool->range_radio);
   gtk_box_pack_start (GTK_BOX (im_tool->main_vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 
@@ -279,22 +277,22 @@
   gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
   gtk_widget_show (table);
 
-  cb_tool->cyan_red_adj =
-    create_levels_scale (_("Cyan"), _("Red"), table, 0);
+  cb_tool->cyan_red_adj = create_levels_scale (_("Cyan"), _("Red"),
+                                               table, 0);
 
   g_signal_connect (cb_tool->cyan_red_adj, "value-changed",
                     G_CALLBACK (color_balance_cr_changed),
                     cb_tool);
 
-  cb_tool->magenta_green_adj =
-    create_levels_scale (_("Magenta"), _("Green"), table, 1);
+  cb_tool->magenta_green_adj = create_levels_scale (_("Magenta"), _("Green"),
+                                                    table, 1);
 
   g_signal_connect (cb_tool->magenta_green_adj, "value-changed",
                     G_CALLBACK (color_balance_mg_changed),
                     cb_tool);
 
-  cb_tool->yellow_blue_adj =
-    create_levels_scale (_("Yellow"), _("Blue"), table, 2);
+  cb_tool->yellow_blue_adj = create_levels_scale (_("Yellow"), _("Blue"),
+                                                  table, 2);
 
   g_signal_connect (cb_tool->yellow_blue_adj, "value-changed",
                     G_CALLBACK (color_balance_yb_changed),
@@ -315,7 +313,7 @@
   cb_tool->preserve_toggle =
     gtk_check_button_new_with_mnemonic (_("Preserve _luminosity"));
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cb_tool->preserve_toggle),
-                                cb_tool->color_balance->preserve_luminosity);
+                                cb_tool->config->preserve_luminosity);
   gtk_box_pack_end (GTK_BOX (im_tool->main_vbox), cb_tool->preserve_toggle,
                     FALSE, FALSE, 0);
   gtk_widget_show (cb_tool->preserve_toggle);
@@ -323,51 +321,62 @@
   g_signal_connect (cb_tool->preserve_toggle, "toggled",
                     G_CALLBACK (color_balance_preserve_toggled),
                     cb_tool);
-
-  /*  set range after everything is in place  */
-  gimp_int_radio_group_set_active (GTK_RADIO_BUTTON (toggle),
-                                   cb_tool->transfer_mode);
 }
 
 static void
 gimp_color_balance_tool_reset (GimpImageMapTool *im_tool)
 {
   GimpColorBalanceTool *cb_tool = GIMP_COLOR_BALANCE_TOOL (im_tool);
+  GimpTransferMode      range   = cb_tool->config->range;
+
+  gimp_color_balance_config_reset (cb_tool->config);
+  g_object_set (cb_tool->config,
+                "range", range,
+                NULL);
 
-  color_balance_init (cb_tool->color_balance);
   color_balance_update (cb_tool);
 }
 
 static void
 color_balance_update (GimpColorBalanceTool *cb_tool)
 {
-  GimpTransferMode tm = cb_tool->transfer_mode;
+  GimpColorBalanceConfig *config = cb_tool->config;
 
   gtk_adjustment_set_value (cb_tool->cyan_red_adj,
-                            cb_tool->color_balance->cyan_red[tm]);
+                            config->cyan_red[config->range]      * 100.0);
   gtk_adjustment_set_value (cb_tool->magenta_green_adj,
-                            cb_tool->color_balance->magenta_green[tm]);
+                            config->magenta_green[config->range] * 100.0);
   gtk_adjustment_set_value (cb_tool->yellow_blue_adj,
-                            cb_tool->color_balance->yellow_blue[tm]);
+                            config->yellow_blue[config->range]   * 100.0);
 
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cb_tool->preserve_toggle),
-                                cb_tool->color_balance->preserve_luminosity);
+                                config->preserve_luminosity);
 }
 
 static void
 color_balance_range_callback (GtkWidget            *widget,
                               GimpColorBalanceTool *cb_tool)
 {
-  gimp_radio_button_update (widget, &cb_tool->transfer_mode);
-  color_balance_update (cb_tool);
+  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
+    {
+      GimpTransferMode range;
+
+      gimp_radio_button_update (widget, &range);
+      g_object_set (cb_tool->config,
+                    "range", range,
+                    NULL);
+
+      color_balance_update (cb_tool);
+    }
 }
 
 static void
 color_balance_range_reset_callback (GtkWidget            *widget,
                                     GimpColorBalanceTool *cb_tool)
 {
-  color_balance_range_reset (cb_tool->color_balance,
-                             cb_tool->transfer_mode);
+  gimp_color_balance_config_reset_range (cb_tool->config,
+                                         cb_tool->config->range);
+
   color_balance_update (cb_tool);
 
   gimp_image_map_tool_preview (GIMP_IMAGE_MAP_TOOL (cb_tool));
@@ -377,11 +386,14 @@
 color_balance_preserve_toggled (GtkWidget            *widget,
                                 GimpColorBalanceTool *cb_tool)
 {
-  gboolean active = GTK_TOGGLE_BUTTON (widget)->active;
+  GimpColorBalanceConfig *config = cb_tool->config;
+  gboolean                active = GTK_TOGGLE_BUTTON (widget)->active;
 
-  if (cb_tool->color_balance->preserve_luminosity != active)
+  if (config->preserve_luminosity != active)
     {
-      cb_tool->color_balance->preserve_luminosity = active;
+      g_object_set (config,
+                    "preserve-luminosity", active,
+                    NULL);
 
       gimp_image_map_tool_preview (GIMP_IMAGE_MAP_TOOL (cb_tool));
     }
@@ -391,11 +403,14 @@
 color_balance_cr_changed (GtkAdjustment        *adjustment,
                           GimpColorBalanceTool *cb_tool)
 {
-  GimpTransferMode tm = cb_tool->transfer_mode;
+  GimpColorBalanceConfig *config = cb_tool->config;
+  gdouble                 value  = adjustment->value / 100.0;
 
-  if (cb_tool->color_balance->cyan_red[tm] != adjustment->value)
+  if (config->cyan_red[config->range] != value)
     {
-      cb_tool->color_balance->cyan_red[tm] = adjustment->value;
+      g_object_set (config,
+                    "cyan-red", value,
+                    NULL);
 
       gimp_image_map_tool_preview (GIMP_IMAGE_MAP_TOOL (cb_tool));
     }
@@ -405,11 +420,14 @@
 color_balance_mg_changed (GtkAdjustment        *adjustment,
                           GimpColorBalanceTool *cb_tool)
 {
-  GimpTransferMode tm = cb_tool->transfer_mode;
+  GimpColorBalanceConfig *config = cb_tool->config;
+  gdouble                 value  = adjustment->value / 100.0;
 
-  if (cb_tool->color_balance->magenta_green[tm] != adjustment->value)
+  if (config->magenta_green[config->range] != value)
     {
-      cb_tool->color_balance->magenta_green[tm] = adjustment->value;
+      g_object_set (config,
+                    "magenta-green", value,
+                    NULL);
 
       gimp_image_map_tool_preview (GIMP_IMAGE_MAP_TOOL (cb_tool));
     }
@@ -419,11 +437,14 @@
 color_balance_yb_changed (GtkAdjustment        *adjustment,
                           GimpColorBalanceTool *cb_tool)
 {
-  GimpTransferMode tm = cb_tool->transfer_mode;
+  GimpColorBalanceConfig *config = cb_tool->config;
+  gdouble                 value  = adjustment->value / 100.0;
 
-  if (cb_tool->color_balance->yellow_blue[tm] != adjustment->value)
+  if (config->yellow_blue[config->range] != value)
     {
-      cb_tool->color_balance->yellow_blue[tm] = adjustment->value;
+      g_object_set (config,
+                    "yellow-blue", value,
+                    NULL);
 
       gimp_image_map_tool_preview (GIMP_IMAGE_MAP_TOOL (cb_tool));
     }

Modified: branches/weskaggs/app/tools/gimpcolorbalancetool.h
==============================================================================
--- branches/weskaggs/app/tools/gimpcolorbalancetool.h	(original)
+++ branches/weskaggs/app/tools/gimpcolorbalancetool.h	Fri Jan 25 18:43:27 2008
@@ -16,8 +16,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-#ifndef __GIMP_COLOR_BALANCE_DIALOG_H__
-#define __GIMP_COLOR_BALANCE_DIALOG_H__
+#ifndef __GIMP_COLOR_BALANCE_TOOL_H__
+#define __GIMP_COLOR_BALANCE_TOOL_H__
 
 
 #include "gimpimagemaptool.h"
@@ -37,16 +37,17 @@
 
 struct _GimpColorBalanceTool
 {
-  GimpImageMapTool  parent_instance;
+  GimpImageMapTool        parent_instance;
 
-  ColorBalance     *color_balance;
+  GimpColorBalanceConfig *config;
+  ColorBalance           *color_balance;
 
   /*  dialog  */
-  GimpTransferMode  transfer_mode;
-  GtkAdjustment    *cyan_red_adj;
-  GtkAdjustment    *magenta_green_adj;
-  GtkAdjustment    *yellow_blue_adj;
-  GtkWidget        *preserve_toggle;
+  GtkWidget              *range_radio;
+  GtkAdjustment          *cyan_red_adj;
+  GtkAdjustment          *magenta_green_adj;
+  GtkAdjustment          *yellow_blue_adj;
+  GtkWidget              *preserve_toggle;
 };
 
 struct _GimpColorBalanceToolClass
@@ -61,4 +62,4 @@
 GType   gimp_color_balance_tool_get_type (void) G_GNUC_CONST;
 
 
-#endif  /*  __GIMP_COLOR_BALANCE_GIMP_H__  */
+#endif  /*  __GIMP_COLOR_BALANCE_TOOL_H__  */

Modified: branches/weskaggs/app/tools/gimpcolorizetool.c
==============================================================================
--- branches/weskaggs/app/tools/gimpcolorizetool.c	(original)
+++ branches/weskaggs/app/tools/gimpcolorizetool.c	Fri Jan 25 18:43:27 2008
@@ -31,7 +31,6 @@
 
 #include "core/gimpdrawable.h"
 #include "core/gimpimage.h"
-#include "core/gimpimagemap.h"
 
 #include "widgets/gimphelp-ids.h"
 
@@ -126,14 +125,14 @@
 {
   GimpColorizeTool *col_tool = GIMP_COLORIZE_TOOL (object);
 
-  g_slice_free (Colorize, col_tool->colorize);
-
   if (col_tool->config)
     {
       g_object_unref (col_tool->config);
       col_tool->config = NULL;
     }
 
+  g_slice_free (Colorize, col_tool->colorize);
+
   G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
@@ -155,11 +154,7 @@
       return FALSE;
     }
 
-  g_object_set (col_tool->config,
-                "hue",        0.5,
-                "saturation", 0.5,
-                "lightness",  0.0,
-                NULL);
+  gimp_colorize_config_reset (col_tool->config);
 
   GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error);
 
@@ -193,14 +188,8 @@
 gimp_colorize_tool_map (GimpImageMapTool *image_map_tool)
 {
   GimpColorizeTool   *col_tool = GIMP_COLORIZE_TOOL (image_map_tool);
-  GimpColorizeConfig *config   = col_tool->config;
-  Colorize           *colorize = col_tool->colorize;
-
-  colorize->hue        = config->hue        * 360.0;
-  colorize->saturation = config->saturation * 100.0;
-  colorize->lightness  = config->lightness  * 100.0;
 
-  colorize_calculate (colorize);
+  gimp_colorize_config_to_cruft (col_tool->config, col_tool->colorize);
 }
 
 
@@ -282,11 +271,7 @@
 {
   GimpColorizeTool *col_tool = GIMP_COLORIZE_TOOL (image_map_tool);
 
-  g_object_set (col_tool->config,
-                "hue",        0.5,
-                "saturation", 0.5,
-                "lightness",  0.0,
-                NULL);
+  gimp_colorize_config_reset (col_tool->config);
 
   colorize_update_sliders (col_tool);
 }

Modified: branches/weskaggs/app/tools/gimpcurvestool.c
==============================================================================
--- branches/weskaggs/app/tools/gimpcurvestool.c	(original)
+++ branches/weskaggs/app/tools/gimpcurvestool.c	Fri Jan 25 18:43:27 2008
@@ -18,16 +18,10 @@
 
 #include "config.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
 #include <gegl.h>
 #include <gtk/gtk.h>
 
-#include "libgimpmath/gimpmath.h"
 #include "libgimpcolor/gimpcolor.h"
-#include "libgimpconfig/gimpconfig.h"
 #include "libgimpwidgets/gimpwidgets.h"
 
 #include "tools-types.h"
@@ -36,12 +30,14 @@
 #include "base/gimphistogram.h"
 #include "base/gimplut.h"
 
+#include "gegl/gimpcurvesconfig.h"
+#include "gegl/gimpoperationcurves.h"
+
 #include "core/gimp.h"
 #include "core/gimpcurve.h"
 #include "core/gimpdrawable.h"
 #include "core/gimpdrawable-histogram.h"
 #include "core/gimpimage.h"
-#include "core/gimpimagemap.h"
 
 #include "widgets/gimpcolorbar.h"
 #include "widgets/gimphelp-ids.h"
@@ -62,52 +58,53 @@
 
 /*  local function prototypes  */
 
-static void     gimp_curves_tool_finalize       (GObject              *object);
+static void       gimp_curves_tool_finalize       (GObject              *object);
 
-static gboolean gimp_curves_tool_initialize     (GimpTool             *tool,
-                                                 GimpDisplay          *display,
-                                                 GError              **error);
-static void     gimp_curves_tool_button_release (GimpTool             *tool,
-                                                 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,
-                                                 GimpCoords           *coords,
-                                                 GdkModifierType       state,
-                                                 gboolean              proximity,
-                                                 GimpDisplay          *display);
-
-static void     gimp_curves_tool_color_picked   (GimpColorTool        *color_tool,
-                                                 GimpColorPickState    pick_state,
-                                                 GimpImageType         sample_type,
-                                                 GimpRGB              *color,
-                                                 gint                  color_index);
-static void     gimp_curves_tool_map            (GimpImageMapTool     *image_map_tool);
-static void     gimp_curves_tool_dialog         (GimpImageMapTool     *image_map_tool);
-static void     gimp_curves_tool_reset          (GimpImageMapTool     *image_map_tool);
-static gboolean gimp_curves_tool_settings_load  (GimpImageMapTool     *image_map_tool,
-                                                 gpointer              fp,
-                                                 GError              **error);
-static gboolean gimp_curves_tool_settings_save  (GimpImageMapTool     *image_map_tool,
-                                                 gpointer              fp);
-
-static void     curves_curve_callback           (GimpCurve            *curve,
-                                                 GimpCurvesTool       *tool);
-static void     curves_channel_callback         (GtkWidget            *widget,
-                                                 GimpCurvesTool       *tool);
-static void     curves_channel_reset_callback   (GtkWidget            *widget,
-                                                 GimpCurvesTool       *tool);
+static gboolean   gimp_curves_tool_initialize     (GimpTool             *tool,
+                                                   GimpDisplay          *display,
+                                                   GError              **error);
+static void       gimp_curves_tool_button_release (GimpTool             *tool,
+                                                   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,
+                                                   GimpCoords           *coords,
+                                                   GdkModifierType       state,
+                                                   gboolean              proximity,
+                                                   GimpDisplay          *display);
+
+static void       gimp_curves_tool_color_picked   (GimpColorTool        *color_tool,
+                                                   GimpColorPickState    pick_state,
+                                                   GimpImageType         sample_type,
+                                                   GimpRGB              *color,
+                                                   gint                  color_index);
+static GeglNode * gimp_curves_tool_get_operation  (GimpImageMapTool     *image_map_tool);
+static void       gimp_curves_tool_map            (GimpImageMapTool     *image_map_tool);
+static void       gimp_curves_tool_dialog         (GimpImageMapTool     *image_map_tool);
+static void       gimp_curves_tool_reset          (GimpImageMapTool     *image_map_tool);
+static gboolean   gimp_curves_tool_settings_load  (GimpImageMapTool     *image_map_tool,
+                                                   gpointer              fp,
+                                                   GError              **error);
+static gboolean   gimp_curves_tool_settings_save  (GimpImageMapTool     *image_map_tool,
+                                                   gpointer              fp);
+
+static void       curves_curve_callback           (GimpCurve            *curve,
+                                                   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 gboolean   curves_menu_sensitivity         (gint                  value,
+                                                   gpointer              data);
 
-static void     curves_curve_type_callback      (GtkWidget            *widget,
-                                                 GimpCurvesTool       *tool);
+static void       curves_curve_type_callback      (GtkWidget            *widget,
+                                                   GimpCurvesTool       *tool);
 
 
 G_DEFINE_TYPE (GimpCurvesTool, gimp_curves_tool, GIMP_TYPE_IMAGE_MAP_TOOL)
@@ -161,6 +158,7 @@
   im_tool_class->save_dialog_title = _("Save Curves");
   im_tool_class->save_button_tip   = _("Save curves settings to file");
 
+  im_tool_class->get_operation     = gimp_curves_tool_get_operation;
   im_tool_class->map               = gimp_curves_tool_map;
   im_tool_class->dialog            = gimp_curves_tool_dialog;
   im_tool_class->reset             = gimp_curves_tool_reset;
@@ -174,17 +172,7 @@
   GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (tool);
   gint              i;
 
-  for (i = 0; i < G_N_ELEMENTS (tool->curve); i++)
-    {
-      tool->curve[i] = GIMP_CURVE (gimp_curve_new ("curves tool"));
-
-      g_signal_connect_object (tool->curve[i], "dirty",
-                               G_CALLBACK (curves_curve_callback),
-                               tool, 0);
-    }
-
-  tool->lut     = gimp_lut_new ();
-  tool->channel = GIMP_HISTOGRAM_VALUE;
+  tool->lut = gimp_lut_new ();
 
   for (i = 0; i < G_N_ELEMENTS (tool->col_value); i++)
     tool->col_value[i] = -1;
@@ -197,10 +185,12 @@
 gimp_curves_tool_finalize (GObject *object)
 {
   GimpCurvesTool *tool = GIMP_CURVES_TOOL (object);
-  gint            i;
 
-  for (i = 0; i < G_N_ELEMENTS (tool->curve); i++)
-    g_object_unref (tool->curve[i]);
+  if (tool->config)
+    {
+      g_object_unref (tool->config);
+      tool->config = NULL;
+    }
 
   gimp_lut_free (tool->lut);
 
@@ -232,15 +222,14 @@
       return FALSE;
     }
 
-  for (i = 0; i < G_N_ELEMENTS (c_tool->curve); i++)
-    gimp_curve_reset (c_tool->curve[i], TRUE);
+  for (i = 0; i < G_N_ELEMENTS (c_tool->config->curve); i++)
+    gimp_curve_reset (c_tool->config->curve[i], TRUE);
 
   if (! c_tool->hist)
     c_tool->hist = gimp_histogram_new ();
 
-  c_tool->channel = GIMP_HISTOGRAM_VALUE;
-  c_tool->color   = gimp_drawable_is_rgb (drawable);
-  c_tool->alpha   = gimp_drawable_has_alpha (drawable);
+  c_tool->color = gimp_drawable_is_rgb (drawable);
+  c_tool->alpha = gimp_drawable_has_alpha (drawable);
 
   GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error);
 
@@ -252,17 +241,13 @@
                                       curves_menu_sensitivity, c_tool, NULL);
 
   gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (c_tool->channel_menu),
-                                 c_tool->channel);
-
-  /* FIXME: hack */
-  if (! c_tool->color)
-    c_tool->channel = (c_tool->channel == GIMP_HISTOGRAM_ALPHA) ? 1 : 0;
+                                 c_tool->config->channel);
 
   gimp_drawable_calculate_histogram (drawable, c_tool->hist);
   gimp_histogram_view_set_background (GIMP_HISTOGRAM_VIEW (c_tool->graph),
                                       c_tool->hist);
   gimp_curve_view_set_curve (GIMP_CURVE_VIEW (c_tool->graph),
-                             c_tool->curve[c_tool->channel]);
+                             c_tool->config->curve[c_tool->config->channel]);
 
   return TRUE;
 }
@@ -275,24 +260,25 @@
                                  GimpButtonReleaseType  release_type,
                                  GimpDisplay           *display)
 {
-  GimpCurvesTool *c_tool = GIMP_CURVES_TOOL (tool);
+  GimpCurvesTool   *c_tool = GIMP_CURVES_TOOL (tool);
+  GimpCurvesConfig *config = c_tool->config;
 
   if (state & GDK_SHIFT_MASK)
     {
-      GimpCurve *curve = c_tool->curve[c_tool->channel];
+      GimpCurve *curve = config->curve[config->channel];
       gint       closest;
 
       closest =
         gimp_curve_get_closest_point (curve,
-                                      c_tool->col_value[c_tool->channel]);
+                                      c_tool->col_value[config->channel]);
 
       gimp_curve_view_set_selected (GIMP_CURVE_VIEW (c_tool->graph),
                                     closest);
 
       gimp_curve_set_point (curve,
                             closest,
-                            c_tool->col_value[c_tool->channel],
-                            curve->curve[c_tool->col_value[c_tool->channel]]);
+                            c_tool->col_value[config->channel],
+                            curve->curve[c_tool->col_value[config->channel]]);
     }
   else if (state & GDK_CONTROL_MASK)
     {
@@ -300,7 +286,7 @@
 
       for (i = 0; i < 5; i++)
         {
-          GimpCurve *curve = c_tool->curve[i];
+          GimpCurve *curve = config->curve[i];
           gint       closest;
 
           closest =
@@ -371,10 +357,9 @@
                                GimpRGB            *color,
                                gint                color_index)
 {
-  GimpCurvesTool       *tool = GIMP_CURVES_TOOL (color_tool);
-  GimpDrawable         *drawable;
-  guchar                r, g, b, a;
-  GimpHistogramChannel  channel;
+  GimpCurvesTool *tool = GIMP_CURVES_TOOL (color_tool);
+  GimpDrawable   *drawable;
+  guchar          r, g, b, a;
 
   drawable = GIMP_IMAGE_MAP_TOOL (tool)->drawable;
 
@@ -392,13 +377,35 @@
 
   tool->col_value[GIMP_HISTOGRAM_VALUE] = MAX (MAX (r, g), b);
 
-  if (tool->color)
-    channel = tool->channel;
-  else
-    channel = (tool->channel == 1) ? GIMP_HISTOGRAM_ALPHA : GIMP_HISTOGRAM_VALUE;
-
   gimp_curve_view_set_xpos (GIMP_CURVE_VIEW (tool->graph),
-                            tool->col_value[channel]);
+                            tool->col_value[tool->config->channel]);
+}
+
+static GeglNode *
+gimp_curves_tool_get_operation (GimpImageMapTool *image_map_tool)
+{
+  GimpCurvesTool *tool = GIMP_CURVES_TOOL (image_map_tool);
+  GeglNode       *node;
+  gint            i;
+
+  node = g_object_new (GEGL_TYPE_NODE,
+                       "operation", "gimp-curves",
+                       NULL);
+
+  tool->config = g_object_new (GIMP_TYPE_CURVES_CONFIG, NULL);
+
+  for (i = 0; i < G_N_ELEMENTS (tool->config->curve); i++)
+    {
+      g_signal_connect_object (tool->config->curve[i], "dirty",
+                               G_CALLBACK (curves_curve_callback),
+                               tool, 0);
+    }
+
+  gegl_node_set (node,
+                 "config", tool->config,
+                 NULL);
+
+  return node;
 }
 
 static void
@@ -406,10 +413,8 @@
 {
   GimpCurvesTool *tool = GIMP_CURVES_TOOL (image_map_tool);
   Curves          curves;
-  gint            i;
 
-  for (i = 0; i < G_N_ELEMENTS (tool->curve); i++)
-    gimp_curve_get_uchar (tool->curve[i], curves.curve[i]);
+  gimp_curves_config_to_cruft (tool->config, &curves, tool->color);
 
   gimp_lut_setup (tool->lut,
                   (GimpLutFunc) curves_lut_func,
@@ -600,15 +605,13 @@
 static void
 gimp_curves_tool_reset (GimpImageMapTool *image_map_tool)
 {
-  GimpCurvesTool       *tool = GIMP_CURVES_TOOL (image_map_tool);
-  GimpHistogramChannel  channel;
+  GimpCurvesTool       *tool    = GIMP_CURVES_TOOL (image_map_tool);
+  GimpHistogramChannel  channel = tool->config->channel;
 
-  for (channel =  GIMP_HISTOGRAM_VALUE;
-       channel <= GIMP_HISTOGRAM_ALPHA;
-       channel++)
-    {
-      gimp_curve_reset (tool->curve[channel], FALSE);
-    }
+  gimp_curves_config_reset (tool->config);
+  g_object_set (tool->config,
+                "channel", channel,
+                NULL);
 }
 
 static gboolean
@@ -617,55 +620,16 @@
                                 GError           **error)
 {
   GimpCurvesTool *tool = GIMP_CURVES_TOOL (image_map_tool);
-  FILE           *file = fp;
-  gint            i, j;
-  gint            fields;
-  gchar           buf[50];
-  gint            index[5][GIMP_CURVE_NUM_POINTS];
-  gint            value[5][GIMP_CURVE_NUM_POINTS];
 
-  if (! fgets (buf, sizeof (buf), file) ||
-      strcmp (buf, "# GIMP Curves File\n") != 0)
+  if (gimp_curves_config_load_cruft (tool->config, fp, error))
     {
-      g_set_error (error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_PARSE,
-                   _("not a GIMP Curves file"));
-      return FALSE;
-    }
-
-  for (i = 0; i < 5; i++)
-    {
-      for (j = 0; j < GIMP_CURVE_NUM_POINTS; j++)
-        {
-          fields = fscanf (file, "%d %d ", &index[i][j], &value[i][j]);
-          if (fields != 2)
-            {
-              /*  FIXME: should have a helpful error message here  */
-              g_printerr ("fields != 2");
-              g_set_error (error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_PARSE,
-                           _("parse error"));
-              return FALSE;
-            }
-        }
-    }
-
-  for (i = 0; i < 5; i++)
-    {
-      GimpCurve *curve = tool->curve[i];
-
-      gimp_data_freeze (GIMP_DATA (curve));
-
-      gimp_curve_set_curve_type (curve, GIMP_CURVE_SMOOTH);
-
-      for (j = 0; j < GIMP_CURVE_NUM_POINTS; j++)
-        gimp_curve_set_point (curve, j, index[i][j], value[i][j]);
+      gimp_int_radio_group_set_active (GTK_RADIO_BUTTON (tool->curve_type),
+                                       GIMP_CURVE_SMOOTH);
 
-      gimp_data_thaw (GIMP_DATA (curve));
+      return TRUE;
     }
 
-  gimp_int_radio_group_set_active (GTK_RADIO_BUTTON (tool->curve_type),
-                                   GIMP_CURVE_SMOOTH);
-
-  return TRUE;
+  return FALSE;
 }
 
 static gboolean
@@ -673,76 +637,39 @@
                                 gpointer          fp)
 {
   GimpCurvesTool *tool = GIMP_CURVES_TOOL (image_map_tool);
-  FILE           *file = fp;
-  gint            i, j;
-  gint32          index;
 
-  fprintf (file, "# GIMP Curves File\n");
-
-  for (i = 0; i < 5; i++)
-    {
-      GimpCurve *curve = tool->curve[i];
-
-      if (curve->curve_type == GIMP_CURVE_FREE)
-        {
-          /* pick representative points from the curve and make them
-           * control points
-           */
-          for (j = 0; j <= 8; j++)
-            {
-              index = CLAMP0255 (j * 32);
-
-              curve->points[j * 2][0] = index;
-              curve->points[j * 2][1] = curve->curve[index];
-            }
-        }
-
-      for (j = 0; j < GIMP_CURVE_NUM_POINTS; j++)
-        fprintf (file, "%d %d ",
-                 curve->points[j][0],
-                 curve->points[j][1]);
-
-      fprintf (file, "\n");
-    }
-
-  return TRUE;
+  return gimp_curves_config_save_cruft (tool->config, fp);
 }
 
 static void
 curves_curve_callback (GimpCurve      *curve,
                        GimpCurvesTool *tool)
 {
-  if (curve != tool->curve[tool->channel])
+  GimpCurvesConfig *config = tool->config;
+
+  if (curve != config->curve[config->channel])
     return;
 
   if (tool->xrange)
     {
-      GimpHistogramChannel channel;
-
-      if (tool->color)
-        channel = tool->channel;
-      else
-        channel = ((tool->channel == 1) ?
-                   GIMP_HISTOGRAM_ALPHA : GIMP_HISTOGRAM_VALUE);
-
-      switch (channel)
+      switch (config->channel)
         {
         case GIMP_HISTOGRAM_VALUE:
         case GIMP_HISTOGRAM_ALPHA:
         case GIMP_HISTOGRAM_RGB:
           gimp_color_bar_set_buffers (GIMP_COLOR_BAR (tool->xrange),
-                                      tool->curve[tool->channel]->curve,
-                                      tool->curve[tool->channel]->curve,
-                                      tool->curve[tool->channel]->curve);
+                                      config->curve[config->channel]->curve,
+                                      config->curve[config->channel]->curve,
+                                      config->curve[config->channel]->curve);
           break;
 
         case GIMP_HISTOGRAM_RED:
         case GIMP_HISTOGRAM_GREEN:
         case GIMP_HISTOGRAM_BLUE:
           gimp_color_bar_set_buffers (GIMP_COLOR_BAR (tool->xrange),
-                                      tool->curve[GIMP_HISTOGRAM_RED]->curve,
-                                      tool->curve[GIMP_HISTOGRAM_GREEN]->curve,
-                                      tool->curve[GIMP_HISTOGRAM_BLUE]->curve);
+                                      config->curve[GIMP_HISTOGRAM_RED]->curve,
+                                      config->curve[GIMP_HISTOGRAM_GREEN]->curve,
+                                      config->curve[GIMP_HISTOGRAM_BLUE]->curve);
           break;
         }
     }
@@ -759,25 +686,27 @@
 
   if (gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (widget), &value))
     {
-      tool->channel = value;
+      GimpCurvesConfig *config = tool->config;
+
+      g_object_set (config,
+                    "channel", value,
+                    NULL);
+
       gimp_histogram_view_set_channel (GIMP_HISTOGRAM_VIEW (tool->graph),
-                                       tool->channel);
+                                       config->channel);
       gimp_curve_view_set_xpos (GIMP_CURVE_VIEW (tool->graph),
-                                tool->col_value[tool->channel]);
-
-      gimp_color_bar_set_channel (GIMP_COLOR_BAR (tool->yrange), tool->channel);
+                                tool->col_value[config->channel]);
 
-      /* FIXME: hack */
-      if (! tool->color)
-        tool->channel = (tool->channel == GIMP_HISTOGRAM_ALPHA) ? 1 : 0;
+      gimp_color_bar_set_channel (GIMP_COLOR_BAR (tool->yrange),
+                                  config->channel);
 
       gimp_curve_view_set_curve (GIMP_CURVE_VIEW (tool->graph),
-                                 tool->curve[tool->channel]);
+                                 config->curve[config->channel]);
 
       gimp_int_radio_group_set_active (GTK_RADIO_BUTTON (tool->curve_type),
-                                       tool->curve[tool->channel]->curve_type);
+                                       config->curve[config->channel]->curve_type);
 
-      curves_curve_callback (tool->curve[tool->channel], tool);
+      curves_curve_callback (config->curve[config->channel], tool);
     }
 }
 
@@ -785,7 +714,7 @@
 curves_channel_reset_callback (GtkWidget      *widget,
                                GimpCurvesTool *tool)
 {
-  gimp_curve_reset (tool->curve[tool->channel], FALSE);
+  gimp_curves_config_reset_channel (tool->config, tool->config->channel);
 }
 
 static gboolean
@@ -819,12 +748,13 @@
 curves_curve_type_callback (GtkWidget      *widget,
                             GimpCurvesTool *tool)
 {
-  GimpCurveType curve_type;
+  GimpCurvesConfig *config = tool->config;
+  GimpCurveType     curve_type;
 
   gimp_radio_button_update (widget, &curve_type);
 
-  if (tool->curve[tool->channel]->curve_type != curve_type)
+  if (config->curve[config->channel]->curve_type != curve_type)
     {
-      gimp_curve_set_curve_type (tool->curve[tool->channel], curve_type);
+      gimp_curve_set_curve_type (config->curve[config->channel], curve_type);
     }
 }

Modified: branches/weskaggs/app/tools/gimpcurvestool.h
==============================================================================
--- branches/weskaggs/app/tools/gimpcurvestool.h	(original)
+++ branches/weskaggs/app/tools/gimpcurvestool.h	Fri Jan 25 18:43:27 2008
@@ -37,13 +37,12 @@
 {
   GimpImageMapTool      parent_instance;
 
-  GimpCurve            *curve[5];
+  GimpCurvesConfig     *config;
   GimpLut              *lut;
 
   /* dialog */
   gboolean              color;
   gboolean              alpha;
-  GimpHistogramChannel  channel;
 
   gint                  col_value[5];
 

Modified: branches/weskaggs/app/tools/gimphuesaturationtool.c
==============================================================================
--- branches/weskaggs/app/tools/gimphuesaturationtool.c	(original)
+++ branches/weskaggs/app/tools/gimphuesaturationtool.c	Fri Jan 25 18:43:27 2008
@@ -21,16 +21,17 @@
 #include <gegl.h>
 #include <gtk/gtk.h>
 
-#include "libgimpcolor/gimpcolor.h"
 #include "libgimpwidgets/gimpwidgets.h"
 
 #include "tools-types.h"
 
 #include "base/hue-saturation.h"
 
+#include "gegl/gimphuesaturationconfig.h"
+#include "gegl/gimpoperationhuesaturation.h"
+
 #include "core/gimpdrawable.h"
 #include "core/gimpimage.h"
-#include "core/gimpimagemap.h"
 
 #include "widgets/gimphelp-ids.h"
 
@@ -60,21 +61,21 @@
 static void       gimp_hue_saturation_tool_dialog        (GimpImageMapTool *im_tool);
 static void       gimp_hue_saturation_tool_reset         (GimpImageMapTool *im_tool);
 
-static void     hue_saturation_update_sliders       (GimpHueSaturationTool *hs_tool);
-static void     hue_saturation_update_color_areas   (GimpHueSaturationTool *hs_tool);
+static void       hue_saturation_update_sliders          (GimpHueSaturationTool *hs_tool);
+static void       hue_saturation_update_color_areas      (GimpHueSaturationTool *hs_tool);
 
-static void     hue_saturation_partition_callback       (GtkWidget     *widget,
-                                                         gpointer       data);
-static void     hue_saturation_partition_reset_callback (GtkWidget     *widget,
-                                                         gpointer       data);
-static void     hue_saturation_hue_changed              (GtkAdjustment *adj,
-                                                         gpointer       data);
-static void     hue_saturation_lightness_changed        (GtkAdjustment *adj,
-                                                         gpointer       data);
-static void     hue_saturation_saturation_changed       (GtkAdjustment *adj,
-                                                         gpointer       data);
-static void     hue_saturation_overlap_changed          (GtkAdjustment *adj,
-                                                         gpointer       data);
+static void       hue_saturation_range_callback          (GtkWidget             *widget,
+                                                          GimpHueSaturationTool *hs_tool);
+static void       hue_saturation_range_reset_callback    (GtkWidget             *widget,
+                                                          GimpHueSaturationTool *hs_tool);
+static void       hue_saturation_hue_changed             (GtkAdjustment         *adjustment,
+                                                          GimpHueSaturationTool *hs_tool);
+static void       hue_saturation_lightness_changed       (GtkAdjustment         *adjustment,
+                                                          GimpHueSaturationTool *hs_tool);
+static void       hue_saturation_saturation_changed      (GtkAdjustment         *adjustment,
+                                                          GimpHueSaturationTool *hs_tool);
+static void       hue_saturation_overlap_changed         (GtkAdjustment         *adjustment,
+                                                          GimpHueSaturationTool *hs_tool);
 
 
 G_DEFINE_TYPE (GimpHueSaturationTool, gimp_hue_saturation_tool,
@@ -82,16 +83,6 @@
 
 #define parent_class gimp_hue_saturation_tool_parent_class
 
-static gint default_colors[6][3] =
-{
-  { 255,   0,   0 },
-  { 255, 255,   0 },
-  {   0, 255,   0 },
-  {   0, 255, 255 },
-  {   0,   0, 255 },
-  { 255,   0, 255 }
-};
-
 
 void
 gimp_hue_saturation_tool_register (GimpToolRegisterCallback  callback,
@@ -134,7 +125,6 @@
   GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (hs_tool);
 
   hs_tool->hue_saturation = g_slice_new0 (HueSaturation);
-  hs_tool->hue_partition  = GIMP_ALL_HUES;
 
   hue_saturation_init (hs_tool->hue_saturation);
 
@@ -147,6 +137,12 @@
 {
   GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (object);
 
+  if (hs_tool->config)
+    {
+      g_object_unref (hs_tool->config);
+      hs_tool->config = NULL;
+    }
+
   g_slice_free (HueSaturation, hs_tool->hue_saturation);
 
   G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -172,11 +168,13 @@
       return FALSE;
     }
 
-  hue_saturation_init (hs_tool->hue_saturation);
-  hue_saturation_calculate_transfers (hs_tool->hue_saturation);
+  gimp_hue_saturation_config_reset (hs_tool->config);
 
   GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error);
 
+  gimp_int_radio_group_set_active (GTK_RADIO_BUTTON (hs_tool->range_radio),
+                                   hs_tool->config->range);
+
   hue_saturation_update_sliders (hs_tool);
   hue_saturation_update_color_areas (hs_tool);
 
@@ -186,34 +184,28 @@
 static GeglNode *
 gimp_hue_saturation_tool_get_operation (GimpImageMapTool *im_tool)
 {
-  return g_object_new (GEGL_TYPE_NODE,
+  GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (im_tool);
+  GeglNode              *node;
+
+  node = g_object_new (GEGL_TYPE_NODE,
                        "operation", "gimp-hue-saturation",
                        NULL);
+
+  hs_tool->config = g_object_new (GIMP_TYPE_HUE_SATURATION_CONFIG, NULL);
+
+  gegl_node_set (node,
+                 "config", hs_tool->config,
+                 NULL);
+
+  return node;
 }
 
 static void
 gimp_hue_saturation_tool_map (GimpImageMapTool *image_map_tool)
 {
   GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (image_map_tool);
-  HueSaturation         *hs      = hs_tool->hue_saturation;
-  GimpHueRange           range;
-
-  for (range = GIMP_ALL_HUES; range <= GIMP_MAGENTA_HUES; range++)
-    {
-      gegl_node_set (image_map_tool->operation,
-                     "range", range,
-                     NULL);
-
-      gegl_node_set (image_map_tool->operation,
-                     "hue",        hs->hue[range]        / 180.0,
-                     "saturation", hs->saturation[range] / 100.0,
-                     "lightness",  hs->lightness[range]  / 100.0,
-                     NULL);
-    }
 
-  gegl_node_set (image_map_tool->operation,
-                 "overlap", hs->overlap / 100.0,
-                 NULL);
+  gimp_hue_saturation_config_to_cruft (hs_tool->config, hs_tool->hue_saturation);
 }
 
 
@@ -247,7 +239,7 @@
     gint         frame_col;
     gint         frame_row;
   }
-  hue_partition_table[] =
+  hue_range_table[] =
   {
     { N_("M_aster"), N_("Adjust all colors"), 2, 3, 0, 0 },
     { N_("_R"),      N_("Red"),               2, 1, 2, 0 },
@@ -271,7 +263,7 @@
   gtk_box_pack_start (GTK_BOX (vbox), abox, TRUE, TRUE, 0);
   gtk_widget_show (abox);
 
-  /*  The table containing hue partitions  */
+  /*  The table containing hue ranges  */
   table = gtk_table_new (7, 5, FALSE);
   gtk_table_set_col_spacing (GTK_TABLE (table), 0, 4);
   gtk_table_set_col_spacing (GTK_TABLE (table), 3, 4);
@@ -279,27 +271,31 @@
   gtk_table_set_row_spacing (GTK_TABLE (table), 5, 2);
   gtk_container_add (GTK_CONTAINER (abox), table);
 
-  /*  the radio buttons for hue partitions  */
-  for (i = 0; i < G_N_ELEMENTS (hue_partition_table); i++)
+  /*  the radio buttons for hue ranges  */
+  for (i = 0; i < G_N_ELEMENTS (hue_range_table); i++)
     {
       button = gtk_radio_button_new_with_mnemonic (group,
-                                                   gettext (hue_partition_table[i].label));
+                                                   gettext (hue_range_table[i].label));
       group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (button));
-      g_object_set_data (G_OBJECT (button), "hue_partition",
+      g_object_set_data (G_OBJECT (button), "gimp-item-data",
                          GINT_TO_POINTER (i));
 
       gimp_help_set_help_data (button,
-                               gettext (hue_partition_table[i].tooltip),
+                               gettext (hue_range_table[i].tooltip),
                                NULL);
 
       if (i == 0)
-        gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (button), FALSE);
+        {
+          gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (button), FALSE);
+
+          hs_tool->range_radio = button;
+        }
 
       gtk_table_attach (GTK_TABLE (table), button,
-                        hue_partition_table[i].label_col,
-                        hue_partition_table[i].label_col + 1,
-                        hue_partition_table[i].label_row,
-                        hue_partition_table[i].label_row + 1,
+                        hue_range_table[i].label_col,
+                        hue_range_table[i].label_col + 1,
+                        hue_range_table[i].label_row,
+                        hue_range_table[i].label_row + 1,
                         GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
 
       if (i > 0)
@@ -309,25 +305,24 @@
           frame = gtk_frame_new (NULL);
           gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
           gtk_table_attach (GTK_TABLE (table), frame,
-                            hue_partition_table[i].frame_col,
-                            hue_partition_table[i].frame_col + 1,
-                            hue_partition_table[i].frame_row,
-                            hue_partition_table[i].frame_row + 1,
+                            hue_range_table[i].frame_col,
+                            hue_range_table[i].frame_col + 1,
+                            hue_range_table[i].frame_row,
+                            hue_range_table[i].frame_row + 1,
                             GTK_SHRINK | GTK_FILL, GTK_SHRINK | GTK_FILL, 0, 0);
           gtk_widget_show (frame);
 
-          hs_tool->hue_partition_da[i - 1] = gimp_color_area_new (&color,
-                                                                  GIMP_COLOR_AREA_FLAT,
-                                                                  0);
-          gtk_widget_set_size_request (hs_tool->hue_partition_da[i - 1],
+          hs_tool->hue_range_color_area[i - 1] =
+            gimp_color_area_new (&color, GIMP_COLOR_AREA_FLAT, 0);
+          gtk_widget_set_size_request (hs_tool->hue_range_color_area[i - 1],
                                        DA_WIDTH, DA_HEIGHT);
           gtk_container_add (GTK_CONTAINER (frame),
-                             hs_tool->hue_partition_da[i - 1]);
-          gtk_widget_show (hs_tool->hue_partition_da[i - 1]);
+                             hs_tool->hue_range_color_area[i - 1]);
+          gtk_widget_show (hs_tool->hue_range_color_area[i - 1]);
         }
 
       g_signal_connect (button, "toggled",
-                        G_CALLBACK (hue_saturation_partition_callback),
+                        G_CALLBACK (hue_saturation_range_callback),
                         hs_tool);
 
       gtk_widget_show (button);
@@ -443,7 +438,7 @@
   gtk_widget_show (button);
 
   g_signal_connect (button, "clicked",
-                    G_CALLBACK (hue_saturation_partition_reset_callback),
+                    G_CALLBACK (hue_saturation_range_reset_callback),
                     hs_tool);
 }
 
@@ -451,9 +446,12 @@
 gimp_hue_saturation_tool_reset (GimpImageMapTool *image_map_tool)
 {
   GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (image_map_tool);
+  GimpHueRange           range   = hs_tool->config->range;
 
-  hue_saturation_init (hs_tool->hue_saturation);
-  hue_saturation_calculate_transfers (hs_tool->hue_saturation);
+  gimp_hue_saturation_config_reset (hs_tool->config);
+  g_object_set (hs_tool->config,
+                "range", range,
+                NULL);
 
   hue_saturation_update_sliders (hs_tool);
   hue_saturation_update_color_areas (hs_tool);
@@ -462,72 +460,68 @@
 static void
 hue_saturation_update_sliders (GimpHueSaturationTool *hs_tool)
 {
-  gtk_adjustment_set_value (GTK_ADJUSTMENT (hs_tool->hue_data),
-                            hs_tool->hue_saturation->hue[hs_tool->hue_partition]);
-  gtk_adjustment_set_value (GTK_ADJUSTMENT (hs_tool->lightness_data),
-                            hs_tool->hue_saturation->lightness[hs_tool->hue_partition]);
-  gtk_adjustment_set_value (GTK_ADJUSTMENT (hs_tool->saturation_data),
-                            hs_tool->hue_saturation->saturation[hs_tool->hue_partition]);
-  gtk_adjustment_set_value (GTK_ADJUSTMENT (hs_tool->overlap_data),
-                            hs_tool->hue_saturation->overlap);
+  GimpHueSaturationConfig *config = hs_tool->config;
+
+  gtk_adjustment_set_value (hs_tool->hue_data,
+                            config->hue[config->range]        * 180.0);
+  gtk_adjustment_set_value (hs_tool->lightness_data,
+                            config->lightness[config->range]  * 100.0);
+  gtk_adjustment_set_value (hs_tool->saturation_data,
+                            config->saturation[config->range] * 100.0);
+  gtk_adjustment_set_value (hs_tool->overlap_data,
+                            config->overlap * 100.0);
 }
 
 static void
 hue_saturation_update_color_areas (GimpHueSaturationTool *hs_tool)
 {
-  gint    rgb[3];
-  GimpRGB color;
-  gint    i;
+  static GimpRGB default_colors[6] =
+  {
+    { 1.0,   0,   0, },
+    { 1.0, 1.0,   0, },
+    {   0, 1.0,   0, },
+    {   0, 1.0, 1.0, },
+    {   0,   0, 1.0, },
+    { 1.0,   0, 1.0, }
+  };
+
+  gint i;
 
   for (i = 0; i < 6; i++)
     {
-      rgb[RED_PIX]   = default_colors[i][RED_PIX];
-      rgb[GREEN_PIX] = default_colors[i][GREEN_PIX];
-      rgb[BLUE_PIX]  = default_colors[i][BLUE_PIX];
-
-      gimp_rgb_to_hsl_int (rgb, rgb + 1, rgb + 2);
-
-      rgb[RED_PIX]   = hs_tool->hue_saturation->hue_transfer[i][rgb[RED_PIX]];
-      rgb[GREEN_PIX] = hs_tool->hue_saturation->saturation_transfer[i][rgb[GREEN_PIX]];
-      rgb[BLUE_PIX]  = hs_tool->hue_saturation->lightness_transfer[i][rgb[BLUE_PIX]];
-
-      gimp_hsl_to_rgb_int (rgb, rgb + 1, rgb + 2);
+      GimpRGB color = default_colors[i];
 
-      gimp_rgb_set_uchar (&color,
-                          (guchar) rgb[0], (guchar) rgb[1], (guchar) rgb[2]);
+      gimp_operation_hue_saturation_map (hs_tool->config, &color, i + 1,
+                                         &color);
 
-      gimp_color_area_set_color (GIMP_COLOR_AREA (hs_tool->hue_partition_da[i]),
+      gimp_color_area_set_color (GIMP_COLOR_AREA (hs_tool->hue_range_color_area[i]),
                                  &color);
     }
 }
 
 static void
-hue_saturation_partition_callback (GtkWidget *widget,
-                                   gpointer   data)
+hue_saturation_range_callback (GtkWidget             *widget,
+                               GimpHueSaturationTool *hs_tool)
 {
-  GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (data);
-  GimpHueRange           partition;
-
-  partition = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget),
-                                                  "hue_partition"));
-
-  if (hs_tool->hue_partition != partition)
+  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
     {
-      hs_tool->hue_partition = partition;
+      GimpHueRange range;
+
+      gimp_radio_button_update (widget, &range);
+      g_object_set (hs_tool->config,
+                    "range", range,
+                    NULL);
 
       hue_saturation_update_sliders (hs_tool);
     }
 }
 
 static void
-hue_saturation_partition_reset_callback (GtkWidget *widget,
-                                         gpointer   data)
+hue_saturation_range_reset_callback (GtkWidget             *widget,
+                                     GimpHueSaturationTool *hs_tool)
 {
-  GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (data);
-
-  hue_saturation_partition_reset (hs_tool->hue_saturation,
-                                  hs_tool->hue_partition);
-  hue_saturation_calculate_transfers (hs_tool->hue_saturation);
+  gimp_hue_saturation_config_reset_range (hs_tool->config,
+                                          hs_tool->config->range);
 
   hue_saturation_update_sliders (hs_tool);
   hue_saturation_update_color_areas (hs_tool);
@@ -536,16 +530,17 @@
 }
 
 static void
-hue_saturation_hue_changed (GtkAdjustment *adjustment,
-                            gpointer       data)
+hue_saturation_hue_changed (GtkAdjustment         *adjustment,
+                            GimpHueSaturationTool *hs_tool)
 {
-  GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (data);
-  GimpHueRange           part    = hs_tool->hue_partition;
+  GimpHueSaturationConfig *config = hs_tool->config;
+  gdouble                  value  = adjustment->value / 180.0;
 
-  if (hs_tool->hue_saturation->hue[part] != adjustment->value)
+  if (config->hue[config->range] != value)
     {
-      hs_tool->hue_saturation->hue[part] = adjustment->value;
-      hue_saturation_calculate_transfers (hs_tool->hue_saturation);
+      g_object_set (config,
+                    "hue", value,
+                    NULL);
 
       hue_saturation_update_color_areas (hs_tool);
 
@@ -554,16 +549,17 @@
 }
 
 static void
-hue_saturation_lightness_changed (GtkAdjustment *adjustment,
-                                  gpointer       data)
+hue_saturation_lightness_changed (GtkAdjustment         *adjustment,
+                                  GimpHueSaturationTool *hs_tool)
 {
-  GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (data);
-  GimpHueRange           part    = hs_tool->hue_partition;
+  GimpHueSaturationConfig *config = hs_tool->config;
+  gdouble                  value  = adjustment->value / 100.0;
 
-  if (hs_tool->hue_saturation->lightness[part] != adjustment->value)
+  if (config->lightness[config->range] != value)
     {
-      hs_tool->hue_saturation->lightness[part] = adjustment->value;
-      hue_saturation_calculate_transfers (hs_tool->hue_saturation);
+      g_object_set (config,
+                    "lightness", value,
+                    NULL);
 
       hue_saturation_update_color_areas (hs_tool);
 
@@ -572,16 +568,17 @@
 }
 
 static void
-hue_saturation_saturation_changed (GtkAdjustment *adjustment,
-                                   gpointer       data)
+hue_saturation_saturation_changed (GtkAdjustment         *adjustment,
+                                   GimpHueSaturationTool *hs_tool)
 {
-  GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (data);
-  GimpHueRange           part    = hs_tool->hue_partition;
+  GimpHueSaturationConfig *config = hs_tool->config;
+  gdouble                  value  = adjustment->value / 100.0;
 
-  if (hs_tool->hue_saturation->saturation[part] != adjustment->value)
+  if (config->saturation[config->range] != value)
     {
-      hs_tool->hue_saturation->saturation[part] = adjustment->value;
-      hue_saturation_calculate_transfers (hs_tool->hue_saturation);
+      g_object_set (config,
+                    "saturation", value,
+                    NULL);
 
       hue_saturation_update_color_areas (hs_tool);
 
@@ -590,15 +587,17 @@
 }
 
 static void
-hue_saturation_overlap_changed (GtkAdjustment *adjustment,
-                                gpointer       data)
+hue_saturation_overlap_changed (GtkAdjustment         *adjustment,
+                                GimpHueSaturationTool *hs_tool)
 {
-  GimpHueSaturationTool *hs_tool = GIMP_HUE_SATURATION_TOOL (data);
+  GimpHueSaturationConfig *config = hs_tool->config;
+  gdouble                  value  = adjustment->value / 100.0;
 
-  if (hs_tool->hue_saturation->overlap != adjustment->value)
+  if (config->overlap != value)
     {
-      hs_tool->hue_saturation->overlap = adjustment->value;
-      hue_saturation_calculate_transfers (hs_tool->hue_saturation);
+      g_object_set (config,
+                    "overlap", value,
+                    NULL);
 
       hue_saturation_update_color_areas (hs_tool);
 

Modified: branches/weskaggs/app/tools/gimphuesaturationtool.h
==============================================================================
--- branches/weskaggs/app/tools/gimphuesaturationtool.h	(original)
+++ branches/weskaggs/app/tools/gimphuesaturationtool.h	Fri Jan 25 18:43:27 2008
@@ -36,17 +36,18 @@
 
 struct _GimpHueSaturationTool
 {
-  GimpImageMapTool  parent_instance;
+  GimpImageMapTool         parent_instance;
 
-  HueSaturation    *hue_saturation;
+  GimpHueSaturationConfig *config;
+  HueSaturation           *hue_saturation;
 
   /*  dialog  */
-  GimpHueRange      hue_partition;
-  GtkWidget        *hue_partition_da[6];
-  GtkAdjustment    *overlap_data;
-  GtkAdjustment    *hue_data;
-  GtkAdjustment    *lightness_data;
-  GtkAdjustment    *saturation_data;
+  GtkWidget               *range_radio;
+  GtkWidget               *hue_range_color_area[6];
+  GtkAdjustment           *overlap_data;
+  GtkAdjustment           *hue_data;
+  GtkAdjustment           *lightness_data;
+  GtkAdjustment           *saturation_data;
 };
 
 struct _GimpHueSaturationToolClass

Modified: branches/weskaggs/app/tools/gimpimagemaptool.c
==============================================================================
--- branches/weskaggs/app/tools/gimpimagemaptool.c	(original)
+++ branches/weskaggs/app/tools/gimpimagemaptool.c	Fri Jan 25 18:43:27 2008
@@ -30,17 +30,12 @@
 
 #include "tools-types.h"
 
-/* temp */
-#include "config/gimpcoreconfig.h"
-
 #include "core/gimp.h"
-#include "core/gimpcontext.h"
 #include "core/gimpdrawable.h"
 #include "core/gimpimage.h"
 #include "core/gimpimage-pick-color.h"
 #include "core/gimpimagemap.h"
 #include "core/gimppickable.h"
-#include "core/gimpprogress.h"
 #include "core/gimpprojection.h"
 #include "core/gimptoolinfo.h"
 
@@ -491,8 +486,8 @@
 static void
 gimp_image_map_tool_create_map (GimpImageMapTool *tool)
 {
-  GimpCoreConfig *config = GIMP_TOOL (tool)->tool_info->gimp->config;
-  gboolean        use_gegl;
+  Gimp     *gimp = GIMP_TOOL (tool)->tool_info->gimp;
+  gboolean  use_gegl;
 
   if (tool->image_map)
     {
@@ -502,7 +497,7 @@
 
   g_assert (tool->operation || tool->apply_func);
 
-  use_gegl = (config->use_gegl || ! tool->apply_func);
+  use_gegl = gimp_use_gegl (gimp) || ! tool->apply_func;
 
   tool->image_map = gimp_image_map_new (tool->drawable,
                                         GIMP_TOOL (tool)->tool_info->blurb,

Modified: branches/weskaggs/app/tools/gimpimagemaptool.h
==============================================================================
--- branches/weskaggs/app/tools/gimpimagemaptool.h	(original)
+++ branches/weskaggs/app/tools/gimpimagemaptool.h	Fri Jan 25 18:43:27 2008
@@ -19,12 +19,6 @@
 #ifndef  __GIMP_IMAGE_MAP_TOOL_H__
 #define  __GIMP_IMAGE_MAP_TOOL_H__
 
-#ifndef __GEGL_H__
-#ifdef __GNUC__
-#warning FIXME: dont include gegl.h here
-#endif
-#include <gegl.h>
-#endif /* __GEGL_H__ */
 
 #include "gimpcolortool.h"
 

Modified: branches/weskaggs/app/tools/gimplevelstool.c
==============================================================================
--- branches/weskaggs/app/tools/gimplevelstool.c	(original)
+++ branches/weskaggs/app/tools/gimplevelstool.c	Fri Jan 25 18:43:27 2008
@@ -18,17 +18,10 @@
 
 #include "config.h"
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
 #include <gegl.h>
 #include <gtk/gtk.h>
 
 #include "libgimpmath/gimpmath.h"
-#include "libgimpcolor/gimpcolor.h"
-#include "libgimpconfig/gimpconfig.h"
 #include "libgimpwidgets/gimpwidgets.h"
 
 #include "tools-types.h"
@@ -38,11 +31,11 @@
 #include "base/levels.h"
 
 #include "gegl/gimplevelsconfig.h"
+#include "gegl/gimpoperationlevels.h"
 
 #include "core/gimpdrawable.h"
 #include "core/gimpdrawable-histogram.h"
 #include "core/gimpimage.h"
-#include "core/gimpimagemap.h"
 
 #include "widgets/gimpcolorbar.h"
 #include "widgets/gimphandlebar.h"
@@ -53,7 +46,6 @@
 
 #include "gimphistogramoptions.h"
 #include "gimplevelstool.h"
-#include "gimptoolcontrol.h"
 
 #include "gimp-intl.h"
 
@@ -64,8 +56,8 @@
 #define PICK_ALL_CHANNELS (1 << 8)
 
 #define HISTOGRAM_WIDTH    256
-#define GRADIENT_HEIGHT    12
-#define CONTROL_HEIGHT     10
+#define GRADIENT_HEIGHT     12
+#define CONTROL_HEIGHT      10
 
 
 /*  local function prototypes  */
@@ -180,13 +172,9 @@
   GimpImageMapTool *im_tool = GIMP_IMAGE_MAP_TOOL (tool);
 
   tool->lut           = gimp_lut_new ();
-  tool->levels        = g_slice_new0 (Levels);
   tool->hist          = NULL;
-  tool->channel       = GIMP_HISTOGRAM_VALUE;
   tool->active_picker = NULL;
 
-  levels_init (tool->levels);
-
   im_tool->apply_func = (GimpImageMapApplyFunc) gimp_lut_process;
   im_tool->apply_data = tool->lut;
 }
@@ -196,15 +184,14 @@
 {
   GimpLevelsTool *tool = GIMP_LEVELS_TOOL (object);
 
-  gimp_lut_free (tool->lut);
-  g_slice_free (Levels, tool->levels);
-
   if (tool->config)
     {
       g_object_unref (tool->config);
       tool->config = NULL;
     }
 
+  gimp_lut_free (tool->lut);
+
   if (tool->hist)
     {
       gimp_histogram_free (tool->hist);
@@ -237,9 +224,8 @@
 
   gimp_levels_config_reset (l_tool->config);
 
-  l_tool->channel = l_tool->config->channel;
-  l_tool->color   = gimp_drawable_is_rgb (drawable);
-  l_tool->alpha   = gimp_drawable_has_alpha (drawable);
+  l_tool->color = gimp_drawable_is_rgb (drawable);
+  l_tool->alpha = gimp_drawable_has_alpha (drawable);
 
   if (l_tool->active_picker)
     gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (l_tool->active_picker),
@@ -251,7 +237,7 @@
                                       levels_menu_sensitivity, l_tool, NULL);
 
   gimp_int_combo_box_set_active (GIMP_INT_COMBO_BOX (l_tool->channel_menu),
-                                 l_tool->channel);
+                                 l_tool->config->channel);
 
   levels_update_adjustments (l_tool);
 
@@ -285,12 +271,13 @@
 gimp_levels_tool_map (GimpImageMapTool *image_map_tool)
 {
   GimpLevelsTool *tool = GIMP_LEVELS_TOOL (image_map_tool);
+  Levels          levels;
 
-  gimp_levels_config_to_levels_cruft (tool->config, tool->levels, tool->color);
+  gimp_levels_config_to_cruft (tool->config, &levels, tool->color);
 
   gimp_lut_setup (tool->lut,
                   (GimpLutFunc) levels_lut_func,
-                  tool->levels,
+                  &levels,
                   gimp_drawable_bytes (image_map_tool->drawable));
 }
 
@@ -691,9 +678,14 @@
 static void
 gimp_levels_tool_reset (GimpImageMapTool *image_map_tool)
 {
-  GimpLevelsTool *tool = GIMP_LEVELS_TOOL (image_map_tool);
+  GimpLevelsTool       *tool    = GIMP_LEVELS_TOOL (image_map_tool);
+  GimpHistogramChannel  channel = tool->config->channel;
 
   gimp_levels_config_reset (tool->config);
+  g_object_set (tool->config,
+                "channel", channel,
+                NULL);
+
   levels_update_adjustments (tool);
 }
 
@@ -703,70 +695,14 @@
                                 GError           **error)
 {
   GimpLevelsTool *tool = GIMP_LEVELS_TOOL (image_map_tool);
-  FILE           *file = fp;
-  gint            low_input[5];
-  gint            high_input[5];
-  gint            low_output[5];
-  gint            high_output[5];
-  gdouble         gamma[5];
-  gint            i, fields;
-  gchar           buf[50];
-  gchar          *nptr;
-
-  if (! fgets (buf, sizeof (buf), file) ||
-      strcmp (buf, "# GIMP Levels File\n") != 0)
-    {
-      g_set_error (error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_PARSE,
-                   _("not a GIMP Levels file"));
-      return FALSE;
-    }
-
-  for (i = 0; i < 5; i++)
-    {
-      fields = fscanf (file, "%d %d %d %d ",
-                       &low_input[i],
-                       &high_input[i],
-                       &low_output[i],
-                       &high_output[i]);
-
-      if (fields != 4)
-        goto error;
-
-      if (! fgets (buf, 50, file))
-        goto error;
-
-      gamma[i] = g_ascii_strtod (buf, &nptr);
 
-      if (buf == nptr || errno == ERANGE)
-        goto error;
-    }
-
-  for (i = 0; i < 5; i++)
+  if (gimp_levels_config_load_cruft (tool->config, fp, error))
     {
-      g_object_set (tool->config,
-                    "channel", i,
-                    NULL);
+      levels_update_adjustments (tool);
 
-      g_object_set (tool->config,
-                    "low-input",   low_input[i]   / 255.0,
-                    "high-input",  high_input[i]  / 255.0,
-                    "low-output",  low_output[i]  / 255.0,
-                    "high-output", high_output[i] / 255.0,
-                    "gamma",       gamma[i],
-                    NULL);
+      return TRUE;
     }
 
-  g_object_set (tool->config,
-                "channel", tool->channel,
-                NULL);
-
-  levels_update_adjustments (tool);
-
-  return TRUE;
-
- error:
-  g_set_error (error, GIMP_CONFIG_ERROR, GIMP_CONFIG_ERROR_PARSE,
-               _("parse error"));
   return FALSE;
 }
 
@@ -775,41 +711,26 @@
                                 gpointer          fp)
 {
   GimpLevelsTool *tool = GIMP_LEVELS_TOOL (image_map_tool);
-  FILE           *file = fp;
-  gint            i;
-
-  fprintf (file, "# GIMP Levels File\n");
-
-  for (i = 0; i < 5; i++)
-    {
-      gchar buf[G_ASCII_DTOSTR_BUF_SIZE];
 
-      fprintf (file, "%d %d %d %d %s\n",
-               (gint) (tool->config->low_input[i]   * 255.999),
-               (gint) (tool->config->high_input[i]  * 255.999),
-               (gint) (tool->config->low_output[i]  * 255.999),
-               (gint) (tool->config->high_output[i] * 255.999),
-               g_ascii_formatd (buf, G_ASCII_DTOSTR_BUF_SIZE, "%f",
-                                tool->config->gamma[i]));
-    }
-
-  return TRUE;
+  return gimp_levels_config_save_cruft (tool->config, fp);
 }
 
 static void
 levels_update_adjustments (GimpLevelsTool *tool)
 {
+  GimpLevelsConfig *config = tool->config;
+
   tool->low_input->upper    = 255;
   tool->high_input->lower   = 0;
   tool->gamma_linear->lower = 0;
   tool->gamma_linear->upper = 255;
 
   gtk_adjustment_set_value (tool->low_input,
-                            tool->config->low_input[tool->channel] * 255.0);
+                            config->low_input[config->channel]  * 255.0);
   gtk_adjustment_set_value (tool->gamma,
-                            tool->config->gamma[tool->channel]);
+                            config->gamma[config->channel]);
   gtk_adjustment_set_value (tool->high_input,
-                            tool->config->high_input[tool->channel] * 255.0);
+                            config->high_input[config->channel] * 255.0);
 
   tool->low_input->upper    = tool->high_input->value;
   tool->high_input->lower   = tool->low_input->value;
@@ -820,9 +741,9 @@
   gtk_adjustment_changed (tool->gamma_linear);
 
   gtk_adjustment_set_value (tool->low_output,
-                            tool->config->low_output[tool->channel] * 255.0);
+                            config->low_output[config->channel]  * 255.0);
   gtk_adjustment_set_value (tool->high_output,
-                            tool->config->high_output[tool->channel] * 255.0);
+                            config->high_output[config->channel] * 255.0);
 
   levels_update_input_bar (tool);
 }
@@ -830,28 +751,54 @@
 static void
 levels_update_input_bar (GimpLevelsTool *tool)
 {
-  /*  Recalculate the transfer arrays  */
-  gimp_levels_config_to_levels_cruft (tool->config, tool->levels, tool->color);
-  levels_calculate_transfers (tool->levels);
+  GimpLevelsConfig *config = tool->config;
 
-  switch (tool->channel)
+  switch (config->channel)
     {
     case GIMP_HISTOGRAM_VALUE:
     case GIMP_HISTOGRAM_ALPHA:
     case GIMP_HISTOGRAM_RGB:
-      gimp_color_bar_set_buffers (GIMP_COLOR_BAR (tool->input_bar),
-                                  tool->levels->input[tool->channel],
-                                  tool->levels->input[tool->channel],
-                                  tool->levels->input[tool->channel]);
+      {
+        guchar v[256];
+        gint   i;
+
+        for (i = 0; i < 256; i++)
+          {
+            v[i] = gimp_operation_levels_map_input (config,
+                                                    config->channel,
+                                                    i / 255.0) * 255.999;
+          }
+
+        gimp_color_bar_set_buffers (GIMP_COLOR_BAR (tool->input_bar),
+                                    v, v, v);
+      }
       break;
 
     case GIMP_HISTOGRAM_RED:
     case GIMP_HISTOGRAM_GREEN:
     case GIMP_HISTOGRAM_BLUE:
-      gimp_color_bar_set_buffers (GIMP_COLOR_BAR (tool->input_bar),
-                                  tool->levels->input[GIMP_HISTOGRAM_RED],
-                                  tool->levels->input[GIMP_HISTOGRAM_GREEN],
-                                  tool->levels->input[GIMP_HISTOGRAM_BLUE]);
+      {
+        guchar r[256];
+        guchar g[256];
+        guchar b[256];
+        gint   i;
+
+        for (i = 0; i < 256; i++)
+          {
+            r[i] = gimp_operation_levels_map_input (config,
+                                                    GIMP_HISTOGRAM_RED,
+                                                    i / 255.0) * 255.999;
+            g[i] = gimp_operation_levels_map_input (config,
+                                                    GIMP_HISTOGRAM_GREEN,
+                                                    i / 255.0) * 255.999;
+            b[i] = gimp_operation_levels_map_input (config,
+                                                    GIMP_HISTOGRAM_BLUE,
+                                                    i / 255.0) * 255.999;
+          }
+
+        gimp_color_bar_set_buffers (GIMP_COLOR_BAR (tool->input_bar),
+                                    r, g, b);
+      }
       break;
     }
 }
@@ -864,16 +811,14 @@
 
   if (gimp_int_combo_box_get_active (GIMP_INT_COMBO_BOX (widget), &value))
     {
-      tool->channel = value;
-
       g_object_set (tool->config,
-                    "channel", tool->channel,
+                    "channel", value,
                     NULL);
 
       gimp_histogram_view_set_channel (GIMP_HISTOGRAM_VIEW (tool->hist_view),
-                                       tool->channel);
+                                       tool->config->channel);
       gimp_color_bar_set_channel (GIMP_COLOR_BAR (tool->output_bar),
-                                  tool->channel);
+                                  tool->config->channel);
 
       levels_update_adjustments (tool);
     }
@@ -883,7 +828,7 @@
 levels_channel_reset_callback (GtkWidget      *widget,
                                GimpLevelsTool *tool)
 {
-  gimp_levels_config_reset_channel (tool->config, tool->channel);
+  gimp_levels_config_reset_channel (tool->config, tool->config->channel);
   levels_update_adjustments (tool);
 
   gimp_image_map_tool_preview (GIMP_IMAGE_MAP_TOOL (tool));
@@ -933,7 +878,7 @@
 
   delta = (tool->high_input->value - tool->low_input->value) / 2.0;
   mid   = tool->low_input->value + delta;
-  tmp   = log10 (1.0 / tool->config->gamma[tool->channel]);
+  tmp   = log10 (1.0 / tool->config->gamma[tool->config->channel]);
   value = mid + delta * tmp;
 
   gtk_adjustment_set_value (tool->gamma_linear, value);
@@ -964,16 +909,17 @@
 levels_low_input_changed (GtkAdjustment  *adjustment,
                           GimpLevelsTool *tool)
 {
-  gint value = ROUND (adjustment->value);
+  GimpLevelsConfig *config = tool->config;
+  gint              value  = ROUND (adjustment->value);
 
   tool->high_input->lower   = value;
   tool->gamma_linear->lower = value;
   gtk_adjustment_changed (tool->high_input);
   gtk_adjustment_changed (tool->gamma_linear);
 
-  if (tool->config->low_input[tool->channel] != value / 255.0)
+  if (config->low_input[config->channel] != value / 255.0)
     {
-      g_object_set (tool->config,
+      g_object_set (config,
                     "low-input", value / 255.0,
                     NULL);
       levels_update_input_bar (tool);
@@ -988,9 +934,11 @@
 levels_gamma_changed (GtkAdjustment  *adjustment,
                       GimpLevelsTool *tool)
 {
-  if (tool->config->gamma[tool->channel] != adjustment->value)
+  GimpLevelsConfig *config = tool->config;
+
+  if (config->gamma[config->channel] != adjustment->value)
     {
-      g_object_set (tool->config,
+      g_object_set (config,
                     "gamma", adjustment->value,
                     NULL);
       levels_update_input_bar (tool);
@@ -1005,16 +953,17 @@
 levels_high_input_changed (GtkAdjustment  *adjustment,
                            GimpLevelsTool *tool)
 {
-  gint value = ROUND (adjustment->value);
+  GimpLevelsConfig *config = tool->config;
+  gint              value  = ROUND (adjustment->value);
 
   tool->low_input->upper    = value;
   tool->gamma_linear->upper = value;
   gtk_adjustment_changed (tool->low_input);
   gtk_adjustment_changed (tool->gamma_linear);
 
-  if (tool->config->high_input[tool->channel] != value / 255.0)
+  if (config->high_input[config->channel] != value / 255.0)
     {
-      g_object_set (tool->config,
+      g_object_set (config,
                     "high-input", value / 255.0,
                     NULL);
       levels_update_input_bar (tool);
@@ -1029,11 +978,12 @@
 levels_low_output_changed (GtkAdjustment  *adjustment,
                            GimpLevelsTool *tool)
 {
-  gint value = ROUND (adjustment->value);
+  GimpLevelsConfig *config = tool->config;
+  gint              value  = ROUND (adjustment->value);
 
-  if (tool->config->low_output[tool->channel] != value / 255.0)
+  if (config->low_output[config->channel] != value / 255.0)
     {
-      g_object_set (tool->config,
+      g_object_set (config,
                     "low-output", value / 255.0,
                     NULL);
 
@@ -1045,11 +995,12 @@
 levels_high_output_changed (GtkAdjustment  *adjustment,
                             GimpLevelsTool *tool)
 {
-  gint value = ROUND (adjustment->value);
+  GimpLevelsConfig *config = tool->config;
+  gint              value  = ROUND (adjustment->value);
 
-  if (tool->config->high_output[tool->channel] != value / 255.0)
+  if (config->high_output[config->channel] != value / 255.0)
     {
-      g_object_set (tool->config,
+      g_object_set (config,
                     "high-output", value / 255.0,
                     NULL);
 
@@ -1149,7 +1100,7 @@
   else
     {
       levels_input_adjust_by_color (tool->config,
-                                    value, tool->channel, color);
+                                    value, tool->config->channel, color);
     }
 
   levels_update_adjustments (tool);

Modified: branches/weskaggs/app/tools/gimplevelstool.h
==============================================================================
--- branches/weskaggs/app/tools/gimplevelstool.h	(original)
+++ branches/weskaggs/app/tools/gimplevelstool.h	Fri Jan 25 18:43:27 2008
@@ -40,12 +40,10 @@
 
   GimpLevelsConfig     *config;
   GimpLut              *lut;
-  Levels               *levels;
 
   /* dialog */
   gboolean              color;
   gboolean              alpha;
-  GimpHistogramChannel  channel;
 
   GimpHistogram        *hist;
 

Modified: branches/weskaggs/app/tools/gimpposterizetool.c
==============================================================================
--- branches/weskaggs/app/tools/gimpposterizetool.c	(original)
+++ branches/weskaggs/app/tools/gimpposterizetool.c	Fri Jan 25 18:43:27 2008
@@ -30,7 +30,6 @@
 
 #include "core/gimpdrawable.h"
 #include "core/gimpimage.h"
-#include "core/gimpimagemap.h"
 
 #include "widgets/gimphelp-ids.h"
 
@@ -153,7 +152,7 @@
 
   GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error);
 
-  gtk_adjustment_set_value (GTK_ADJUSTMENT (posterize_tool->levels_data),
+  gtk_adjustment_set_value (posterize_tool->levels_data,
                             posterize_tool->levels);
 
   gimp_image_map_tool_preview (GIMP_IMAGE_MAP_TOOL (posterize_tool));
@@ -225,7 +224,7 @@
 
   posterize_tool->levels = POSTERIZE_DEFAULT_LEVELS;
 
-  gtk_adjustment_set_value (GTK_ADJUSTMENT (posterize_tool->levels_data),
+  gtk_adjustment_set_value (posterize_tool->levels_data,
                             posterize_tool->levels);
 }
 

Modified: branches/weskaggs/app/tools/gimprectangleselecttool.c
==============================================================================
--- branches/weskaggs/app/tools/gimprectangleselecttool.c	(original)
+++ branches/weskaggs/app/tools/gimprectangleselecttool.c	Fri Jan 25 18:43:27 2008
@@ -779,6 +779,10 @@
   gimp_rect_select_tool_update_option_defaults (rect_sel_tool,
                                                 FALSE);
 
+  /* Reset the automatic undo/redo mechanism */
+  priv->undo = NULL;
+  priv->redo = NULL;
+
   return TRUE;
 }
 

Modified: branches/weskaggs/app/tools/gimprectangletool.c
==============================================================================
--- branches/weskaggs/app/tools/gimprectangletool.c	(original)
+++ branches/weskaggs/app/tools/gimprectangletool.c	Fri Jan 25 18:43:27 2008
@@ -2881,6 +2881,8 @@
     *other_y = other_side_y;
 
   gimp_rectangle_tool_check_function (rect_tool);
+
+  gimp_rectangle_tool_update_int_rect (rect_tool);
 }
 
 /**

Modified: branches/weskaggs/app/tools/gimpthresholdtool.c
==============================================================================
--- branches/weskaggs/app/tools/gimpthresholdtool.c	(original)
+++ branches/weskaggs/app/tools/gimpthresholdtool.c	Fri Jan 25 18:43:27 2008
@@ -28,10 +28,11 @@
 #include "base/gimphistogram.h"
 #include "base/threshold.h"
 
+#include "gegl/gimpthresholdconfig.h"
+
 #include "core/gimpdrawable.h"
 #include "core/gimpdrawable-histogram.h"
 #include "core/gimpimage.h"
-#include "core/gimpimagemap.h"
 
 #include "widgets/gimphelp-ids.h"
 #include "widgets/gimphistogrambox.h"
@@ -116,9 +117,6 @@
   t_tool->threshold = g_slice_new0 (Threshold);
   t_tool->hist      = NULL;
 
-  t_tool->threshold->low_threshold  = 127;
-  t_tool->threshold->high_threshold = 255;
-
   im_tool->apply_func = (GimpImageMapApplyFunc) threshold;
   im_tool->apply_data = t_tool->threshold;
 }
@@ -128,6 +126,12 @@
 {
   GimpThresholdTool *t_tool = GIMP_THRESHOLD_TOOL (object);
 
+  if (t_tool->config)
+    {
+      g_object_unref (t_tool->config);
+      t_tool->config = NULL;
+    }
+
   g_slice_free (Threshold, t_tool->threshold);
 
   if (t_tool->hist)
@@ -160,9 +164,9 @@
   if (! t_tool->hist)
     t_tool->hist = gimp_histogram_new ();
 
-  t_tool->threshold->color          = gimp_drawable_is_rgb (drawable);
-  t_tool->threshold->low_threshold  = 127;
-  t_tool->threshold->high_threshold = 255;
+  gimp_threshold_config_reset (t_tool->config);
+
+  t_tool->threshold->color = gimp_drawable_is_rgb (drawable);
 
   GIMP_TOOL_CLASS (parent_class)->initialize (tool, display, error);
 
@@ -174,8 +178,8 @@
   gimp_histogram_view_set_histogram (t_tool->histogram_box->view,
                                      t_tool->hist);
   gimp_histogram_view_set_range (t_tool->histogram_box->view,
-                                 t_tool->threshold->low_threshold,
-                                 t_tool->threshold->high_threshold);
+                                 t_tool->config->low  * 255.999,
+                                 t_tool->config->high * 255.999);
   g_signal_handlers_unblock_by_func (t_tool->histogram_box->view,
                                      gimp_threshold_tool_histogram_range,
                                      t_tool);
@@ -186,11 +190,22 @@
 }
 
 static GeglNode *
-gimp_threshold_tool_get_operation (GimpImageMapTool *im_tool)
+gimp_threshold_tool_get_operation (GimpImageMapTool *image_map_tool)
 {
-  return g_object_new (GEGL_TYPE_NODE,
+  GimpThresholdTool *t_tool = GIMP_THRESHOLD_TOOL (image_map_tool);
+  GeglNode          *node;
+
+  node = g_object_new (GEGL_TYPE_NODE,
                        "operation", "gimp-threshold",
                        NULL);
+
+  t_tool->config = g_object_new (GIMP_TYPE_THRESHOLD_CONFIG, NULL);
+
+  gegl_node_set (node,
+                 "config", t_tool->config,
+                 NULL);
+
+  return node;
 }
 
 static void
@@ -198,10 +213,7 @@
 {
   GimpThresholdTool *t_tool = GIMP_THRESHOLD_TOOL (image_map_tool);
 
-  gegl_node_set (image_map_tool->operation,
-                 "low",  t_tool->threshold->low_threshold  / 255.0,
-                 "high", t_tool->threshold->high_threshold / 255.0,
-                 NULL);
+  gimp_threshold_config_to_cruft (t_tool->config, t_tool->threshold);
 }
 
 
@@ -265,7 +277,11 @@
 {
   GimpThresholdTool *t_tool = GIMP_THRESHOLD_TOOL (image_map_tool);
 
-  gimp_histogram_view_set_range (t_tool->histogram_box->view, 127.0, 255.0);
+  gimp_threshold_config_reset (t_tool->config);
+
+  gimp_histogram_view_set_range (t_tool->histogram_box->view,
+                                 t_tool->config->low  * 255.999,
+                                 t_tool->config->high * 255.999);
 }
 
 static void
@@ -274,11 +290,16 @@
                                      gint               end,
                                      GimpThresholdTool *t_tool)
 {
-  if (start != t_tool->threshold->low_threshold ||
-      end   != t_tool->threshold->high_threshold)
+  gdouble low  = start / 255.0;
+  gdouble high = end   / 255.0;
+
+  if (low  != t_tool->config->low ||
+      high != t_tool->config->high)
     {
-      t_tool->threshold->low_threshold  = start;
-      t_tool->threshold->high_threshold = end;
+      g_object_set (t_tool->config,
+                    "low",  low,
+                    "high", high,
+                    NULL);
 
       gimp_image_map_tool_preview (GIMP_IMAGE_MAP_TOOL (t_tool));
     }
@@ -288,14 +309,12 @@
 gimp_threshold_tool_auto_clicked (GtkWidget         *button,
                                   GimpThresholdTool *t_tool)
 {
-  gdouble low_threshold;
-
-  low_threshold =
-    gimp_histogram_get_threshold (t_tool->hist,
-                                  (t_tool->threshold->color ?
-                                   GIMP_HISTOGRAM_RGB : GIMP_HISTOGRAM_VALUE),
-                                  0, 255);
+  gdouble low = gimp_histogram_get_threshold (t_tool->hist,
+                                              t_tool->threshold->color ?
+                                              GIMP_HISTOGRAM_RGB :
+                                              GIMP_HISTOGRAM_VALUE,
+                                              0, 255);
 
   gimp_histogram_view_set_range (t_tool->histogram_box->view,
-                                 low_threshold, 255.0);
+                                 low, 255.0);
 }

Modified: branches/weskaggs/app/tools/gimpthresholdtool.h
==============================================================================
--- branches/weskaggs/app/tools/gimpthresholdtool.h	(original)
+++ branches/weskaggs/app/tools/gimpthresholdtool.h	Fri Jan 25 18:43:27 2008
@@ -36,13 +36,14 @@
 
 struct _GimpThresholdTool
 {
-  GimpImageMapTool  parent_instance;
+  GimpImageMapTool     parent_instance;
 
-  Threshold        *threshold;
+  GimpThresholdConfig *config;
+  Threshold           *threshold;
 
   /*  dialog  */
-  GimpHistogram    *hist;
-  GimpHistogramBox *histogram_box;
+  GimpHistogram       *hist;
+  GimpHistogramBox    *histogram_box;
 };
 
 struct _GimpThresholdToolClass

Modified: branches/weskaggs/app/widgets/gimpcolormapeditor.c
==============================================================================
--- branches/weskaggs/app/widgets/gimpcolormapeditor.c	(original)
+++ branches/weskaggs/app/widgets/gimpcolormapeditor.c	Fri Jan 25 18:43:27 2008
@@ -504,7 +504,8 @@
               row[(j * cellsize + k) * 3 + b] = image->colormap[col * 3 + b];
         }
 
-      memset (row + j * cellsize * 3, 255, 3 * (width - j * cellsize));
+      if (j * cellsize > width)
+        memset (row + j * cellsize * 3, 255, 3 * (width - j * cellsize));
 
       for (k = 0; k < cellsize; k++)
         {

Modified: branches/weskaggs/libgimpwidgets/gimpstock.c
==============================================================================
--- branches/weskaggs/libgimpwidgets/gimpstock.c	(original)
+++ branches/weskaggs/libgimpwidgets/gimpstock.c	Fri Jan 25 18:43:27 2008
@@ -477,6 +477,7 @@
   { GIMP_STOCK_WARNING,                  stock_warning_24                  },
   { GIMP_TOILET_PAPER,                   stock_toilet_paper_24             },
   { GIMP_STOCK_WEB,                      stock_web_24                      },
+  { GIMP_STOCK_WILBER,                   stock_wilber_22                   },
   { GIMP_STOCK_VIDEO,                    stock_video_24                    }
 };
 

Modified: branches/weskaggs/plug-ins/common/pcx.c
==============================================================================
--- branches/weskaggs/plug-ins/common/pcx.c	(original)
+++ branches/weskaggs/plug-ins/common/pcx.c	Fri Jan 25 18:43:27 2008
@@ -381,7 +381,7 @@
       g_message (_("Unsupported or invalid image height: %d"), height);
       return -1;
     }
-  if (bytesperline < width)
+  if (bytesperline < (width * pcx_header.bpp) / 8)
     {
       g_message (_("Invalid number of bytes per line in PCX header"));
       return -1;

Modified: branches/weskaggs/plug-ins/imagemap/imap_about.c
==============================================================================
--- branches/weskaggs/plug-ins/imagemap/imap_about.c	(original)
+++ branches/weskaggs/plug-ins/imagemap/imap_about.c	Fri Jan 25 18:43:27 2008
@@ -40,7 +40,7 @@
 
        dialog = g_object_new (GTK_TYPE_ABOUT_DIALOG,
                               "transient-for", get_dialog(),
-                              "name",    _("Image Map Plug-In"),
+                              "program-name",  _("Image Map Plug-In"),
                               "version", "2.3",
                               "authors", authors,
                               "copyright",

Modified: branches/weskaggs/plug-ins/imagemap/imap_csim.y
==============================================================================
--- branches/weskaggs/plug-ins/imagemap/imap_csim.y	(original)
+++ branches/weskaggs/plug-ins/imagemap/imap_csim.y	Fri Jan 25 18:43:27 2008
@@ -49,7 +49,7 @@
 %union {
   int val;
   double value;
-  char id[1024];		/* Large enough to hold all polygon points! */
+  char id[4096];		/* Large enough to hold all polygon points! */
 }
 
 %token<val> IMG SRC WIDTH HEIGHT BORDER USEMAP
@@ -136,7 +136,7 @@
 		{
 		   gchar *description;
 
-		   description = g_strconcat(_map_info->description, $2, "\n", 
+		   description = g_strconcat(_map_info->description, $2, "\n",
 					     NULL);
 		   g_strreplace(&_map_info->description, description);
 		}
@@ -154,7 +154,7 @@
 		;
 
 xhtml_close	: '>'
-		| '/' '>' 
+		| '/' '>'
 		;
 
 tag_list	: /* Empty */
@@ -310,7 +310,7 @@
 
 %%
 
-static void 
+static void
 csim_error(char* s)
 {
    extern FILE *csim_in;

Modified: branches/weskaggs/plug-ins/imagemap/imap_csim_parse.c
==============================================================================
--- branches/weskaggs/plug-ins/imagemap/imap_csim_parse.c	(original)
+++ branches/weskaggs/plug-ins/imagemap/imap_csim_parse.c	Fri Jan 25 18:43:27 2008
@@ -207,7 +207,7 @@
 {
   int val;
   double value;
-  char id[1024];		/* Large enough to hold all polygon points! */
+  char id[4096];		/* Large enough to hold all polygon points! */
 }
 /* Line 187 of yacc.c.  */
 #line 214 "y.tab.c"
@@ -1580,7 +1580,7 @@
     {
 		   gchar *description;
 
-		   description = g_strconcat(_map_info->description, (yyvsp[(2) - (3)].id), "\n", 
+		   description = g_strconcat(_map_info->description, (yyvsp[(2) - (3)].id), "\n",
 					     NULL);
 		   g_strreplace(&_map_info->description, description);
 		}
@@ -1955,7 +1955,7 @@
 #line 311 "imap_csim.y"
 
 
-static void 
+static void
 csim_error(char* s)
 {
    extern FILE *csim_in;

Modified: branches/weskaggs/plug-ins/imagemap/imap_csim_parse.h
==============================================================================
--- branches/weskaggs/plug-ins/imagemap/imap_csim_parse.h	(original)
+++ branches/weskaggs/plug-ins/imagemap/imap_csim_parse.h	Fri Jan 25 18:43:27 2008
@@ -104,7 +104,7 @@
 {
   int val;
   double value;
-  char id[1024];		/* Large enough to hold all polygon points! */
+  char id[4096];		/* Large enough to hold all polygon points! */
 }
 /* Line 1489 of yacc.c.  */
 #line 111 "y.tab.h"

Modified: branches/weskaggs/plug-ins/imagemap/imap_mru.c
==============================================================================
--- branches/weskaggs/plug-ins/imagemap/imap_mru.c	(original)
+++ branches/weskaggs/plug-ins/imagemap/imap_mru.c	Fri Jan 25 18:43:27 2008
@@ -42,14 +42,18 @@
 mru_destruct(MRU_t *mru)
 {
    g_list_foreach(mru->list, (GFunc) g_free, NULL);
+   g_list_free (mru->list);
    g_free(mru);
 }
 
 static void
 mru_remove_link(MRU_t *mru, GList *link)
 {
-   g_free(link->data);
-   mru->list = g_list_remove_link(mru->list, link);
+  if (link)
+    {
+      g_free(link->data);
+      mru->list = g_list_remove_link(mru->list, link);
+    }
 }
 
 static GList*

Modified: branches/weskaggs/po-plug-ins/POTFILES.in
==============================================================================
--- branches/weskaggs/po-plug-ins/POTFILES.in	(original)
+++ branches/weskaggs/po-plug-ins/POTFILES.in	Fri Jan 25 18:43:27 2008
@@ -254,6 +254,11 @@
 plug-ins/print/print-draw-page.c
 plug-ins/print/print-page-layout.c
 plug-ins/print/print.c
+plug-ins/psd/psd-image-res-load.c
+plug-ins/psd/psd-load.c
+plug-ins/psd/psd-thumb-load.c
+plug-ins/psd/psd-util.c
+plug-ins/psd/psd.c
 plug-ins/rcm/rcm.c
 plug-ins/rcm/rcm_dialog.c
 plug-ins/rcm/rcm_stock.c

Modified: branches/weskaggs/po-plug-ins/POTFILES.skip
==============================================================================
--- branches/weskaggs/po-plug-ins/POTFILES.skip	(original)
+++ branches/weskaggs/po-plug-ins/POTFILES.skip	Fri Jan 25 18:43:27 2008
@@ -78,6 +78,8 @@
 app/core/gimpbrushpipe-load.c
 app/core/gimpchannel-select.c
 app/core/gimpchannel.c
+app/core/gimpcurve-load.c
+app/core/gimpcurve-save.c
 app/core/gimpdata.c
 app/core/gimpdatafactory.c
 app/core/gimpdrawable-blend.c
@@ -202,6 +204,9 @@
 app/pdb/drawable_cmds.c
 app/pdb/drawable_transform_cmds.c
 app/pdb/edit_cmds.c
+app/pdb/floating_sel_cmds.c
+app/pdb/gimppdb-query.c
+app/pdb/gimppdb-utils.c
 app/pdb/gimppdb.c
 app/pdb/gimpprocedure.c
 app/pdb/image_cmds.c
@@ -213,6 +218,7 @@
 app/pdb/vectors_cmds.c
 app/plug-in/gimpenvirontable.c
 app/plug-in/gimpinterpreterdb.c
+app/plug-in/gimpplugin-message.c
 app/plug-in/gimpplugin.c
 app/plug-in/gimppluginmanager-restore.c
 app/plug-in/gimppluginmanager.c
@@ -439,5 +445,5 @@
 plug-ins/script-fu/script-fu-scripts.c
 plug-ins/script-fu/script-fu-server.c
 plug-ins/script-fu/script-fu.c
-tools/gimp-remote.c
 tools/gimp-remote-x11.c
+tools/gimp-remote.c

Modified: branches/weskaggs/po/POTFILES.skip
==============================================================================
--- branches/weskaggs/po/POTFILES.skip	(original)
+++ branches/weskaggs/po/POTFILES.skip	Fri Jan 25 18:43:27 2008
@@ -1,672 +1,676 @@
 data/tips/gimp-tips.xml.in
 desktop/gimp.desktop.in
-libgimp/gimpbrushselectbutton.c
-libgimp/gimpexport.c
-libgimp/gimpfontselectbutton.c
-libgimp/gimpgradientselectbutton.c
-libgimp/gimpmenu.c
-libgimp/gimppaletteselectbutton.c
-libgimp/gimppatternselectbutton.c
-libgimp/gimpprocbrowserdialog.c
-libgimp/gimpprocview.c
-libgimp/gimpunitcache.c
-libgimpbase/gimpbaseenums.c
-libgimpbase/gimpcpuaccel.c
-libgimpbase/gimpmemsize.c
-libgimpbase/gimputils.c
-libgimpconfig/gimpcolorconfig-enums.c
-libgimpconfig/gimpconfig-deserialize.c
-libgimpconfig/gimpconfig-iface.c
-libgimpconfig/gimpconfig-path.c
-libgimpconfig/gimpconfigwriter.c
-libgimpconfig/gimpscanner.c
-libgimpmodule/gimpmodule.c
-libgimpthumb/gimpthumb-utils.c
-libgimpthumb/gimpthumbnail.c
-libgimpwidgets/gimpbrowser.c
-libgimpwidgets/gimpcolorbutton.c
-libgimpwidgets/gimpcolorprofilestore.c
-libgimpwidgets/gimpcolorscales.c
-libgimpwidgets/gimpcolorselection.c
-libgimpwidgets/gimpfileentry.c
-libgimpwidgets/gimpintstore.c
-libgimpwidgets/gimpmemsizeentry.c
-libgimpwidgets/gimppageselector.c
-libgimpwidgets/gimppatheditor.c
-libgimpwidgets/gimppickbutton.c
-libgimpwidgets/gimppreview.c
-libgimpwidgets/gimppreviewarea.c
-libgimpwidgets/gimpstock.c
-libgimpwidgets/gimpunitmenu.c
-libgimpwidgets/gimpwidgets.c
-libgimpwidgets/gimpwidgetsenums.c
-modules/cdisplay_colorblind.c
-modules/cdisplay_gamma.c
-modules/cdisplay_highcontrast.c
-modules/cdisplay_lcms.c
-modules/cdisplay_proof.c
-modules/colorsel_cmyk.c
-modules/colorsel_cmyk_lcms.c
-modules/colorsel_triangle.c
-modules/colorsel_water.c
-modules/controller_dx_dinput.c
-modules/controller_linux_input.c
-modules/controller_midi.c
-plug-ins/FractalExplorer/Dialogs.c
-plug-ins/FractalExplorer/FractalExplorer.c
-plug-ins/Lighting/lighting_apply.c
-plug-ins/Lighting/lighting_main.c
-plug-ins/Lighting/lighting_ui.c
-plug-ins/MapObject/mapobject_apply.c
-plug-ins/MapObject/mapobject_main.c
-plug-ins/MapObject/mapobject_ui.c
-plug-ins/bmp/bmp.c
-plug-ins/bmp/bmpread.c
-plug-ins/bmp/bmpwrite.c
-plug-ins/common/AlienMap2.c
-plug-ins/common/CEL.c
-plug-ins/common/CML_explorer.c
-plug-ins/common/aa.c
-plug-ins/common/align_layers.c
-plug-ins/common/animationplay.c
-plug-ins/common/animoptimize.c
-plug-ins/common/antialias.c
-plug-ins/common/apply_lens.c
-plug-ins/common/autocrop.c
-plug-ins/common/autostretch_hsv.c
-plug-ins/common/blinds.c
-plug-ins/common/blur.c
-plug-ins/common/borderaverage.c
-plug-ins/common/bumpmap.c
-plug-ins/common/c_astretch.c
-plug-ins/common/cartoon.c
-plug-ins/common/ccanalyze.c
-plug-ins/common/channel_mixer.c
-plug-ins/common/checkerboard.c
-plug-ins/common/color_enhance.c
-plug-ins/common/colorify.c
-plug-ins/common/colormap-remap.c
-plug-ins/common/colortoalpha.c
-plug-ins/common/compose.c
-plug-ins/common/compressor.c
-plug-ins/common/convmatrix.c
-plug-ins/common/csource.c
-plug-ins/common/cubism.c
-plug-ins/common/curve_bend.c
-plug-ins/common/decompose.c
-plug-ins/common/deinterlace.c
-plug-ins/common/depthmerge.c
-plug-ins/common/desktop-link.c
-plug-ins/common/despeckle.c
-plug-ins/common/destripe.c
-plug-ins/common/dicom.c
-plug-ins/common/diffraction.c
-plug-ins/common/displace.c
-plug-ins/common/dog.c
-plug-ins/common/edge.c
-plug-ins/common/emboss.c
-plug-ins/common/engrave.c
-plug-ins/common/exchange.c
-plug-ins/common/film.c
-plug-ins/common/flarefx.c
-plug-ins/common/fp.c
-plug-ins/common/fractaltrace.c
-plug-ins/common/gauss.c
-plug-ins/common/gbr.c
-plug-ins/common/gee.c
-plug-ins/common/gee_zoom.c
-plug-ins/common/gif-load.c
-plug-ins/common/gif-save.c
-plug-ins/common/gih.c
-plug-ins/common/glasstile.c
-plug-ins/common/gqbist.c
-plug-ins/common/gradmap.c
-plug-ins/common/grid.c
-plug-ins/common/gtm.c
-plug-ins/common/guillotine.c
-plug-ins/common/header.c
-plug-ins/common/hot.c
-plug-ins/common/illusion.c
-plug-ins/common/iwarp.c
-plug-ins/common/jigsaw.c
-plug-ins/common/laplace.c
-plug-ins/common/lcms.c
-plug-ins/common/lens.c
-plug-ins/common/lic.c
-plug-ins/common/mail.c
-plug-ins/common/mapcolor.c
-plug-ins/common/max_rgb.c
-plug-ins/common/mblur.c
-plug-ins/common/mng.c
-plug-ins/common/mosaic.c
-plug-ins/common/neon.c
-plug-ins/common/newsprint.c
-plug-ins/common/nlfilt.c
-plug-ins/common/noisify.c
-plug-ins/common/normalize.c
-plug-ins/common/nova.c
-plug-ins/common/oilify.c
-plug-ins/common/papertile.c
-plug-ins/common/pat.c
-plug-ins/common/pcx.c
-plug-ins/common/photocopy.c
-plug-ins/common/pix.c
-plug-ins/common/pixelize.c
-plug-ins/common/plasma.c
-plug-ins/common/plugin-browser.c
-plug-ins/common/png.c
-plug-ins/common/pnm.c
-plug-ins/common/polar.c
-plug-ins/common/poppler.c
-plug-ins/common/postscript.c
-plug-ins/common/procedure-browser.c
-plug-ins/common/psd-load.c
-plug-ins/common/psd-save.c
-plug-ins/common/psp.c
-plug-ins/common/randomize.c
-plug-ins/common/raw.c
-plug-ins/common/redeye.c
-plug-ins/common/retinex.c
-plug-ins/common/ripple.c
-plug-ins/common/rotate.c
-plug-ins/common/sample_colorize.c
-plug-ins/common/scatter_hsv.c
-plug-ins/common/screenshot.c
-plug-ins/common/sel_gauss.c
-plug-ins/common/semiflatten.c
-plug-ins/common/sharpen.c
-plug-ins/common/shift.c
-plug-ins/common/sinus.c
-plug-ins/common/smooth_palette.c
-plug-ins/common/snoise.c
-plug-ins/common/sobel.c
-plug-ins/common/softglow.c
-plug-ins/common/sparkle.c
-plug-ins/common/spheredesigner.c
-plug-ins/common/spread.c
-plug-ins/common/struc.c
-plug-ins/common/sunras.c
-plug-ins/common/svg.c
-plug-ins/common/tga.c
-plug-ins/common/threshold_alpha.c
-plug-ins/common/tiff-load.c
-plug-ins/common/tiff-save.c
-plug-ins/common/tile.c
-plug-ins/common/tileit.c
-plug-ins/common/tiler.c
-plug-ins/common/uniteditor.c
-plug-ins/common/unsharp.c
-plug-ins/common/video.c
-plug-ins/common/vinvert.c
-plug-ins/common/vpropagate.c
-plug-ins/common/warp.c
-plug-ins/common/waves.c
-plug-ins/common/webbrowser.c
-plug-ins/common/whirlpinch.c
-plug-ins/common/wind.c
-plug-ins/common/wmf.c
-plug-ins/common/xbm.c
-plug-ins/common/xpm.c
-plug-ins/common/xwd.c
-plug-ins/common/zealouscrop.c
-plug-ins/faxg3/faxg3.c
-plug-ins/fits/fits.c
-plug-ins/flame/flame.c
-plug-ins/gfig/gfig-bezier.c
-plug-ins/gfig/gfig-dialog.c
-plug-ins/gfig/gfig-dobject.c
-plug-ins/gfig/gfig-poly.c
-plug-ins/gfig/gfig-preview.c
-plug-ins/gfig/gfig-spiral.c
-plug-ins/gfig/gfig-star.c
-plug-ins/gfig/gfig-stock.c
-plug-ins/gfig/gfig.c
-plug-ins/gflare/gflare.c
-plug-ins/gfli/gfli.c
-plug-ins/gimpressionist/brush.c
-plug-ins/gimpressionist/color.c
-plug-ins/gimpressionist/general.c
-plug-ins/gimpressionist/gimp.c
-plug-ins/gimpressionist/gimpressionist.c
-plug-ins/gimpressionist/orientation.c
-plug-ins/gimpressionist/orientmap.c
-plug-ins/gimpressionist/paper.c
-plug-ins/gimpressionist/placement.c
-plug-ins/gimpressionist/ppmtool.c
-plug-ins/gimpressionist/presets.c
-plug-ins/gimpressionist/preview.c
-plug-ins/gimpressionist/repaint.c
-plug-ins/gimpressionist/size.c
-plug-ins/gimpressionist/sizemap.c
-plug-ins/gimpressionist/utils.c
-plug-ins/help/gimphelpdomain.c
-plug-ins/help/gimphelplocale.c
-plug-ins/helpbrowser/dialog.c
-plug-ins/ifscompose/ifscompose.c
-plug-ins/imagemap/imap_about.c
-plug-ins/imagemap/imap_cern_parse.c
-plug-ins/imagemap/imap_circle.c
-plug-ins/imagemap/imap_cmd_clear.c
-plug-ins/imagemap/imap_cmd_copy.c
-plug-ins/imagemap/imap_cmd_copy_object.c
-plug-ins/imagemap/imap_cmd_create.c
-plug-ins/imagemap/imap_cmd_cut.c
-plug-ins/imagemap/imap_cmd_cut_object.c
-plug-ins/imagemap/imap_cmd_delete.c
-plug-ins/imagemap/imap_cmd_delete_point.c
-plug-ins/imagemap/imap_cmd_edit_object.c
-plug-ins/imagemap/imap_cmd_gimp_guides.c
-plug-ins/imagemap/imap_cmd_guides.c
-plug-ins/imagemap/imap_cmd_insert_point.c
-plug-ins/imagemap/imap_cmd_move.c
-plug-ins/imagemap/imap_cmd_move_down.c
-plug-ins/imagemap/imap_cmd_move_sash.c
-plug-ins/imagemap/imap_cmd_move_selected.c
-plug-ins/imagemap/imap_cmd_move_to_front.c
-plug-ins/imagemap/imap_cmd_move_up.c
-plug-ins/imagemap/imap_cmd_object_down.c
-plug-ins/imagemap/imap_cmd_object_move.c
-plug-ins/imagemap/imap_cmd_object_up.c
-plug-ins/imagemap/imap_cmd_paste.c
-plug-ins/imagemap/imap_cmd_select.c
-plug-ins/imagemap/imap_cmd_select_all.c
-plug-ins/imagemap/imap_cmd_select_next.c
-plug-ins/imagemap/imap_cmd_select_prev.c
-plug-ins/imagemap/imap_cmd_select_region.c
-plug-ins/imagemap/imap_cmd_send_to_back.c
-plug-ins/imagemap/imap_cmd_unselect.c
-plug-ins/imagemap/imap_cmd_unselect_all.c
-plug-ins/imagemap/imap_csim_parse.c
-plug-ins/imagemap/imap_edit_area_info.c
-plug-ins/imagemap/imap_file.c
-plug-ins/imagemap/imap_grid.c
-plug-ins/imagemap/imap_main.c
-plug-ins/imagemap/imap_menu.c
-plug-ins/imagemap/imap_ncsa_parse.c
-plug-ins/imagemap/imap_polygon.c
-plug-ins/imagemap/imap_preferences.c
-plug-ins/imagemap/imap_rectangle.c
-plug-ins/imagemap/imap_selection.c
-plug-ins/imagemap/imap_settings.c
-plug-ins/imagemap/imap_source.c
-plug-ins/imagemap/y.tab.c
-plug-ins/jpeg/jpeg-exif.c
-plug-ins/jpeg/jpeg-load.c
-plug-ins/jpeg/jpeg-save.c
-plug-ins/jpeg/jpeg.c
-plug-ins/maze/algorithms.c
-plug-ins/maze/maze.c
-plug-ins/maze/maze_face.c
-plug-ins/metadata/interface.c
-plug-ins/metadata/xmp-parse.c
-plug-ins/pagecurl/pagecurl.c
-plug-ins/print/print-page-layout.c
-plug-ins/print/print.c
-plug-ins/pygimp/gimpfu.py
-plug-ins/pygimp/gimpui.py
-plug-ins/pygimp/plug-ins/colorxhtml.py
-plug-ins/pygimp/plug-ins/foggify.py
-plug-ins/pygimp/plug-ins/gimpcons.py
-plug-ins/pygimp/plug-ins/palette-offset.py
-plug-ins/pygimp/plug-ins/palette-sort.py
-plug-ins/pygimp/plug-ins/palette-to-gradient.py
-plug-ins/pygimp/plug-ins/py-slice.py
-plug-ins/pygimp/plug-ins/shadow_bevel.py
-plug-ins/rcm/rcm.c
-plug-ins/rcm/rcm_dialog.c
-plug-ins/rcm/rcm_stock.c
-plug-ins/script-fu/script-fu-console.c
-plug-ins/script-fu/script-fu-interface.c
-plug-ins/script-fu/script-fu-scripts.c
-plug-ins/script-fu/script-fu-server.c
-plug-ins/script-fu/script-fu.c
-plug-ins/sel2path/pxl-outline.c
-plug-ins/sel2path/sel2path.c
-plug-ins/sgi/sgi.c
-plug-ins/twain/twain.c
-plug-ins/uri/uri-backend-gnomevfs.c
-plug-ins/uri/uri-backend-libcurl.c
-plug-ins/uri/uri-backend-wget.c
-plug-ins/uri/uri.c
-plug-ins/winicon/icodialog.c
-plug-ins/winicon/icoload.c
-plug-ins/winicon/icosave.c
-plug-ins/winicon/main.c
-plug-ins/winsnap/winsnap.c
-plug-ins/xjt/xjt.c
-app/file/file-procedure.c
 desktop/gimp.desktop.in
 libgimp/gimpbrushselectbutton.c
+libgimp/gimpbrushselectbutton.c
 libgimp/gimpexport.c
+libgimp/gimpexport.c
+libgimp/gimpfontselectbutton.c
 libgimp/gimpfontselectbutton.c
 libgimp/gimpgradientselectbutton.c
+libgimp/gimpgradientselectbutton.c
+libgimp/gimpmenu.c
 libgimp/gimpmenu.c
 libgimp/gimppaletteselectbutton.c
+libgimp/gimppaletteselectbutton.c
+libgimp/gimppatternselectbutton.c
 libgimp/gimppatternselectbutton.c
 libgimp/gimpprocbrowserdialog.c
+libgimp/gimpprocbrowserdialog.c
 libgimp/gimpprocview.c
+libgimp/gimpprocview.c
+libgimp/gimpunitcache.c
 libgimp/gimpunitcache.c
 libgimpbase/gimpbaseenums.c
+libgimpbase/gimpbaseenums.c
 libgimpbase/gimpcpuaccel.c
+libgimpbase/gimpcpuaccel.c
+libgimpbase/gimpmemsize.c
 libgimpbase/gimpmemsize.c
 libgimpbase/gimputils.c
+libgimpbase/gimputils.c
 libgimpconfig/gimpcolorconfig-enums.c
+libgimpconfig/gimpcolorconfig-enums.c
+libgimpconfig/gimpconfig-deserialize.c
 libgimpconfig/gimpconfig-deserialize.c
 libgimpconfig/gimpconfig-iface.c
+libgimpconfig/gimpconfig-iface.c
+libgimpconfig/gimpconfig-path.c
 libgimpconfig/gimpconfig-path.c
 libgimpconfig/gimpconfigwriter.c
+libgimpconfig/gimpconfigwriter.c
+libgimpconfig/gimpscanner.c
 libgimpconfig/gimpscanner.c
 libgimpmodule/gimpmodule.c
+libgimpmodule/gimpmodule.c
 libgimpthumb/gimpthumb-utils.c
+libgimpthumb/gimpthumb-utils.c
+libgimpthumb/gimpthumbnail.c
 libgimpthumb/gimpthumbnail.c
 libgimpwidgets/gimpbrowser.c
+libgimpwidgets/gimpbrowser.c
 libgimpwidgets/gimpcolorbutton.c
+libgimpwidgets/gimpcolorbutton.c
+libgimpwidgets/gimpcolorprofilestore.c
 libgimpwidgets/gimpcolorprofilestore.c
 libgimpwidgets/gimpcolorscales.c
+libgimpwidgets/gimpcolorscales.c
 libgimpwidgets/gimpcolorselection.c
+libgimpwidgets/gimpcolorselection.c
+libgimpwidgets/gimpfileentry.c
 libgimpwidgets/gimpfileentry.c
 libgimpwidgets/gimpintstore.c
+libgimpwidgets/gimpintstore.c
+libgimpwidgets/gimpmemsizeentry.c
 libgimpwidgets/gimpmemsizeentry.c
 libgimpwidgets/gimppageselector.c
+libgimpwidgets/gimppageselector.c
+libgimpwidgets/gimppatheditor.c
 libgimpwidgets/gimppatheditor.c
 libgimpwidgets/gimppickbutton.c
+libgimpwidgets/gimppickbutton.c
 libgimpwidgets/gimppreview.c
+libgimpwidgets/gimppreview.c
+libgimpwidgets/gimppreviewarea.c
 libgimpwidgets/gimppreviewarea.c
 libgimpwidgets/gimpstock.c
+libgimpwidgets/gimpstock.c
 libgimpwidgets/gimpunitmenu.c
+libgimpwidgets/gimpunitmenu.c
+libgimpwidgets/gimpwidgets.c
 libgimpwidgets/gimpwidgets.c
 libgimpwidgets/gimpwidgetsenums.c
+libgimpwidgets/gimpwidgetsenums.c
 modules/cdisplay_colorblind.c
+modules/cdisplay_colorblind.c
+modules/cdisplay_gamma.c
 modules/cdisplay_gamma.c
 modules/cdisplay_highcontrast.c
+modules/cdisplay_highcontrast.c
+modules/cdisplay_lcms.c
 modules/cdisplay_lcms.c
 modules/cdisplay_proof.c
+modules/cdisplay_proof.c
+modules/colorsel_cmyk.c
 modules/colorsel_cmyk.c
 modules/colorsel_cmyk_lcms.c
+modules/colorsel_cmyk_lcms.c
 modules/colorsel_triangle.c
+modules/colorsel_triangle.c
+modules/colorsel_water.c
 modules/colorsel_water.c
 modules/controller_dx_dinput.c
+modules/controller_dx_dinput.c
 modules/controller_linux_input.c
+modules/controller_linux_input.c
+modules/controller_midi.c
 modules/controller_midi.c
 plug-ins/FractalExplorer/Dialogs.c
+plug-ins/FractalExplorer/Dialogs.c
 plug-ins/FractalExplorer/FractalExplorer.c
+plug-ins/FractalExplorer/FractalExplorer.c
+plug-ins/Lighting/lighting_apply.c
 plug-ins/Lighting/lighting_apply.c
 plug-ins/Lighting/lighting_main.c
+plug-ins/Lighting/lighting_main.c
+plug-ins/Lighting/lighting_ui.c
 plug-ins/Lighting/lighting_ui.c
 plug-ins/MapObject/mapobject_apply.c
+plug-ins/MapObject/mapobject_apply.c
+plug-ins/MapObject/mapobject_main.c
 plug-ins/MapObject/mapobject_main.c
 plug-ins/MapObject/mapobject_ui.c
+plug-ins/MapObject/mapobject_ui.c
 plug-ins/bmp/bmp.c
+plug-ins/bmp/bmp.c
+plug-ins/bmp/bmpread.c
 plug-ins/bmp/bmpread.c
 plug-ins/bmp/bmpwrite.c
+plug-ins/bmp/bmpwrite.c
 plug-ins/common/AlienMap2.c
+plug-ins/common/AlienMap2.c
+plug-ins/common/CEL.c
 plug-ins/common/CEL.c
 plug-ins/common/CML_explorer.c
+plug-ins/common/CML_explorer.c
 plug-ins/common/aa.c
+plug-ins/common/aa.c
+plug-ins/common/align_layers.c
 plug-ins/common/align_layers.c
 plug-ins/common/animationplay.c
+plug-ins/common/animationplay.c
 plug-ins/common/animoptimize.c
+plug-ins/common/animoptimize.c
+plug-ins/common/antialias.c
 plug-ins/common/antialias.c
 plug-ins/common/apply_lens.c
+plug-ins/common/apply_lens.c
 plug-ins/common/autocrop.c
+plug-ins/common/autocrop.c
+plug-ins/common/autostretch_hsv.c
 plug-ins/common/autostretch_hsv.c
 plug-ins/common/blinds.c
+plug-ins/common/blinds.c
 plug-ins/common/blur.c
+plug-ins/common/blur.c
+plug-ins/common/borderaverage.c
 plug-ins/common/borderaverage.c
 plug-ins/common/bumpmap.c
+plug-ins/common/bumpmap.c
 plug-ins/common/c_astretch.c
+plug-ins/common/c_astretch.c
+plug-ins/common/cartoon.c
 plug-ins/common/cartoon.c
 plug-ins/common/ccanalyze.c
+plug-ins/common/ccanalyze.c
+plug-ins/common/channel_mixer.c
 plug-ins/common/channel_mixer.c
 plug-ins/common/checkerboard.c
+plug-ins/common/checkerboard.c
+plug-ins/common/color_enhance.c
 plug-ins/common/color_enhance.c
 plug-ins/common/colorify.c
+plug-ins/common/colorify.c
+plug-ins/common/colormap-remap.c
 plug-ins/common/colormap-remap.c
 plug-ins/common/colortoalpha.c
+plug-ins/common/colortoalpha.c
+plug-ins/common/compose.c
 plug-ins/common/compose.c
 plug-ins/common/compressor.c
+plug-ins/common/compressor.c
+plug-ins/common/convmatrix.c
 plug-ins/common/convmatrix.c
 plug-ins/common/csource.c
+plug-ins/common/csource.c
+plug-ins/common/cubism.c
 plug-ins/common/cubism.c
 plug-ins/common/curve_bend.c
+plug-ins/common/curve_bend.c
+plug-ins/common/decompose.c
 plug-ins/common/decompose.c
 plug-ins/common/deinterlace.c
+plug-ins/common/deinterlace.c
+plug-ins/common/depthmerge.c
 plug-ins/common/depthmerge.c
 plug-ins/common/desktop-link.c
+plug-ins/common/desktop-link.c
+plug-ins/common/despeckle.c
 plug-ins/common/despeckle.c
 plug-ins/common/destripe.c
+plug-ins/common/destripe.c
+plug-ins/common/dicom.c
 plug-ins/common/dicom.c
 plug-ins/common/diffraction.c
+plug-ins/common/diffraction.c
+plug-ins/common/displace.c
 plug-ins/common/displace.c
 plug-ins/common/dog.c
+plug-ins/common/dog.c
+plug-ins/common/edge.c
 plug-ins/common/edge.c
 plug-ins/common/emboss.c
+plug-ins/common/emboss.c
+plug-ins/common/engrave.c
 plug-ins/common/engrave.c
 plug-ins/common/exchange.c
+plug-ins/common/exchange.c
+plug-ins/common/film.c
 plug-ins/common/film.c
 plug-ins/common/flarefx.c
+plug-ins/common/flarefx.c
+plug-ins/common/fp.c
 plug-ins/common/fp.c
 plug-ins/common/fractaltrace.c
+plug-ins/common/fractaltrace.c
+plug-ins/common/gauss.c
 plug-ins/common/gauss.c
 plug-ins/common/gbr.c
+plug-ins/common/gbr.c
+plug-ins/common/gee.c
 plug-ins/common/gee.c
 plug-ins/common/gee_zoom.c
+plug-ins/common/gee_zoom.c
+plug-ins/common/gif-load.c
 plug-ins/common/gif-load.c
 plug-ins/common/gif-save.c
+plug-ins/common/gif-save.c
+plug-ins/common/gih.c
 plug-ins/common/gih.c
 plug-ins/common/glasstile.c
+plug-ins/common/glasstile.c
+plug-ins/common/gqbist.c
 plug-ins/common/gqbist.c
 plug-ins/common/gradmap.c
+plug-ins/common/gradmap.c
+plug-ins/common/grid.c
 plug-ins/common/grid.c
 plug-ins/common/gtm.c
+plug-ins/common/gtm.c
+plug-ins/common/guillotine.c
 plug-ins/common/guillotine.c
 plug-ins/common/header.c
+plug-ins/common/header.c
+plug-ins/common/hot.c
 plug-ins/common/hot.c
 plug-ins/common/illusion.c
+plug-ins/common/illusion.c
+plug-ins/common/iwarp.c
 plug-ins/common/iwarp.c
 plug-ins/common/jigsaw.c
+plug-ins/common/jigsaw.c
+plug-ins/common/laplace.c
 plug-ins/common/laplace.c
 plug-ins/common/lcms.c
+plug-ins/common/lcms.c
+plug-ins/common/lens.c
 plug-ins/common/lens.c
 plug-ins/common/lic.c
+plug-ins/common/lic.c
+plug-ins/common/mail.c
 plug-ins/common/mail.c
 plug-ins/common/mapcolor.c
+plug-ins/common/mapcolor.c
+plug-ins/common/max_rgb.c
 plug-ins/common/max_rgb.c
 plug-ins/common/mblur.c
+plug-ins/common/mblur.c
+plug-ins/common/mng.c
 plug-ins/common/mng.c
 plug-ins/common/mosaic.c
+plug-ins/common/mosaic.c
+plug-ins/common/neon.c
 plug-ins/common/neon.c
 plug-ins/common/newsprint.c
+plug-ins/common/newsprint.c
+plug-ins/common/nlfilt.c
 plug-ins/common/nlfilt.c
 plug-ins/common/noisify.c
+plug-ins/common/noisify.c
+plug-ins/common/normalize.c
 plug-ins/common/normalize.c
 plug-ins/common/nova.c
+plug-ins/common/nova.c
+plug-ins/common/oilify.c
 plug-ins/common/oilify.c
 plug-ins/common/papertile.c
+plug-ins/common/papertile.c
+plug-ins/common/pat.c
 plug-ins/common/pat.c
 plug-ins/common/pcx.c
+plug-ins/common/pcx.c
+plug-ins/common/photocopy.c
 plug-ins/common/photocopy.c
 plug-ins/common/pix.c
+plug-ins/common/pix.c
+plug-ins/common/pixelize.c
 plug-ins/common/pixelize.c
 plug-ins/common/plasma.c
+plug-ins/common/plasma.c
+plug-ins/common/plugin-browser.c
 plug-ins/common/plugin-browser.c
 plug-ins/common/png.c
+plug-ins/common/png.c
+plug-ins/common/pnm.c
 plug-ins/common/pnm.c
 plug-ins/common/polar.c
+plug-ins/common/polar.c
+plug-ins/common/poppler.c
 plug-ins/common/poppler.c
 plug-ins/common/postscript.c
+plug-ins/common/postscript.c
+plug-ins/common/procedure-browser.c
 plug-ins/common/procedure-browser.c
 plug-ins/common/psd-load.c
+plug-ins/common/psd-load.c
+plug-ins/common/psd-save.c
 plug-ins/common/psd-save.c
 plug-ins/common/psp.c
+plug-ins/common/psp.c
+plug-ins/common/randomize.c
 plug-ins/common/randomize.c
 plug-ins/common/raw.c
+plug-ins/common/raw.c
+plug-ins/common/redeye.c
 plug-ins/common/redeye.c
 plug-ins/common/retinex.c
+plug-ins/common/retinex.c
+plug-ins/common/ripple.c
 plug-ins/common/ripple.c
 plug-ins/common/rotate.c
+plug-ins/common/rotate.c
+plug-ins/common/sample_colorize.c
 plug-ins/common/sample_colorize.c
 plug-ins/common/scatter_hsv.c
+plug-ins/common/scatter_hsv.c
+plug-ins/common/screenshot.c
 plug-ins/common/screenshot.c
 plug-ins/common/sel_gauss.c
+plug-ins/common/sel_gauss.c
+plug-ins/common/semiflatten.c
 plug-ins/common/semiflatten.c
 plug-ins/common/sharpen.c
+plug-ins/common/sharpen.c
+plug-ins/common/shift.c
 plug-ins/common/shift.c
 plug-ins/common/sinus.c
+plug-ins/common/sinus.c
+plug-ins/common/smooth_palette.c
 plug-ins/common/smooth_palette.c
 plug-ins/common/snoise.c
+plug-ins/common/snoise.c
+plug-ins/common/sobel.c
 plug-ins/common/sobel.c
 plug-ins/common/softglow.c
+plug-ins/common/softglow.c
+plug-ins/common/sparkle.c
 plug-ins/common/sparkle.c
 plug-ins/common/spheredesigner.c
+plug-ins/common/spheredesigner.c
+plug-ins/common/spread.c
 plug-ins/common/spread.c
 plug-ins/common/struc.c
+plug-ins/common/struc.c
+plug-ins/common/sunras.c
 plug-ins/common/sunras.c
 plug-ins/common/svg.c
+plug-ins/common/svg.c
+plug-ins/common/tga.c
 plug-ins/common/tga.c
 plug-ins/common/threshold_alpha.c
+plug-ins/common/threshold_alpha.c
+plug-ins/common/tiff-load.c
 plug-ins/common/tiff-load.c
 plug-ins/common/tiff-save.c
+plug-ins/common/tiff-save.c
+plug-ins/common/tile.c
 plug-ins/common/tile.c
 plug-ins/common/tileit.c
+plug-ins/common/tileit.c
+plug-ins/common/tiler.c
 plug-ins/common/tiler.c
 plug-ins/common/uniteditor.c
+plug-ins/common/uniteditor.c
+plug-ins/common/unsharp.c
 plug-ins/common/unsharp.c
 plug-ins/common/video.c
+plug-ins/common/video.c
+plug-ins/common/vinvert.c
 plug-ins/common/vinvert.c
 plug-ins/common/vpropagate.c
+plug-ins/common/vpropagate.c
+plug-ins/common/warp.c
 plug-ins/common/warp.c
 plug-ins/common/waves.c
+plug-ins/common/waves.c
+plug-ins/common/webbrowser.c
 plug-ins/common/webbrowser.c
 plug-ins/common/whirlpinch.c
+plug-ins/common/whirlpinch.c
+plug-ins/common/wind.c
 plug-ins/common/wind.c
 plug-ins/common/wmf.c
+plug-ins/common/wmf.c
+plug-ins/common/xbm.c
 plug-ins/common/xbm.c
 plug-ins/common/xpm.c
+plug-ins/common/xpm.c
+plug-ins/common/xwd.c
 plug-ins/common/xwd.c
 plug-ins/common/zealouscrop.c
+plug-ins/common/zealouscrop.c
+plug-ins/faxg3/faxg3.c
 plug-ins/faxg3/faxg3.c
 plug-ins/fits/fits.c
+plug-ins/fits/fits.c
+plug-ins/flame/flame.c
 plug-ins/flame/flame.c
 plug-ins/gfig/gfig-bezier.c
+plug-ins/gfig/gfig-bezier.c
+plug-ins/gfig/gfig-dialog.c
 plug-ins/gfig/gfig-dialog.c
 plug-ins/gfig/gfig-dobject.c
+plug-ins/gfig/gfig-dobject.c
+plug-ins/gfig/gfig-poly.c
 plug-ins/gfig/gfig-poly.c
 plug-ins/gfig/gfig-preview.c
+plug-ins/gfig/gfig-preview.c
+plug-ins/gfig/gfig-spiral.c
 plug-ins/gfig/gfig-spiral.c
 plug-ins/gfig/gfig-star.c
+plug-ins/gfig/gfig-star.c
+plug-ins/gfig/gfig-stock.c
 plug-ins/gfig/gfig-stock.c
 plug-ins/gfig/gfig.c
+plug-ins/gfig/gfig.c
+plug-ins/gflare/gflare.c
 plug-ins/gflare/gflare.c
 plug-ins/gfli/gfli.c
+plug-ins/gfli/gfli.c
+plug-ins/gimpressionist/brush.c
 plug-ins/gimpressionist/brush.c
 plug-ins/gimpressionist/color.c
+plug-ins/gimpressionist/color.c
+plug-ins/gimpressionist/general.c
 plug-ins/gimpressionist/general.c
 plug-ins/gimpressionist/gimp.c
+plug-ins/gimpressionist/gimp.c
+plug-ins/gimpressionist/gimpressionist.c
 plug-ins/gimpressionist/gimpressionist.c
 plug-ins/gimpressionist/orientation.c
+plug-ins/gimpressionist/orientation.c
+plug-ins/gimpressionist/orientmap.c
 plug-ins/gimpressionist/orientmap.c
 plug-ins/gimpressionist/paper.c
+plug-ins/gimpressionist/paper.c
+plug-ins/gimpressionist/placement.c
 plug-ins/gimpressionist/placement.c
 plug-ins/gimpressionist/ppmtool.c
+plug-ins/gimpressionist/ppmtool.c
+plug-ins/gimpressionist/presets.c
 plug-ins/gimpressionist/presets.c
 plug-ins/gimpressionist/preview.c
+plug-ins/gimpressionist/preview.c
+plug-ins/gimpressionist/repaint.c
 plug-ins/gimpressionist/repaint.c
 plug-ins/gimpressionist/size.c
+plug-ins/gimpressionist/size.c
+plug-ins/gimpressionist/sizemap.c
 plug-ins/gimpressionist/sizemap.c
 plug-ins/gimpressionist/utils.c
+plug-ins/gimpressionist/utils.c
+plug-ins/help/gimphelpdomain.c
 plug-ins/help/gimphelpdomain.c
 plug-ins/help/gimphelplocale.c
+plug-ins/help/gimphelplocale.c
+plug-ins/helpbrowser/dialog.c
 plug-ins/helpbrowser/dialog.c
 plug-ins/ifscompose/ifscompose.c
+plug-ins/ifscompose/ifscompose.c
+plug-ins/imagemap/imap_about.c
 plug-ins/imagemap/imap_about.c
 plug-ins/imagemap/imap_cern_parse.c
+plug-ins/imagemap/imap_cern_parse.c
+plug-ins/imagemap/imap_circle.c
 plug-ins/imagemap/imap_circle.c
 plug-ins/imagemap/imap_cmd_clear.c
+plug-ins/imagemap/imap_cmd_clear.c
+plug-ins/imagemap/imap_cmd_copy.c
 plug-ins/imagemap/imap_cmd_copy.c
 plug-ins/imagemap/imap_cmd_copy_object.c
+plug-ins/imagemap/imap_cmd_copy_object.c
+plug-ins/imagemap/imap_cmd_create.c
 plug-ins/imagemap/imap_cmd_create.c
 plug-ins/imagemap/imap_cmd_cut.c
+plug-ins/imagemap/imap_cmd_cut.c
+plug-ins/imagemap/imap_cmd_cut_object.c
 plug-ins/imagemap/imap_cmd_cut_object.c
 plug-ins/imagemap/imap_cmd_delete.c
+plug-ins/imagemap/imap_cmd_delete.c
+plug-ins/imagemap/imap_cmd_delete_point.c
 plug-ins/imagemap/imap_cmd_delete_point.c
 plug-ins/imagemap/imap_cmd_edit_object.c
+plug-ins/imagemap/imap_cmd_edit_object.c
+plug-ins/imagemap/imap_cmd_gimp_guides.c
 plug-ins/imagemap/imap_cmd_gimp_guides.c
 plug-ins/imagemap/imap_cmd_guides.c
+plug-ins/imagemap/imap_cmd_guides.c
+plug-ins/imagemap/imap_cmd_insert_point.c
 plug-ins/imagemap/imap_cmd_insert_point.c
 plug-ins/imagemap/imap_cmd_move.c
+plug-ins/imagemap/imap_cmd_move.c
+plug-ins/imagemap/imap_cmd_move_down.c
 plug-ins/imagemap/imap_cmd_move_down.c
 plug-ins/imagemap/imap_cmd_move_sash.c
+plug-ins/imagemap/imap_cmd_move_sash.c
+plug-ins/imagemap/imap_cmd_move_selected.c
 plug-ins/imagemap/imap_cmd_move_selected.c
 plug-ins/imagemap/imap_cmd_move_to_front.c
+plug-ins/imagemap/imap_cmd_move_to_front.c
+plug-ins/imagemap/imap_cmd_move_up.c
 plug-ins/imagemap/imap_cmd_move_up.c
 plug-ins/imagemap/imap_cmd_object_down.c
+plug-ins/imagemap/imap_cmd_object_down.c
+plug-ins/imagemap/imap_cmd_object_move.c
 plug-ins/imagemap/imap_cmd_object_move.c
 plug-ins/imagemap/imap_cmd_object_up.c
+plug-ins/imagemap/imap_cmd_object_up.c
+plug-ins/imagemap/imap_cmd_paste.c
 plug-ins/imagemap/imap_cmd_paste.c
 plug-ins/imagemap/imap_cmd_select.c
+plug-ins/imagemap/imap_cmd_select.c
+plug-ins/imagemap/imap_cmd_select_all.c
 plug-ins/imagemap/imap_cmd_select_all.c
 plug-ins/imagemap/imap_cmd_select_next.c
+plug-ins/imagemap/imap_cmd_select_next.c
+plug-ins/imagemap/imap_cmd_select_prev.c
 plug-ins/imagemap/imap_cmd_select_prev.c
 plug-ins/imagemap/imap_cmd_select_region.c
+plug-ins/imagemap/imap_cmd_select_region.c
+plug-ins/imagemap/imap_cmd_send_to_back.c
 plug-ins/imagemap/imap_cmd_send_to_back.c
 plug-ins/imagemap/imap_cmd_unselect.c
+plug-ins/imagemap/imap_cmd_unselect.c
+plug-ins/imagemap/imap_cmd_unselect_all.c
 plug-ins/imagemap/imap_cmd_unselect_all.c
 plug-ins/imagemap/imap_csim_parse.c
+plug-ins/imagemap/imap_csim_parse.c
+plug-ins/imagemap/imap_edit_area_info.c
 plug-ins/imagemap/imap_edit_area_info.c
 plug-ins/imagemap/imap_file.c
+plug-ins/imagemap/imap_file.c
+plug-ins/imagemap/imap_grid.c
 plug-ins/imagemap/imap_grid.c
 plug-ins/imagemap/imap_main.c
+plug-ins/imagemap/imap_main.c
+plug-ins/imagemap/imap_menu.c
 plug-ins/imagemap/imap_menu.c
 plug-ins/imagemap/imap_ncsa_parse.c
+plug-ins/imagemap/imap_ncsa_parse.c
+plug-ins/imagemap/imap_polygon.c
 plug-ins/imagemap/imap_polygon.c
 plug-ins/imagemap/imap_preferences.c
+plug-ins/imagemap/imap_preferences.c
+plug-ins/imagemap/imap_rectangle.c
 plug-ins/imagemap/imap_rectangle.c
 plug-ins/imagemap/imap_selection.c
+plug-ins/imagemap/imap_selection.c
+plug-ins/imagemap/imap_settings.c
 plug-ins/imagemap/imap_settings.c
 plug-ins/imagemap/imap_source.c
+plug-ins/imagemap/imap_source.c
+plug-ins/imagemap/y.tab.c
 plug-ins/imagemap/y.tab.c
 plug-ins/jpeg/jpeg-exif.c
+plug-ins/jpeg/jpeg-exif.c
+plug-ins/jpeg/jpeg-load.c
 plug-ins/jpeg/jpeg-load.c
 plug-ins/jpeg/jpeg-save.c
+plug-ins/jpeg/jpeg-save.c
+plug-ins/jpeg/jpeg.c
 plug-ins/jpeg/jpeg.c
 plug-ins/maze/algorithms.c
+plug-ins/maze/algorithms.c
+plug-ins/maze/maze.c
 plug-ins/maze/maze.c
 plug-ins/maze/maze_face.c
+plug-ins/maze/maze_face.c
+plug-ins/metadata/interface.c
 plug-ins/metadata/interface.c
 plug-ins/metadata/xmp-parse.c
+plug-ins/metadata/xmp-parse.c
+plug-ins/pagecurl/pagecurl.c
 plug-ins/pagecurl/pagecurl.c
 plug-ins/print/print-page-layout.c
+plug-ins/print/print-page-layout.c
+plug-ins/print/print.c
 plug-ins/print/print.c
+plug-ins/psd/psd-image-res-load.c
+plug-ins/psd/psd-load.c
+plug-ins/psd/psd-thumb-load.c
+plug-ins/psd/psd-util.c
+plug-ins/psd/psd.c
 plug-ins/pygimp/gimpfu.py
+plug-ins/pygimp/gimpfu.py
+plug-ins/pygimp/gimpui.py
 plug-ins/pygimp/gimpui.py
 plug-ins/pygimp/plug-ins/colorxhtml.py
+plug-ins/pygimp/plug-ins/colorxhtml.py
+plug-ins/pygimp/plug-ins/foggify.py
 plug-ins/pygimp/plug-ins/foggify.py
 plug-ins/pygimp/plug-ins/gimpcons.py
+plug-ins/pygimp/plug-ins/gimpcons.py
+plug-ins/pygimp/plug-ins/palette-offset.py
 plug-ins/pygimp/plug-ins/palette-offset.py
 plug-ins/pygimp/plug-ins/palette-sort.py
+plug-ins/pygimp/plug-ins/palette-sort.py
+plug-ins/pygimp/plug-ins/palette-to-gradient.py
 plug-ins/pygimp/plug-ins/palette-to-gradient.py
 plug-ins/pygimp/plug-ins/py-slice.py
+plug-ins/pygimp/plug-ins/py-slice.py
+plug-ins/pygimp/plug-ins/shadow_bevel.py
 plug-ins/pygimp/plug-ins/shadow_bevel.py
 plug-ins/rcm/rcm.c
+plug-ins/rcm/rcm.c
+plug-ins/rcm/rcm_dialog.c
 plug-ins/rcm/rcm_dialog.c
 plug-ins/rcm/rcm_stock.c
+plug-ins/rcm/rcm_stock.c
+plug-ins/script-fu/script-fu-console.c
 plug-ins/script-fu/script-fu-console.c
 plug-ins/script-fu/script-fu-interface.c
+plug-ins/script-fu/script-fu-interface.c
+plug-ins/script-fu/script-fu-scripts.c
 plug-ins/script-fu/script-fu-scripts.c
 plug-ins/script-fu/script-fu-server.c
+plug-ins/script-fu/script-fu-server.c
+plug-ins/script-fu/script-fu.c
 plug-ins/script-fu/script-fu.c
 plug-ins/sel2path/pxl-outline.c
+plug-ins/sel2path/pxl-outline.c
+plug-ins/sel2path/sel2path.c
 plug-ins/sel2path/sel2path.c
 plug-ins/sgi/sgi.c
+plug-ins/sgi/sgi.c
+plug-ins/twain/twain.c
 plug-ins/twain/twain.c
 plug-ins/uri/uri-backend-gnomevfs.c
+plug-ins/uri/uri-backend-gnomevfs.c
+plug-ins/uri/uri-backend-libcurl.c
 plug-ins/uri/uri-backend-libcurl.c
 plug-ins/uri/uri-backend-wget.c
+plug-ins/uri/uri-backend-wget.c
+plug-ins/uri/uri.c
 plug-ins/uri/uri.c
 plug-ins/winicon/icodialog.c
+plug-ins/winicon/icodialog.c
+plug-ins/winicon/icoload.c
 plug-ins/winicon/icoload.c
 plug-ins/winicon/icosave.c
+plug-ins/winicon/icosave.c
+plug-ins/winicon/main.c
 plug-ins/winicon/main.c
 plug-ins/winsnap/winsnap.c
+plug-ins/winsnap/winsnap.c
+plug-ins/xjt/xjt.c
 plug-ins/xjt/xjt.c

Modified: branches/weskaggs/themes/Default/images/Makefile.am
==============================================================================
--- branches/weskaggs/themes/Default/images/Makefile.am	(original)
+++ branches/weskaggs/themes/Default/images/Makefile.am	Fri Jan 25 18:43:27 2008
@@ -211,7 +211,8 @@
 	stock-video-24.png			\
 	stock-undo-history-24.png		\
 	stock-warning-24.png			\
-	stock-web-24.png
+	stock-web-24.png			\
+	stock-wilber-22.png
 
 STOCK_DND_IMAGES = \
 	stock-channel-32.png			\

Modified: branches/weskaggs/themes/Default/images/stock-wilber-22.png
==============================================================================
Binary files. No diff available.

Modified: branches/weskaggs/tools/pdbgen/pdb/color.pdb
==============================================================================
--- branches/weskaggs/tools/pdbgen/pdb/color.pdb	(original)
+++ branches/weskaggs/tools/pdbgen/pdb/color.pdb	Fri Jan 25 18:43:27 2008
@@ -47,7 +47,7 @@
 
   if (success)
     {
-  if (gimp->config->use_gegl)
+  if (gimp_use_gegl (gimp))
     {
       GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                      "operation",  "brightness-contrast",
@@ -245,7 +245,7 @@
 
   if (success)
     {
-  if (gimp->config->use_gegl)
+  if (gimp_use_gegl (gimp))
     {
       GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                      "operation", "gimp-posterize",
@@ -727,7 +727,7 @@
 
   if (success)
     {
-  if (gimp->config->use_gegl)
+  if (gimp_use_gegl (gimp))
     {
       GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                      "operation", "gimp-colorize",
@@ -966,7 +966,7 @@
 
   if (success)
     {
-  if (gimp->config->use_gegl)
+  if (gimp_use_gegl (gimp))
     {
       GeglNode *node = g_object_new (GEGL_TYPE_NODE,
                                      "operation", "gimp-threshold",
@@ -1021,7 +1021,6 @@
               "base/lut-funcs.h"
               "base/pixel-region.h"
               "base/pixel-processor.h"
-              "config/gimpcoreconfig.h"
               "core/gimp.h"
               "core/gimpdrawable.h"
               "core/gimpdrawable-operation.h"



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