? app/core/ai2gimp-palette.c
? app/core/gimpdrawable-transform-region.c
? app/core/gimpdrawable-transform-region.h
? app/dialogs/change-display-dialog.c
? app/dialogs/change-display-dialog.h
Index: app/actions/edit-actions.c
===================================================================
RCS file: /cvs/gnome/gimp/app/actions/edit-actions.c,v
retrieving revision 1.33
diff -u -p -r1.33 edit-actions.c
--- app/actions/edit-actions.c	7 Sep 2006 07:59:35 -0000	1.33
+++ app/actions/edit-actions.c	20 Oct 2006 14:13:33 -0000
@@ -96,6 +96,11 @@ static const GimpActionEntry edit_action
     G_CALLBACK (edit_undo_clear_cmd_callback),
     GIMP_HELP_EDIT_UNDO_CLEAR },
 
+  { "edit-fade", GTK_STOCK_UNDO,
+    N_("_Fade..."), "", NULL,
+    G_CALLBACK (edit_fade_cmd_callback),
+    GIMP_HELP_EDIT_FADE },
+
   { "edit-cut", GTK_STOCK_CUT,
     N_("Cu_t"), "<control>X",
     N_("Move the selected pixels to the clipboard"),
@@ -240,7 +245,9 @@ edit_actions_update (GimpActionGroup *gr
   GimpDrawable *drawable     = NULL;
   gchar        *undo_name    = NULL;
   gchar        *redo_name    = NULL;
+  gchar        *fade_name    = NULL;
   gboolean      undo_enabled = FALSE;
+  gboolean      fade_enabled = FALSE;
 
   if (image)
     {
@@ -265,6 +272,14 @@ edit_actions_update (GimpActionGroup *gr
             redo_name =
               g_strdup_printf (_("_Redo %s"),
                                gimp_object_get_name (GIMP_OBJECT (redo)));
+
+          if (undo)
+            fade_enabled = (undo->undo_type == GIMP_UNDO_DRAWABLE);
+
+          if (fade_enabled)
+            fade_name =
+              g_strdup_printf (_("_Fade %s..."),
+                               gimp_object_get_name (GIMP_OBJECT (undo)));
         }
     }
 
@@ -276,12 +291,14 @@ edit_actions_update (GimpActionGroup *gr
 
   SET_LABEL ("edit-undo", undo_name ? undo_name : _("_Undo"));
   SET_LABEL ("edit-redo", redo_name ? redo_name : _("_Redo"));
+  SET_LABEL ("edit-fade", fade_name ? fade_name : _("_Fade..."));
 
   SET_SENSITIVE ("edit-undo",        undo_enabled && undo_name);
   SET_SENSITIVE ("edit-redo",        undo_enabled && redo_name);
   SET_SENSITIVE ("edit-strong-undo", undo_enabled && undo_name);
   SET_SENSITIVE ("edit-strong-redo", undo_enabled && redo_name);
   SET_SENSITIVE ("edit-undo-clear",  undo_enabled && (undo_name || redo_name));
+  SET_SENSITIVE ("edit-fade",        fade_enabled && fade_name);
 
   g_free (undo_name);
   g_free (redo_name);
Index: app/actions/edit-commands.c
===================================================================
RCS file: /cvs/gnome/gimp/app/actions/edit-commands.c,v
retrieving revision 1.74
diff -u -p -r1.74 edit-commands.c
--- app/actions/edit-commands.c	9 Oct 2006 08:16:33 -0000	1.74
+++ app/actions/edit-commands.c	20 Oct 2006 14:13:33 -0000
@@ -48,6 +48,7 @@
 #include "widgets/gimpmessagedialog.h"
 
 #include "dialogs/dialogs.h"
+#include "dialogs/fade-dialog.h"
 
 #include "actions.h"
 #include "edit-commands.h"
@@ -288,6 +289,27 @@ edit_named_cut_cmd_callback (GtkAction *
                                   G_OBJECT (image), "disconnect",
                                   cut_named_buffer_callback, image);
   gtk_widget_show (dialog);
+}
+
+void
+edit_fade_cmd_callback (GtkAction *action,
+                        gpointer   data)
+{
+  GimpImage *image;
+  GtkWidget *widget;
+  GtkWidget *dialog;
+  return_if_no_image (image, data);
+  return_if_no_widget (widget, data);
+
+  dialog = fade_dialog_new (image, widget);
+
+  if (dialog)
+    {
+      g_signal_connect_object (image, "disconnect",
+                               G_CALLBACK (gtk_widget_destroy),
+                               dialog, G_CONNECT_SWAPPED);
+      gtk_widget_show (dialog);
+    }
 }
 
 void
Index: app/actions/edit-commands.h
===================================================================
RCS file: /cvs/gnome/gimp/app/actions/edit-commands.h,v
retrieving revision 1.10
diff -u -p -r1.10 edit-commands.h
--- app/actions/edit-commands.h	13 Jun 2006 02:03:43 -0000	1.10
+++ app/actions/edit-commands.h	20 Oct 2006 14:13:33 -0000
@@ -30,6 +30,8 @@ void   edit_strong_redo_cmd_callback    
                                              gpointer   data);
 void   edit_undo_clear_cmd_callback         (GtkAction *action,
                                              gpointer   data);
+void   edit_fade_cmd_callback               (GtkAction *action,
+                                             gpointer   data);
 void   edit_cut_cmd_callback                (GtkAction *action,
                                              gpointer   data);
 void   edit_copy_cmd_callback               (GtkAction *action,
Index: app/core/gimp-edit.c
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimp-edit.c,v
retrieving revision 1.138
diff -u -p -r1.138 gimp-edit.c
--- app/core/gimp-edit.c	9 Oct 2006 18:49:05 -0000	1.138
+++ app/core/gimp-edit.c	20 Oct 2006 14:13:33 -0000
@@ -38,6 +38,7 @@
 #include "gimpbuffer.h"
 #include "gimpchannel.h"
 #include "gimpcontext.h"
+#include "gimpdrawableundo.h"
 #include "gimpimage.h"
 #include "gimpimage-undo.h"
 #include "gimplayer.h"
@@ -46,6 +47,7 @@
 #include "gimppattern.h"
 #include "gimppickable.h"
 #include "gimpselection.h"
+#include "gimpundostack.h"
 
 #include "gimp-intl.h"
 
@@ -472,6 +474,54 @@ gimp_edit_fill (GimpImage    *image,
                                   fill_type,
                                   GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE,
                                   undo_desc);
+}
+
+gboolean
+gimp_edit_fade (GimpImage   *image,
+                GimpContext *context)
+{
+  GimpUndo         *undo;
+  GimpDrawableUndo *drawable_undo;
+  GimpDrawable     *drawable;
+  TileManager      *src2_tiles;
+  PixelRegion       src2PR;
+
+  g_return_val_if_fail (GIMP_IS_IMAGE (image), FALSE);
+  g_return_val_if_fail (GIMP_IS_CONTEXT (context), FALSE);
+
+  undo = gimp_undo_stack_peek (image->undo_stack);
+
+  if (! GIMP_IS_DRAWABLE_UNDO (undo))
+    return FALSE;
+
+  drawable_undo = GIMP_DRAWABLE_UNDO (undo);
+
+  if (! drawable_undo->src2_tiles)
+    return FALSE;
+
+  drawable = GIMP_DRAWABLE (GIMP_ITEM_UNDO (undo)->item);
+
+  g_object_ref (drawable_undo);
+  src2_tiles = tile_manager_ref (drawable_undo->src2_tiles);
+
+  gimp_image_undo (image);
+
+  pixel_region_init (&src2PR, src2_tiles,
+                     0, 0, drawable_undo->width, drawable_undo->height,
+                     FALSE);
+
+  gimp_drawable_apply_region (drawable, &src2PR,
+                              TRUE, gimp_object_get_name (GIMP_OBJECT (undo)),
+                              gimp_context_get_opacity (context),
+                              gimp_context_get_paint_mode (context),
+                              NULL,
+                              drawable_undo->x,
+                              drawable_undo->y);
+
+  tile_manager_unref (src2_tiles);
+  g_object_unref (drawable_undo);
+
+  return TRUE;
 }
 
 
Index: app/core/gimp-edit.h
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimp-edit.h,v
retrieving revision 1.20
diff -u -p -r1.20 gimp-edit.h
--- app/core/gimp-edit.h	28 Mar 2006 17:08:20 -0000	1.20
+++ app/core/gimp-edit.h	20 Oct 2006 14:13:33 -0000
@@ -60,5 +60,8 @@ gboolean           gimp_edit_fill       
                                                  GimpContext  *context,
                                                  GimpFillType  fill_type);
 
