Commit 7a6a8d9d authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

Moved the undo step implementations to the core and pass around lots of

2003-02-14  Michael Natterer  <mitch@gimp.org>

	Moved the undo step implementations to the core and pass around
	lots of "const gchar *undo_desc". Fixes bug #104367.

	* app/Makefile.am
	* app/undo.[ch]: removed...

	* app/core/Makefile.am
	* app/core/gimpimage-undo-push.[ch]: ...and added here.

	* app/paint/Makefile.am
	* app/tools/Makefile.am
	* app/paint/gimppaintcore-undo.[ch]
	* app/tools/gimptransformtool-undo.[ch]: new files for the
	paint and transform undos.

	* app/core/gimppaintinfo.[ch]: added a blurb.

	* app/paint/gimpairbrush.c
	* app/paint/gimpclone.c
	* app/paint/gimpconvolve.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimperaser.c
	* app/paint/gimppaintbrush.c
	* app/paint/gimppaintcore.c
	* app/paint/gimppencil.c
	* app/paint/gimpsmudge.c
	* app/paint/paint-types.h
	* app/paint/paint.c: pass the blurb when registering the core.

	* app/core/gimpdrawable.[ch]
	* app/core/gimpimage.[ch]
	* app/core/gimpimage-mask-select.[ch]
	* app/core/gimpimage-mask.[ch]
	* app/core/gimpimagemap.[ch]
	* app/core/gimplayer-floating-sel.[ch]: added "undo_desc" parameters
	to all undo pushing helper functions.

	* app/undo_history.c
	* app/core/gimpchannel.c
	* app/core/gimpdrawable-blend.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpdrawable-desaturate.c
	* app/core/gimpdrawable-equalize.c
	* app/core/gimpdrawable-invert.c
	* app/core/gimpdrawable-offset.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpedit.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-guides.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-qmask.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-undo.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimplayermask.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/file/file-save.c
	* app/gui/channels-commands.c
	* app/gui/file-commands.c
	* app/gui/file-open-dialog.c
	* app/gui/image-commands.c
	* app/gui/layers-commands.c
	* app/gui/paths-dialog.c
	* app/gui/select-commands.c
	* app/gui/vectors-commands.c
	* app/text/gimptext-compat.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpfuzzyselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectselecttool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c
	* app/widgets/gimpchannellistview.c
	* app/widgets/gimpdrawablelistview.c
	* app/widgets/gimpselectioneditor.c
	* tools/pdbgen/pdb/color.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/guides.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/selection_tools.pdb: changed accordingly: pass
	"undo_desc" strings, changed includes or simply removed inclusion
	of "undo.h". Some random cleanups.

	* tools/pdbgen/pdb/guides.pdb: cleaned up a lot. Fixed
	gimp_image_find_next_guide() to not return guides with
	position < 0 (and made it shorter and readable).

	* app/pdb/color_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/guides_cmds.c
	* app/pdb/layer_cmds.c
	* app/pdb/selection_cmds.c
	* app/pdb/selection_tools_cmds.c: regenerated.
parent ebd0d76c
2003-02-14 Michael Natterer <mitch@gimp.org>
Moved the undo step implementations to the core and pass around
lots of "const gchar *undo_desc". Fixes bug #104367.
* app/Makefile.am
* app/undo.[ch]: removed...
* app/core/Makefile.am
* app/core/gimpimage-undo-push.[ch]: ...and added here.
* app/paint/Makefile.am
* app/tools/Makefile.am
* app/paint/gimppaintcore-undo.[ch]
* app/tools/gimptransformtool-undo.[ch]: new files for the
paint and transform undos.
* app/core/gimppaintinfo.[ch]: added a blurb.
* app/paint/gimpairbrush.c
* app/paint/gimpclone.c
* app/paint/gimpconvolve.c
* app/paint/gimpdodgeburn.c
* app/paint/gimperaser.c
* app/paint/gimppaintbrush.c
* app/paint/gimppaintcore.c
* app/paint/gimppencil.c
* app/paint/gimpsmudge.c
* app/paint/paint-types.h
* app/paint/paint.c: pass the blurb when registering the core.
* app/core/gimpdrawable.[ch]
* app/core/gimpimage.[ch]
* app/core/gimpimage-mask-select.[ch]
* app/core/gimpimage-mask.[ch]
* app/core/gimpimagemap.[ch]
* app/core/gimplayer-floating-sel.[ch]: added "undo_desc" parameters
to all undo pushing helper functions.
* app/undo_history.c
* app/core/gimpchannel.c
* app/core/gimpdrawable-blend.c
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpdrawable-desaturate.c
* app/core/gimpdrawable-equalize.c
* app/core/gimpdrawable-invert.c
* app/core/gimpdrawable-offset.c
* app/core/gimpdrawable-transform.c
* app/core/gimpedit.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-guides.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-qmask.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-undo.c
* app/core/gimpitem.c
* app/core/gimplayer.c
* app/core/gimplayermask.c
* app/display/gimpdisplayshell-dnd.c
* app/file/file-open.c
* app/file/file-save.c
* app/gui/channels-commands.c
* app/gui/file-commands.c
* app/gui/file-open-dialog.c
* app/gui/image-commands.c
* app/gui/layers-commands.c
* app/gui/paths-dialog.c
* app/gui/select-commands.c
* app/gui/vectors-commands.c
* app/text/gimptext-compat.c
* app/tools/gimpbezierselecttool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimpinktool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimprectselecttool.c
* app/tools/gimptexttool.c
* app/tools/gimptransformtool.c
* app/widgets/gimpchannellistview.c
* app/widgets/gimpdrawablelistview.c
* app/widgets/gimpselectioneditor.c
* tools/pdbgen/pdb/color.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/guides.pdb
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/selection_tools.pdb: changed accordingly: pass
"undo_desc" strings, changed includes or simply removed inclusion
of "undo.h". Some random cleanups.
* tools/pdbgen/pdb/guides.pdb: cleaned up a lot. Fixed
gimp_image_find_next_guide() to not return guides with
position < 0 (and made it shorter and readable).
* app/pdb/color_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/guides_cmds.c
* app/pdb/layer_cmds.c
* app/pdb/selection_cmds.c
* app/pdb/selection_tools_cmds.c: regenerated.
2003-02-14 Sven Neumann <sven@gimp.org> 2003-02-14 Sven Neumann <sven@gimp.org>
* app/core/gimplayermask.c (gimp_layer_mask_duplicate): return the * app/core/gimplayermask.c (gimp_layer_mask_duplicate): return the
......
...@@ -51,9 +51,7 @@ bye_sources = \ ...@@ -51,9 +51,7 @@ bye_sources = \
path.c \ path.c \
path.h \ path.h \
pathP.h \ pathP.h \
path_transform.h \ path_transform.h
undo.c \
undo.h
## ##
## stuff ## stuff
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpimage-mask.h" #include "core/gimpimage-mask.h"
#include "core/gimpimage-undo.h" #include "core/gimpimage-undo.h"
#include "core/gimpimage-undo-push.h"
#include "core/gimpimage-mask-select.h" #include "core/gimpimage-mask-select.h"
#include "widgets/gimpcolorpanel.h" #include "widgets/gimpcolorpanel.h"
...@@ -43,8 +44,6 @@ ...@@ -43,8 +44,6 @@
#include "channels-commands.h" #include "channels-commands.h"
#include "undo.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
...@@ -150,6 +149,7 @@ channels_channel_to_sel (GtkWidget *widget, ...@@ -150,6 +149,7 @@ channels_channel_to_sel (GtkWidget *widget,
return_if_no_channel (gimage, active_channel, data); return_if_no_channel (gimage, active_channel, data);
gimp_image_mask_select_channel (gimage, gimp_image_mask_select_channel (gimage,
_("Channel to Selection"),
active_channel, active_channel,
0, 0, 0, 0,
op, op,
...@@ -425,7 +425,9 @@ edit_channel_query_ok_callback (GtkWidget *widget, ...@@ -425,7 +425,9 @@ edit_channel_query_ok_callback (GtkWidget *widget,
if (strcmp (new_name, gimp_object_get_name (GIMP_OBJECT (channel)))) if (strcmp (new_name, gimp_object_get_name (GIMP_OBJECT (channel))))
{ {
undo_push_item_rename (options->gimage, GIMP_ITEM (channel)); gimp_image_undo_push_item_rename (options->gimage,
_("Rename Channel"),
GIMP_ITEM (channel));
gimp_object_set_name (GIMP_OBJECT (channel), new_name); gimp_object_set_name (GIMP_OBJECT (channel), new_name);
} }
......
...@@ -47,8 +47,6 @@ ...@@ -47,8 +47,6 @@
#include "file-save-dialog.h" #include "file-save-dialog.h"
#include "menus.h" #include "menus.h"
#include "undo.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
......
...@@ -45,8 +45,6 @@ ...@@ -45,8 +45,6 @@
#include "image-commands.h" #include "image-commands.h"
#include "resize-dialog.h" #include "resize-dialog.h"
#include "undo.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "core/gimpimage-mask.h" #include "core/gimpimage-mask.h"
#include "core/gimpimage-merge.h" #include "core/gimpimage-merge.h"
#include "core/gimpimage-undo.h" #include "core/gimpimage-undo.h"
#include "core/gimpimage-undo-push.h"
#include "core/gimplayer.h" #include "core/gimplayer.h"
#include "core/gimplayer-floating-sel.h" #include "core/gimplayer-floating-sel.h"
#include "core/gimplayermask.h" #include "core/gimplayermask.h"
...@@ -50,8 +51,6 @@ ...@@ -50,8 +51,6 @@
#include "layers-commands.h" #include "layers-commands.h"
#include "resize-dialog.h" #include "resize-dialog.h"
#include "undo.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
...@@ -768,7 +767,9 @@ edit_layer_query_ok_callback (GtkWidget *widget, ...@@ -768,7 +767,9 @@ edit_layer_query_ok_callback (GtkWidget *widget,
floating_sel_to_layer (layer); floating_sel_to_layer (layer);
} }
undo_push_item_rename (options->gimage, GIMP_ITEM (layer)); gimp_image_undo_push_item_rename (options->gimage,
_("Rename Layer"),
GIMP_ITEM (layer));
gimp_object_set_name (GIMP_OBJECT (layer), new_name); gimp_object_set_name (GIMP_OBJECT (layer), new_name);
......
...@@ -116,7 +116,7 @@ select_none_cmd_callback (GtkWidget *widget, ...@@ -116,7 +116,7 @@ select_none_cmd_callback (GtkWidget *widget,
GimpImage *gimage; GimpImage *gimage;
return_if_no_image (gimage, data); return_if_no_image (gimage, data);
gimp_image_mask_clear (gimage); gimp_image_mask_clear (gimage, NULL);
gimp_image_flush (gimage); gimp_image_flush (gimage);
} }
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "core/gimpimage-mask.h" #include "core/gimpimage-mask.h"
#include "core/gimpimage-mask-select.h" #include "core/gimpimage-mask-select.h"
#include "core/gimpimage-undo-push.h"
#include "core/gimplist.h" #include "core/gimplist.h"
#include "core/gimppaintinfo.h" #include "core/gimppaintinfo.h"
#include "core/gimptoolinfo.h" #include "core/gimptoolinfo.h"
...@@ -52,8 +53,6 @@ ...@@ -52,8 +53,6 @@
#include "vectors-commands.h" #include "vectors-commands.h"
#include "undo.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
...@@ -533,7 +532,9 @@ edit_vectors_query_ok_callback (GtkWidget *widget, ...@@ -533,7 +532,9 @@ edit_vectors_query_ok_callback (GtkWidget *widget,
if (strcmp (new_name, gimp_object_get_name (GIMP_OBJECT (vectors)))) if (strcmp (new_name, gimp_object_get_name (GIMP_OBJECT (vectors))))
{ {
undo_push_item_rename (options->gimage, GIMP_ITEM (vectors)); gimp_image_undo_push_item_rename (options->gimage,
_("Rename Path"),
GIMP_ITEM (vectors));
gimp_object_set_name (GIMP_OBJECT (vectors), new_name); gimp_object_set_name (GIMP_OBJECT (vectors), new_name);
} }
......
...@@ -115,6 +115,8 @@ libappcore_a_sources = \ ...@@ -115,6 +115,8 @@ libappcore_a_sources = \
gimpimage-scale.h \ gimpimage-scale.h \
gimpimage-undo.c \ gimpimage-undo.c \
gimpimage-undo.h \ gimpimage-undo.h \
gimpimage-undo-push.c \
gimpimage-undo-push.h \
gimpimagefile.c \ gimpimagefile.c \
gimpimagefile.h \ gimpimagefile.h \
gimpimagemap.c \ gimpimagemap.c \
......
...@@ -42,8 +42,6 @@ ...@@ -42,8 +42,6 @@
#include "gimplayer-floating-sel.h" #include "gimplayer-floating-sel.h"
#include "gimplist.h" #include "gimplist.h"
#include "undo.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
...@@ -222,7 +220,7 @@ gimp_edit_paste (GimpImage *gimage, ...@@ -222,7 +220,7 @@ gimp_edit_paste (GimpImage *gimage,
* it seems like the correct behavior. * it seems like the correct behavior.
*/ */
if (! gimp_image_mask_is_empty (gimage) && ! paste_into) if (! gimp_image_mask_is_empty (gimage) && ! paste_into)
gimp_image_mask_clear (gimage); gimp_image_mask_clear (gimage, NULL);
/* if there's a drawable, add a new floating selection */ /* if there's a drawable, add a new floating selection */
if (drawable != NULL) if (drawable != NULL)
...@@ -314,7 +312,8 @@ gimp_edit_clear (GimpImage *gimage, ...@@ -314,7 +312,8 @@ gimp_edit_clear (GimpImage *gimage,
color_region (&bufPR, col); color_region (&bufPR, col);
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE); pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE);
gimp_image_apply_image (gimage, drawable, &bufPR, TRUE, gimp_image_apply_image (gimage, drawable, &bufPR,
TRUE, _("Clear"),
GIMP_OPACITY_OPAQUE, GIMP_ERASE_MODE, GIMP_OPACITY_OPAQUE, GIMP_ERASE_MODE,
NULL, x1, y1); NULL, x1, y1);
...@@ -389,7 +388,8 @@ gimp_edit_fill (GimpImage *gimage, ...@@ -389,7 +388,8 @@ gimp_edit_fill (GimpImage *gimage,
color_region (&bufPR, col); color_region (&bufPR, col);
pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE); pixel_region_init (&bufPR, buf_tiles, 0, 0, (x2 - x1), (y2 - y1), FALSE);
gimp_image_apply_image (gimage, drawable, &bufPR, TRUE, gimp_image_apply_image (gimage, drawable, &bufPR,
TRUE, _("Fill"),
GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE, GIMP_OPACITY_OPAQUE, GIMP_NORMAL_MODE,
NULL, x1, y1); NULL, x1, y1);
......
...@@ -39,11 +39,10 @@ ...@@ -39,11 +39,10 @@
#include "gimpimage.h" #include "gimpimage.h"
#include "gimpimage-mask.h" #include "gimpimage-mask.h"
#include "gimpimage-undo.h" #include "gimpimage-undo.h"
#include "gimpimage-undo-push.h"
#include "gimplayer.h" #include "gimplayer.h"
#include "gimplayer-floating-sel.h" #include "gimplayer-floating-sel.h"
#include "undo.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
...@@ -802,9 +801,11 @@ gimp_drawable_transform_paste (GimpDrawable *drawable, ...@@ -802,9 +801,11 @@ gimp_drawable_transform_paste (GimpDrawable *drawable,
/* Push an undo */ /* Push an undo */
if (layer) if (layer)
undo_push_layer_mod (gimage, layer); gimp_image_undo_push_layer_mod (gimage, _("Transform Layer"),
layer);
else if (channel) else if (channel)
undo_push_channel_mod (gimage, channel); gimp_image_undo_push_channel_mod (gimage, _("Transform Channel"),
channel);
/* set the current layer's data */ /* set the current layer's data */
drawable->tiles = tiles; drawable->tiles = tiles;
......
...@@ -39,12 +39,11 @@ ...@@ -39,12 +39,11 @@
#include "paint-funcs/paint-funcs.h" #include "paint-funcs/paint-funcs.h"
#include "gimpimage.h" #include "gimpimage.h"
#include "gimpimage-undo-push.h"
#include "gimpchannel.h" #include "gimpchannel.h"
#include "gimplayer.h" #include "gimplayer.h"
#include "gimpparasitelist.h" #include "gimpparasitelist.h"
#include "undo.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
...@@ -59,7 +58,8 @@ static GimpItem * gimp_channel_duplicate (GimpItem *item, ...@@ -59,7 +58,8 @@ static GimpItem * gimp_channel_duplicate (GimpItem *item,
GType new_type, GType new_type,
gboolean add_alpha); gboolean add_alpha);
static void gimp_channel_push_undo (GimpChannel *mask); static void gimp_channel_push_undo (GimpChannel *mask,
const gchar *undo_desc);
static void gimp_channel_validate (TileManager *tm, static void gimp_channel_validate (TileManager *tm,
Tile *tile); Tile *tile);
...@@ -212,7 +212,8 @@ gimp_channel_duplicate (GimpItem *item, ...@@ -212,7 +212,8 @@ gimp_channel_duplicate (GimpItem *item,
} }
static void static void
gimp_channel_push_undo (GimpChannel *mask) gimp_channel_push_undo (GimpChannel *mask,
const gchar *undo_desc)
{ {
GimpImage *gimage; GimpImage *gimage;
...@@ -220,7 +221,7 @@ gimp_channel_push_undo (GimpChannel *mask) ...@@ -220,7 +221,7 @@ gimp_channel_push_undo (GimpChannel *mask)
g_return_if_fail (gimage != NULL); g_return_if_fail (gimage != NULL);
undo_push_mask (gimage, mask); gimp_image_undo_push_mask (gimage, undo_desc, mask);
mask->boundary_known = FALSE; mask->boundary_known = FALSE;
...@@ -382,7 +383,9 @@ gimp_channel_scale (GimpChannel *channel, ...@@ -382,7 +383,9 @@ gimp_channel_scale (GimpChannel *channel,
scale_region (&srcPR, &destPR, interpolation_type); scale_region (&srcPR, &destPR, interpolation_type);
/* Push the channel on the undo stack */ /* Push the channel on the undo stack */
undo_push_channel_mod (gimp_item_get_image (GIMP_ITEM (channel)), channel); gimp_image_undo_push_channel_mod (gimp_item_get_image (GIMP_ITEM (channel)),
_("Scale Channel"),
channel);
/* Configure the new channel */ /* Configure the new channel */
GIMP_DRAWABLE (channel)->tiles = new_tiles; GIMP_DRAWABLE (channel)->tiles = new_tiles;
...@@ -488,7 +491,9 @@ gimp_channel_resize (GimpChannel *channel, ...@@ -488,7 +491,9 @@ gimp_channel_resize (GimpChannel *channel,
copy_region (&srcPR, &destPR); copy_region (&srcPR, &destPR);
/* Push the channel on the undo stack */ /* Push the channel on the undo stack */
undo_push_channel_mod (gimp_item_get_image (GIMP_ITEM (channel)), channel); gimp_image_undo_push_channel_mod (gimp_item_get_image (GIMP_ITEM (channel)),
_("Resize Channel"),
channel);
/* Configure the new channel */ /* Configure the new channel */
GIMP_DRAWABLE (channel)->tiles = new_tiles; GIMP_DRAWABLE (channel)->tiles = new_tiles;
...@@ -1293,7 +1298,7 @@ gimp_channel_feather (GimpChannel *mask, ...@@ -1293,7 +1298,7 @@ gimp_channel_feather (GimpChannel *mask,
g_return_if_fail (GIMP_IS_CHANNEL (mask)); g_return_if_fail (GIMP_IS_CHANNEL (mask));
if (push_undo) if (push_undo)
gimp_channel_push_undo (mask); gimp_channel_push_undo (mask, _("Feather Channel"));
pixel_region_init (&srcPR, GIMP_DRAWABLE (mask)->tiles, pixel_region_init (&srcPR, GIMP_DRAWABLE (mask)->tiles,
0, 0, 0, 0,
...@@ -1315,7 +1320,7 @@ gimp_channel_sharpen (GimpChannel *mask, ...@@ -1315,7 +1320,7 @@ gimp_channel_sharpen (GimpChannel *mask,
g_return_if_fail (GIMP_IS_CHANNEL (mask)); g_return_if_fail (GIMP_IS_CHANNEL (mask));
if (push_undo) if (push_undo)
gimp_channel_push_undo (mask); gimp_channel_push_undo (mask, _("Sharpen Channel"));
pixel_region_init (&maskPR, GIMP_DRAWABLE (mask)->tiles, pixel_region_init (&maskPR, GIMP_DRAWABLE (mask)->tiles,
0, 0, 0, 0,
...@@ -1340,7 +1345,7 @@ gimp_channel_clear (GimpChannel *mask, ...@@ -1340,7 +1345,7 @@ gimp_channel_clear (GimpChannel *mask,
g_return_if_fail (GIMP_IS_CHANNEL (mask)); g_return_if_fail (GIMP_IS_CHANNEL (mask));
if (push_undo) if (push_undo)
gimp_channel_push_undo (mask); gimp_channel_push_undo (mask, _("Clear Channel"));
if (mask->bounds_known && !mask->empty) if (mask->bounds_known && !mask->empty)
{ {
...@@ -1378,7 +1383,7 @@ gimp_channel_all (GimpChannel *mask, ...@@ -1378,7 +1383,7 @@ gimp_channel_all (GimpChannel *mask,
g_return_if_fail (GIMP_IS_CHANNEL (mask)); g_return_if_fail (GIMP_IS_CHANNEL (mask));
if (push_undo) if (push_undo)
gimp_channel_push_undo (mask); gimp_channel_push_undo (mask, _("Fill Channel"));
/* clear the mask */ /* clear the mask */
pixel_region_init (&maskPR, GIMP_DRAWABLE (mask)->tiles, pixel_region_init (&maskPR, GIMP_DRAWABLE (mask)->tiles,
...@@ -1403,7 +1408,7 @@ gimp_channel_invert (GimpChannel *mask, ...@@ -1403,7 +1408,7 @@ gimp_channel_invert (GimpChannel *mask,
g_return_if_fail (GIMP_IS_CHANNEL (mask)); g_return_if_fail (GIMP_IS_CHANNEL (mask));
if (push_undo) if (push_undo)
gimp_channel_push_undo (mask); gimp_channel_push_undo (mask, _("Invert Channel"));
if (mask->bounds_known && mask->empty) if (mask->bounds_known && mask->empty)
{ {
...@@ -1469,7 +1474,7 @@ gimp_channel_border (GimpChannel *mask, ...@@ -1469,7 +1474,7 @@ gimp_channel_border (GimpChannel *mask,
y2 += radius_y; y2 += radius_y;
if (push_undo) if (push_undo)
gimp_channel_push_undo (mask); gimp_channel_push_undo (mask, _("Border Channel"));