+gboolean           gimp_edit_fade               (GimpImage    *image,
+                                                 GimpContext  *context);
+
 
 #endif  /*  __GIMP_EDIT_H__  */
Index: app/core/gimpdrawable-combine.c
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimpdrawable-combine.c,v
retrieving revision 1.6
diff -u -p -r1.6 gimpdrawable-combine.c
--- app/core/gimpdrawable-combine.c	12 Apr 2006 12:49:16 -0000	1.6
+++ app/core/gimpdrawable-combine.c	20 Oct 2006 14:13:33 -0000
@@ -23,12 +23,15 @@
 #include "core-types.h"
 
 #include "base/pixel-region.h"
+#include "base/tile-manager.h"
 
 #include "paint-funcs/paint-funcs.h"
 
 #include "gimpchannel.h"
 #include "gimpdrawable-combine.h"
+#include "gimpdrawableundo.h"
 #include "gimpimage.h"
+#include "gimpimage-undo.h"
 
 
 void
@@ -98,7 +101,38 @@ gimp_drawable_real_apply_region (GimpDra
 
   /*  If the calling procedure specified an undo step...  */
   if (push_undo)
-    gimp_drawable_push_undo (drawable, undo_desc, x1, y1, x2, y2, NULL, FALSE);
+    {
+      GimpUndo *undo;
+
+      gimp_drawable_push_undo (drawable, undo_desc, x1, y1, x2, y2, NULL, FALSE);
+
+      /*  We don't compress anything here, but the function does exactly
+       *  what we need
+       */
+      undo = gimp_image_undo_can_compress (image, GIMP_TYPE_DRAWABLE_UNDO,
+                                           GIMP_UNDO_DRAWABLE);
+      if (undo)
+        {
+          GimpDrawableUndo *drawable_undo = GIMP_DRAWABLE_UNDO (undo);
+          PixelRegion       tmp_srcPR;
+          PixelRegion       tmp_destPR;
+
+          drawable_undo->paint_mode = mode;
+          drawable_undo->opacity    = opacity;
+          drawable_undo->src2_tiles = tile_manager_new (x2 - x1, y2 - y1,
+                                                        src2PR->bytes);
+
+          tmp_srcPR = *src2PR;
+          pixel_region_resize (&tmp_srcPR,
+                               src2PR->x + (x1 - x), src2PR->y + (y1 - y),
+                               x2 - x1, y2 - y1);
+          pixel_region_init (&tmp_destPR, drawable_undo->src2_tiles,
+                             0, 0,
+                             x2 - x1, y2 - y1, TRUE);
+
+          copy_region (&tmp_srcPR, &tmp_destPR);
+        }
+    }
 
   /* configure the pixel regions
    *  If an alternative to using the drawable's data as src1 was provided...
Index: app/core/gimpdrawableundo.c
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimpdrawableundo.c,v
retrieving revision 1.1
diff -u -p -r1.1 gimpdrawableundo.c
--- app/core/gimpdrawableundo.c	20 Oct 2006 08:56:58 -0000	1.1
+++ app/core/gimpdrawableundo.c	20 Oct 2006 14:13:33 -0000
@@ -245,4 +245,10 @@ gimp_drawable_undo_free (GimpUndo     *u
       tile_manager_unref (drawable_undo->tiles);
       drawable_undo->tiles = NULL;
     }
+
+  if (drawable_undo->src2_tiles)
+    {
+      tile_manager_unref (drawable_undo->src2_tiles);
+      drawable_undo->src2_tiles = NULL;
+    }
 }
Index: app/core/gimpdrawableundo.h
===================================================================
RCS file: /cvs/gnome/gimp/app/core/gimpdrawableundo.h,v
retrieving revision 1.1
diff -u -p -r1.1 gimpdrawableundo.h
--- app/core/gimpdrawableundo.h	20 Oct 2006 08:56:58 -0000	1.1
+++ app/core/gimpdrawableundo.h	20 Oct 2006 14:13:33 -0000
@@ -43,6 +43,11 @@ struct _GimpDrawableUndo
   gint          y;
   gint          width;
   gint          height;
+
+  /* stuff for "Fade" */
+  TileManager          *src2_tiles;
+  GimpLayerModeEffects  paint_mode;
+  gdouble               opacity;
 };
 
 struct _GimpDrawableUndoClass
Index: app/dialogs/Makefile.am
===================================================================
RCS file: /cvs/gnome/gimp/app/dialogs/Makefile.am,v
retrieving revision 1.22
diff -u -p -r1.22 Makefile.am
--- app/dialogs/Makefile.am	31 Mar 2006 13:36:33 -0000	1.22
+++ app/dialogs/Makefile.am	20 Oct 2006 14:13:33 -0000
@@ -30,6 +30,8 @@ libappdialogs_a_sources = \
 	convert-dialog.h		\
 	desaturate-dialog.c		\
 	desaturate-dialog.h		\
+	fade-dialog.c			\
+	fade-dialog.h			\
 	file-open-dialog.c		\
 	file-open-dialog.h		\
 	file-open-location-dialog.c	\
