Commit b600fd86 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

changed FOO_UNDO enum values to GIMP_UNDO_FOO.

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

	* app/core/core-enums.[ch]: changed FOO_UNDO enum values to
	GIMP_UNDO_FOO.

	* app/undo.[ch]: removed the undo group wrappers.

	* app/undo_history.c
	* app/core/gimpdrawable-transform.c
	* app/core/gimpedit.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-mask.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/gimpimage.c
	* app/core/gimpitem.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/display/gimpdisplayshell-dnd.c
	* app/gui/channels-commands.c
	* app/gui/image-commands.c
	* app/gui/layers-commands.c
	* app/paint/gimppaintcore.c
	* app/text/gimptext-compat.c
	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/undo.pdb: changed accordingly. Pass meaningful
	undo names to gimp_image_undo_group_start().

	* app/pdb/layer_cmds.c
	* app/pdb/undo_cmds.c: regenerated.
parent 8457eb6a
2003-02-13 Michael Natterer <mitch@gimp.org>
* app/core/core-enums.[ch]: changed FOO_UNDO enum values to
GIMP_UNDO_FOO.
* app/undo.[ch]: removed the undo group wrappers.
* app/undo_history.c
* app/core/gimpdrawable-transform.c
* app/core/gimpedit.c
* app/core/gimpimage-convert.c
* app/core/gimpimage-crop.c
* app/core/gimpimage-mask.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/gimpimage.c
* app/core/gimpitem.c
* app/core/gimplayer-floating-sel.c
* app/core/gimplayer.c
* app/display/gimpdisplayshell-dnd.c
* app/gui/channels-commands.c
* app/gui/image-commands.c
* app/gui/layers-commands.c
* app/paint/gimppaintcore.c
* app/text/gimptext-compat.c
* app/tools/gimpbezierselecttool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimptexttool.c
* app/tools/gimptransformtool.c
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/undo.pdb: changed accordingly. Pass meaningful
undo names to gimp_image_undo_group_start().
* app/pdb/layer_cmds.c
* app/pdb/undo_cmds.c: regenerated.
2003-02-13 Sven Neumann <sven@gimp.org>
* app/core/core-enums.h: fixed use of proxy-resume and proxy-skip
......
......@@ -32,6 +32,7 @@
#include "core/gimpcontext.h"
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimpimage-undo.h"
#include "core/gimpimage-mask-select.h"
#include "widgets/gimpcolorpanel.h"
......@@ -285,7 +286,8 @@ channels_new_channel_query (GimpImage *gimage,
gimp_rgba_set (&color, 0.0, 0.0, 0.0, 0.5);
}
undo_push_group_start (gimage, EDIT_PASTE_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_EDIT_PASTE,
_("New Channel"));
new_channel = gimp_channel_new (gimage,
width, height,
......@@ -302,7 +304,7 @@ channels_new_channel_query (GimpImage *gimage,
gimp_image_add_channel (gimage, new_channel, -1);
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
return;
}
......
......@@ -33,6 +33,7 @@
#include "core/gimpimage-merge.h"
#include "core/gimpimage-resize.h"
#include "core/gimpimage-scale.h"
#include "core/gimpimage-undo.h"
#include "widgets/gimpviewabledialog.h"
......@@ -475,7 +476,8 @@ image_scale_implement (ImageResize *image_scale)
if (image_scale->resize->resolution_x != gimage->xresolution ||
image_scale->resize->resolution_y != gimage->yresolution)
{
undo_push_group_start (gimage, IMAGE_SCALE_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_SCALE,
_("Scale Image"));
gimp_image_set_resolution (gimage,
image_scale->resize->resolution_x,
......@@ -487,7 +489,8 @@ image_scale_implement (ImageResize *image_scale)
if (image_scale->resize->unit != gimage->unit)
{
if (! display_flush)
undo_push_group_start (gimage, IMAGE_SCALE_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_SCALE,
_("Scale Image"));
gimp_image_set_unit (gimage, image_scale->resize->unit);
......@@ -503,7 +506,8 @@ image_scale_implement (ImageResize *image_scale)
GimpProgress *progress;
if (! display_flush)
undo_push_group_start (gimage, IMAGE_SCALE_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_SCALE,
_("Scale Image"));
progress = gimp_progress_start (image_scale->gdisp,
_("Scaling..."),
......@@ -529,7 +533,7 @@ image_scale_implement (ImageResize *image_scale)
if (display_flush)
{
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
gimp_image_flush (gimage);
}
}
......@@ -33,6 +33,7 @@
#include "core/gimpimage.h"
#include "core/gimpimage-mask.h"
#include "core/gimpimage-merge.h"
#include "core/gimpimage-undo.h"
#include "core/gimplayer.h"
#include "core/gimplayer-floating-sel.h"
#include "core/gimplayermask.h"
......@@ -302,7 +303,8 @@ layers_crop_cmd_callback (GtkWidget *widget,
off_x -= x1;
off_y -= y1;
undo_push_group_start (gimage, LAYER_RESIZE_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_LAYER_RESIZE,
_("Crop Layer"));
if (gimp_layer_is_floating_sel (active_layer))
floating_sel_relax (active_layer, TRUE);
......@@ -312,7 +314,7 @@ layers_crop_cmd_callback (GtkWidget *widget,
if (gimp_layer_is_floating_sel (active_layer))
floating_sel_rigor (active_layer, TRUE);
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
gimp_image_flush (gimage);
}
......@@ -573,7 +575,8 @@ layers_new_layer_query (GimpImage *gimage,
mode = GIMP_NORMAL_MODE;
}
undo_push_group_start (gimage, EDIT_PASTE_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_EDIT_PASTE,
_("New Layer"));
new_layer = gimp_layer_new (gimage,
width,
......@@ -593,7 +596,7 @@ layers_new_layer_query (GimpImage *gimage,
gimp_image_add_layer (gimage, new_layer, -1);
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
return;
}
......@@ -754,7 +757,9 @@ edit_layer_query_ok_callback (GtkWidget *widget,
if (strcmp (new_name, gimp_object_get_name (GIMP_OBJECT (layer))))
{
undo_push_group_start (options->gimage, LAYER_PROPERTIES_UNDO_GROUP);
gimp_image_undo_group_start (options->gimage,
GIMP_UNDO_GROUP_LAYER_PROPERTIES,
_("Rename Layer"));
if (gimp_layer_is_floating_sel (layer))
{
......@@ -767,7 +772,7 @@ edit_layer_query_ok_callback (GtkWidget *widget,
gimp_object_set_name (GIMP_OBJECT (layer), new_name);
undo_push_group_end (options->gimage);
gimp_image_undo_group_end (options->gimage);
}
}
......@@ -1004,7 +1009,8 @@ scale_layer_query_ok_callback (GtkWidget *widget,
if (gimage)
{
undo_push_group_start (gimage, LAYER_SCALE_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_LAYER_SCALE,
_("Scale Layer"));
if (gimp_layer_is_floating_sel (layer))
floating_sel_relax (layer, TRUE);
......@@ -1018,7 +1024,7 @@ scale_layer_query_ok_callback (GtkWidget *widget,
if (gimp_layer_is_floating_sel (layer))
floating_sel_rigor (layer, TRUE);
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
gimp_image_flush (gimage);
}
......@@ -1093,7 +1099,8 @@ resize_layer_query_ok_callback (GtkWidget *widget,
if (gimage)
{
undo_push_group_start (gimage, LAYER_RESIZE_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_LAYER_RESIZE,
_("Resize Layer"));
if (gimp_layer_is_floating_sel (layer))
floating_sel_relax (layer, TRUE);
......@@ -1107,7 +1114,7 @@ resize_layer_query_ok_callback (GtkWidget *widget,
if (gimp_layer_is_floating_sel (layer))
floating_sel_rigor (layer, TRUE);
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
gimp_image_flush (gimage);
}
......
......@@ -383,65 +383,63 @@ gimp_undo_mode_get_type (void)
static const GEnumValue gimp_undo_type_enum_values[] =
{
{ NO_UNDO_GROUP, N_("<<invalid>>"), "no-undo-group" },
{ FIRST_UNDO_GROUP, "FIRST_UNDO_GROUP", "first-undo-group" },
{ IMAGE_SCALE_UNDO_GROUP, N_("Scale Image"), "image-scale-undo-group" },
{ IMAGE_RESIZE_UNDO_GROUP, N_("Resize Image"), "image-resize-undo-group" },
{ IMAGE_CONVERT_UNDO_GROUP, N_("Convert Image"), "image-convert-undo-group" },
{ IMAGE_CROP_UNDO_GROUP, N_("Crop Image"), "image-crop-undo-group" },
{ IMAGE_LAYERS_MERGE_UNDO_GROUP, N_("Merge Layers"), "image-layers-merge-undo-group" },
{ IMAGE_QMASK_UNDO_GROUP, N_("QuickMask"), "image-qmask-undo-group" },
{ IMAGE_GUIDE_UNDO_GROUP, N_("Guide"), "image-guide-undo-group" },
{ LAYER_PROPERTIES_UNDO_GROUP, N_("Layer Properties"), "layer-properties-undo-group" },
{ LAYER_SCALE_UNDO_GROUP, N_("Scale Layer"), "layer-scale-undo-group" },
{ LAYER_RESIZE_UNDO_GROUP, N_("Resize Layer"), "layer-resize-undo-group" },
{ LAYER_DISPLACE_UNDO_GROUP, N_("Move Layer"), "layer-displace-undo-group" },
{ LAYER_LINKED_UNDO_GROUP, N_("Linked Layer"), "layer-linked-undo-group" },
{ LAYER_APPLY_MASK_UNDO_GROUP, N_("Apply Layer Mask"), "layer-apply-mask-undo-group" },
{ FS_FLOAT_UNDO_GROUP, N_("Float Selection"), "fs-float-undo-group" },
{ FS_ANCHOR_UNDO_GROUP, N_("Anchor Floating Selection"), "fs-anchor-undo-group" },
{ EDIT_PASTE_UNDO_GROUP, N_("Paste"), "edit-paste-undo-group" },
{ EDIT_CUT_UNDO_GROUP, N_("Cut"), "edit-cut-undo-group" },
{ EDIT_COPY_UNDO_GROUP, N_("Copy"), "edit-copy-undo-group" },
{ TEXT_UNDO_GROUP, N_("Text"), "text-undo-group" },
{ TRANSFORM_UNDO_GROUP, N_("Transform"), "transform-undo-group" },
{ PAINT_UNDO_GROUP, N_("Paint"), "paint-undo-group" },
{ PARASITE_ATTACH_UNDO_GROUP, N_("Attach Parasite"), "parasite-attach-undo-group" },
{ PARASITE_REMOVE_UNDO_GROUP, N_("Remove Parasite"), "parasite-remove-undo-group" },
{ MISC_UNDO_GROUP, N_("Plug-In"), "misc-undo-group" },
{ LAST_UNDO_GROUP, "LAST_UNDO_GROUP", "last-undo-group" },
{ IMAGE_UNDO, N_("Image"), "image-undo" },
{ IMAGE_MOD_UNDO, N_("Image Mod"), "image-mod-undo" },
{ IMAGE_TYPE_UNDO, N_("Image Type"), "image-type-undo" },
{ IMAGE_SIZE_UNDO, N_("Image Size"), "image-size-undo" },
{ IMAGE_RESOLUTION_UNDO, N_("Resolution Change"), "image-resolution-undo" },
{ IMAGE_QMASK_UNDO, N_("QuickMask"), "image-qmask-undo" },
{ IMAGE_GUIDE_UNDO, N_("Guide"), "image-guide-undo" },
{ MASK_UNDO, N_("Selection Mask"), "mask-undo" },
{ ITEM_RENAME_UNDO, N_("Rename Item"), "item-rename-undo" },
{ LAYER_ADD_UNDO, N_("New Layer"), "layer-add-undo" },
{ LAYER_REMOVE_UNDO, N_("Delete Layer"), "layer-remove-undo" },
{ LAYER_MOD_UNDO, N_("Layer Mod"), "layer-mod-undo" },
{ LAYER_MASK_ADD_UNDO, N_("Add Layer Mask"), "layer-mask-add-undo" },
{ LAYER_MASK_REMOVE_UNDO, N_("Delete Layer Mask"), "layer-mask-remove-undo" },
{ LAYER_REPOSITION_UNDO, N_("Layer Reposition"), "layer-reposition-undo" },
{ LAYER_DISPLACE_UNDO, N_("Layer Move"), "layer-displace-undo" },
{ CHANNEL_ADD_UNDO, N_("New Channel"), "channel-add-undo" },
{ CHANNEL_REMOVE_UNDO, N_("Delete Channel"), "channel-remove-undo" },
{ CHANNEL_MOD_UNDO, N_("Channel Mod"), "channel-mod-undo" },
{ CHANNEL_REPOSITION_UNDO, N_("Channel Reposition"), "channel-reposition-undo" },
{ VECTORS_ADD_UNDO, N_("New Vectors"), "vectors-add-undo" },
{ VECTORS_REMOVE_UNDO, N_("Delete Vectors"), "vectors-remove-undo" },
{ VECTORS_MOD_UNDO, N_("Vectors Mod"), "vectors-mod-undo" },
{ VECTORS_REPOSITION_UNDO, N_("Vectors Reposition"), "vectors-reposition-undo" },
{ FS_TO_LAYER_UNDO, N_("FS to Layer"), "fs-to-layer-undo" },
{ FS_RIGOR_UNDO, N_("FS Rigor"), "fs-rigor-undo" },
{ FS_RELAX_UNDO, N_("FS Relax"), "fs-relax-undo" },
{ TRANSFORM_UNDO, N_("Transform"), "transform-undo" },
{ PAINT_UNDO, N_("Paint"), "paint-undo" },
{ PARASITE_ATTACH_UNDO, N_("Attach Parasite"), "parasite-attach-undo" },
{ PARASITE_REMOVE_UNDO, N_("Remove Parasite"), "parasite-remove-undo" },
{ CANT_UNDO, N_("EEK: can't undo"), "cant-undo" },
{ GIMP_UNDO_GROUP_NONE, N_("<<invalid>>"), "group-none" },
{ GIMP_UNDO_GROUP_IMAGE_SCALE, N_("Scale Image"), "group-image-scale" },
{ GIMP_UNDO_GROUP_IMAGE_RESIZE, N_("Resize Image"), "group-image-resize" },
{ GIMP_UNDO_GROUP_IMAGE_CONVERT, N_("Convert Image"), "group-image-convert" },
{ GIMP_UNDO_GROUP_IMAGE_CROP, N_("Crop Image"), "group-image-crop" },
{ GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, N_("Merge Layers"), "group-image-layers-merge" },
{ GIMP_UNDO_GROUP_IMAGE_QMASK, N_("QuickMask"), "group-image-qmask" },
{ GIMP_UNDO_GROUP_IMAGE_GUIDE, N_("Guide"), "group-image-guide" },
{ GIMP_UNDO_GROUP_LAYER_PROPERTIES, N_("Layer Properties"), "group-layer-properties" },
{ GIMP_UNDO_GROUP_LAYER_SCALE, N_("Scale Layer"), "group-layer-scale" },
{ GIMP_UNDO_GROUP_LAYER_RESIZE, N_("Resize Layer"), "group-layer-resize" },
{ GIMP_UNDO_GROUP_LAYER_DISPLACE, N_("Move Layer"), "group-layer-displace" },
{ GIMP_UNDO_GROUP_LAYER_LINKED, N_("Linked Layer"), "group-layer-linked" },
{ GIMP_UNDO_GROUP_LAYER_APPLY_MASK, N_("Apply Layer Mask"), "group-layer-apply-mask" },
{ GIMP_UNDO_GROUP_FS_FLOAT, N_("Float Selection"), "group-fs-float" },
{ GIMP_UNDO_GROUP_FS_ANCHOR, N_("Anchor Floating Selection"), "group-fs-anchor" },
{ GIMP_UNDO_GROUP_EDIT_PASTE, N_("Paste"), "group-edit-paste" },
{ GIMP_UNDO_GROUP_EDIT_CUT, N_("Cut"), "group-edit-cut" },
{ GIMP_UNDO_GROUP_EDIT_COPY, N_("Copy"), "group-edit-copy" },
{ GIMP_UNDO_GROUP_TEXT, N_("Text"), "group-text" },
{ GIMP_UNDO_GROUP_TRANSFORM, N_("Transform"), "group-transform" },
{ GIMP_UNDO_GROUP_PAINT, N_("Paint"), "group-paint" },
{ GIMP_UNDO_GROUP_PARASITE_ATTACH, N_("Attach Parasite"), "group-parasite-attach" },
{ GIMP_UNDO_GROUP_PARASITE_REMOVE, N_("Remove Parasite"), "group-parasite-remove" },
{ GIMP_UNDO_GROUP_MISC, N_("Plug-In"), "group-misc" },
{ GIMP_UNDO_IMAGE, N_("Image"), "image" },
{ GIMP_UNDO_IMAGE_MOD, N_("Image Mod"), "image-mod" },
{ GIMP_UNDO_IMAGE_TYPE, N_("Image Type"), "image-type" },
{ GIMP_UNDO_IMAGE_SIZE, N_("Image Size"), "image-size" },
{ GIMP_UNDO_IMAGE_RESOLUTION, N_("Resolution Change"), "image-resolution" },
{ GIMP_UNDO_IMAGE_QMASK, N_("QuickMask"), "image-qmask" },
{ GIMP_UNDO_IMAGE_GUIDE, N_("Guide"), "image-guide" },
{ GIMP_UNDO_MASK, N_("Selection Mask"), "mask" },
{ GIMP_UNDO_ITEM_RENAME, N_("Rename Item"), "item-rename" },
{ GIMP_UNDO_LAYER_ADD, N_("New Layer"), "layer-add" },
{ GIMP_UNDO_LAYER_REMOVE, N_("Delete Layer"), "layer-remove" },
{ GIMP_UNDO_LAYER_MOD, N_("Layer Mod"), "layer-mod" },
{ GIMP_UNDO_LAYER_MASK_ADD, N_("Add Layer Mask"), "layer-mask-add" },
{ GIMP_UNDO_LAYER_MASK_REMOVE, N_("Delete Layer Mask"), "layer-mask-remove" },
{ GIMP_UNDO_LAYER_REPOSITION, N_("Layer Reposition"), "layer-reposition" },
{ GIMP_UNDO_LAYER_DISPLACE, N_("Layer Move"), "layer-displace" },
{ GIMP_UNDO_CHANNEL_ADD, N_("New Channel"), "channel-add" },
{ GIMP_UNDO_CHANNEL_REMOVE, N_("Delete Channel"), "channel-remove" },
{ GIMP_UNDO_CHANNEL_MOD, N_("Channel Mod"), "channel-mod" },
{ GIMP_UNDO_CHANNEL_REPOSITION, N_("Channel Reposition"), "channel-reposition" },
{ GIMP_UNDO_VECTORS_ADD, N_("New Vectors"), "vectors-add" },
{ GIMP_UNDO_VECTORS_REMOVE, N_("Delete Vectors"), "vectors-remove" },
{ GIMP_UNDO_VECTORS_MOD, N_("Vectors Mod"), "vectors-mod" },
{ GIMP_UNDO_VECTORS_REPOSITION, N_("Vectors Reposition"), "vectors-reposition" },
{ GIMP_UNDO_FS_TO_LAYER, N_("FS to Layer"), "fs-to-layer" },
{ GIMP_UNDO_FS_RIGOR, N_("FS Rigor"), "fs-rigor" },
{ GIMP_UNDO_FS_RELAX, N_("FS Relax"), "fs-relax" },
{ GIMP_UNDO_TRANSFORM, N_("Transform"), "transform" },
{ GIMP_UNDO_PAINT, N_("Paint"), "paint" },
{ GIMP_UNDO_PARASITE_ATTACH, N_("Attach Parasite"), "parasite-attach" },
{ GIMP_UNDO_PARASITE_REMOVE, N_("Remove Parasite"), "parasite-remove" },
{ GIMP_UNDO_CANT, N_("EEK: can't undo"), "cant" },
{ 0, NULL, NULL }
};
......
......@@ -289,72 +289,72 @@ typedef enum /*< pdb-skip >*/
/* Type NO_UNDO_GROUP (0) is special - in the gimpimage structure it
* means there is no undo group currently being added to.
*/
NO_UNDO_GROUP = 0, /*< desc="<<invalid>>" >*/
FIRST_UNDO_GROUP = NO_UNDO_GROUP,
IMAGE_SCALE_UNDO_GROUP, /*< desc="Scale Image" >*/
IMAGE_RESIZE_UNDO_GROUP, /*< desc="Resize Image" >*/
IMAGE_CONVERT_UNDO_GROUP, /*< desc="Convert Image" >*/
IMAGE_CROP_UNDO_GROUP, /*< desc="Crop Image" >*/
IMAGE_LAYERS_MERGE_UNDO_GROUP, /*< desc="Merge Layers" >*/
IMAGE_QMASK_UNDO_GROUP, /*< desc="QuickMask" >*/
IMAGE_GUIDE_UNDO_GROUP, /*< desc="Guide" >*/
LAYER_PROPERTIES_UNDO_GROUP, /*< desc="Layer Properties" >*/
LAYER_SCALE_UNDO_GROUP, /*< desc="Scale Layer" >*/
LAYER_RESIZE_UNDO_GROUP, /*< desc="Resize Layer" >*/
LAYER_DISPLACE_UNDO_GROUP, /*< desc="Move Layer" >*/
LAYER_LINKED_UNDO_GROUP, /*< desc="Linked Layer" >*/
LAYER_APPLY_MASK_UNDO_GROUP, /*< desc="Apply Layer Mask" >*/
FS_FLOAT_UNDO_GROUP, /*< desc="Float Selection" >*/
FS_ANCHOR_UNDO_GROUP, /*< desc="Anchor Floating Selection" >*/
EDIT_PASTE_UNDO_GROUP, /*< desc="Paste" >*/
EDIT_CUT_UNDO_GROUP, /*< desc="Cut" >*/
EDIT_COPY_UNDO_GROUP, /*< desc="Copy" >*/
TEXT_UNDO_GROUP, /*< desc="Text" >*/
TRANSFORM_UNDO_GROUP, /*< desc="Transform" >*/
PAINT_UNDO_GROUP, /*< desc="Paint" >*/
PARASITE_ATTACH_UNDO_GROUP, /*< desc="Attach Parasite" >*/
PARASITE_REMOVE_UNDO_GROUP, /*< desc="Remove Parasite" >*/
MISC_UNDO_GROUP, /*< desc="Plug-In" >*/
LAST_UNDO_GROUP = MISC_UNDO_GROUP,
GIMP_UNDO_GROUP_NONE = 0, /*< desc="<<invalid>>" >*/
GIMP_UNDO_GROUP_FIRST = GIMP_UNDO_GROUP_NONE, /*< skip >*/
GIMP_UNDO_GROUP_IMAGE_SCALE, /*< desc="Scale Image" >*/
GIMP_UNDO_GROUP_IMAGE_RESIZE, /*< desc="Resize Image" >*/
GIMP_UNDO_GROUP_IMAGE_CONVERT, /*< desc="Convert Image" >*/
GIMP_UNDO_GROUP_IMAGE_CROP, /*< desc="Crop Image" >*/
GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE, /*< desc="Merge Layers" >*/
GIMP_UNDO_GROUP_IMAGE_QMASK, /*< desc="QuickMask" >*/
GIMP_UNDO_GROUP_IMAGE_GUIDE, /*< desc="Guide" >*/
GIMP_UNDO_GROUP_LAYER_PROPERTIES, /*< desc="Layer Properties" >*/
GIMP_UNDO_GROUP_LAYER_SCALE, /*< desc="Scale Layer" >*/
GIMP_UNDO_GROUP_LAYER_RESIZE, /*< desc="Resize Layer" >*/
GIMP_UNDO_GROUP_LAYER_DISPLACE, /*< desc="Move Layer" >*/
GIMP_UNDO_GROUP_LAYER_LINKED, /*< desc="Linked Layer" >*/
GIMP_UNDO_GROUP_LAYER_APPLY_MASK, /*< desc="Apply Layer Mask" >*/
GIMP_UNDO_GROUP_FS_FLOAT, /*< desc="Float Selection" >*/
GIMP_UNDO_GROUP_FS_ANCHOR, /*< desc="Anchor Floating Selection" >*/
GIMP_UNDO_GROUP_EDIT_PASTE, /*< desc="Paste" >*/
GIMP_UNDO_GROUP_EDIT_CUT, /*< desc="Cut" >*/
GIMP_UNDO_GROUP_EDIT_COPY, /*< desc="Copy" >*/
GIMP_UNDO_GROUP_TEXT, /*< desc="Text" >*/
GIMP_UNDO_GROUP_TRANSFORM, /*< desc="Transform" >*/
GIMP_UNDO_GROUP_PAINT, /*< desc="Paint" >*/
GIMP_UNDO_GROUP_PARASITE_ATTACH, /*< desc="Attach Parasite" >*/
GIMP_UNDO_GROUP_PARASITE_REMOVE, /*< desc="Remove Parasite" >*/
GIMP_UNDO_GROUP_MISC, /*< desc="Plug-In" >*/
GIMP_UNDO_GROUP_LAST = GIMP_UNDO_GROUP_MISC, /*< skip >*/
/* Undo types which actually do something */
IMAGE_UNDO, /*< desc="Image" >*/
IMAGE_MOD_UNDO, /*< desc="Image Mod" >*/
IMAGE_TYPE_UNDO, /*< desc="Image Type" >*/
IMAGE_SIZE_UNDO, /*< desc="Image Size" >*/
IMAGE_RESOLUTION_UNDO, /*< desc="Resolution Change" >*/
IMAGE_QMASK_UNDO, /*< desc="QuickMask" >*/
IMAGE_GUIDE_UNDO, /*< desc="Guide" >*/
MASK_UNDO, /*< desc="Selection Mask" >*/
ITEM_RENAME_UNDO, /*< desc="Rename Item" >*/
LAYER_ADD_UNDO, /*< desc="New Layer" >*/
LAYER_REMOVE_UNDO, /*< desc="Delete Layer" >*/
LAYER_MOD_UNDO, /*< desc="Layer Mod" >*/
LAYER_MASK_ADD_UNDO, /*< desc="Add Layer Mask" >*/
LAYER_MASK_REMOVE_UNDO, /*< desc="Delete Layer Mask" >*/
LAYER_REPOSITION_UNDO, /*< desc="Layer Reposition" >*/
LAYER_DISPLACE_UNDO, /*< desc="Layer Move" >*/
CHANNEL_ADD_UNDO, /*< desc="New Channel" >*/
CHANNEL_REMOVE_UNDO, /*< desc="Delete Channel" >*/
CHANNEL_MOD_UNDO, /*< desc="Channel Mod" >*/
CHANNEL_REPOSITION_UNDO, /*< desc="Channel Reposition" >*/
VECTORS_ADD_UNDO, /*< desc="New Vectors" >*/
VECTORS_REMOVE_UNDO, /*< desc="Delete Vectors" >*/
VECTORS_MOD_UNDO, /*< desc="Vectors Mod" >*/
VECTORS_REPOSITION_UNDO, /*< desc="Vectors Reposition" >*/
FS_TO_LAYER_UNDO, /*< desc="FS to Layer" >*/
FS_RIGOR_UNDO, /*< desc="FS Rigor" >*/
FS_RELAX_UNDO, /*< desc="FS Relax" >*/
TRANSFORM_UNDO, /*< desc="Transform" >*/
PAINT_UNDO, /*< desc="Paint" >*/
PARASITE_ATTACH_UNDO, /*< desc="Attach Parasite" >*/
PARASITE_REMOVE_UNDO, /*< desc="Remove Parasite" >*/
CANT_UNDO, /*< desc="EEK: can't undo" >*/
GIMP_UNDO_IMAGE, /*< desc="Image" >*/
GIMP_UNDO_IMAGE_MOD, /*< desc="Image Mod" >*/
GIMP_UNDO_IMAGE_TYPE, /*< desc="Image Type" >*/
GIMP_UNDO_IMAGE_SIZE, /*< desc="Image Size" >*/
GIMP_UNDO_IMAGE_RESOLUTION, /*< desc="Resolution Change" >*/
GIMP_UNDO_IMAGE_QMASK, /*< desc="QuickMask" >*/
GIMP_UNDO_IMAGE_GUIDE, /*< desc="Guide" >*/
GIMP_UNDO_MASK, /*< desc="Selection Mask" >*/
GIMP_UNDO_ITEM_RENAME, /*< desc="Rename Item" >*/
GIMP_UNDO_LAYER_ADD, /*< desc="New Layer" >*/
GIMP_UNDO_LAYER_REMOVE, /*< desc="Delete Layer" >*/
GIMP_UNDO_LAYER_MOD, /*< desc="Layer Mod" >*/
GIMP_UNDO_LAYER_MASK_ADD, /*< desc="Add Layer Mask" >*/
GIMP_UNDO_LAYER_MASK_REMOVE, /*< desc="Delete Layer Mask" >*/
GIMP_UNDO_LAYER_REPOSITION, /*< desc="Layer Reposition" >*/
GIMP_UNDO_LAYER_DISPLACE, /*< desc="Layer Move" >*/
GIMP_UNDO_CHANNEL_ADD, /*< desc="New Channel" >*/
GIMP_UNDO_CHANNEL_REMOVE, /*< desc="Delete Channel" >*/
GIMP_UNDO_CHANNEL_MOD, /*< desc="Channel Mod" >*/
GIMP_UNDO_CHANNEL_REPOSITION, /*< desc="Channel Reposition" >*/
GIMP_UNDO_VECTORS_ADD, /*< desc="New Vectors" >*/
GIMP_UNDO_VECTORS_REMOVE, /*< desc="Delete Vectors" >*/
GIMP_UNDO_VECTORS_MOD, /*< desc="Vectors Mod" >*/
GIMP_UNDO_VECTORS_REPOSITION, /*< desc="Vectors Reposition" >*/
GIMP_UNDO_FS_TO_LAYER, /*< desc="FS to Layer" >*/
GIMP_UNDO_FS_RIGOR, /*< desc="FS Rigor" >*/
GIMP_UNDO_FS_RELAX, /*< desc="FS Relax" >*/
GIMP_UNDO_TRANSFORM, /*< desc="Transform" >*/
GIMP_UNDO_PAINT, /*< desc="Paint" >*/
GIMP_UNDO_PARASITE_ATTACH, /*< desc="Attach Parasite" >*/
GIMP_UNDO_PARASITE_REMOVE, /*< desc="Remove Parasite" >*/
GIMP_UNDO_CANT /*< desc="EEK: can't undo" >*/
} GimpUndoType;
......
......@@ -37,6 +37,7 @@
#include "gimpedit.h"
#include "gimpimage.h"
#include "gimpimage-mask.h"
#include "gimpimage-undo.h"
#include "gimplayer.h"
#include "gimplayer-floating-sel.h"
#include "gimplist.h"
......@@ -58,7 +59,8 @@ gimp_edit_cut (GimpImage *gimage,
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
/* Start a group undo */
undo_push_group_start (gimage, EDIT_CUT_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_EDIT_CUT,
_("Cut"));
/* See if the gimage mask is empty */
empty = gimp_image_mask_is_empty (gimage);
......@@ -86,7 +88,7 @@ gimp_edit_cut (GimpImage *gimage,
cropped_cut = NULL;
/* end the group undo */
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
if (cropped_cut)
{
......@@ -115,7 +117,8 @@ gimp_edit_copy (GimpImage *gimage,
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
/* Start a group undo */
undo_push_group_start (gimage, EDIT_COPY_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_EDIT_COPY,
_("Copy"));
/* See if the gimage mask is empty */
empty = gimp_image_mask_is_empty (gimage);
......@@ -143,7 +146,7 @@ gimp_edit_copy (GimpImage *gimage,
cropped_copy = NULL;
/* end the group undo */
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
if (cropped_copy)
{
......@@ -194,7 +197,8 @@ gimp_edit_paste (GimpImage *gimage,
return NULL;
/* Start a group undo */
undo_push_group_start (gimage, EDIT_PASTE_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_EDIT_PASTE,
_("Paste"));
/* Set the offsets to the center of the image */
if (drawable)
......@@ -232,7 +236,7 @@ gimp_edit_paste (GimpImage *gimage,
}
/* end the group undo */
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
return layer;
}
......
......@@ -38,6 +38,7 @@
#include "gimpdrawable-transform.h"
#include "gimpimage.h"
#include "gimpimage-mask.h"
#include "gimpimage-undo.h"
#include "gimplayer.h"
#include "gimplayer-floating-sel.h"
......@@ -611,7 +612,8 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
/* Start a transform undo group */
undo_push_group_start (gimage, TRANSFORM_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TRANSFORM,
_("Transform"));
/* Cut/Copy from the specified drawable */
float_tiles = gimp_drawable_transform_cut (drawable, &new_layer);
......@@ -637,7 +639,7 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
}
/* push the undo group end */
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
return success;
}
......@@ -658,7 +660,8 @@ gimp_drawable_transform_flip (GimpDrawable *drawable,
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
/* Start a transform undo group */
undo_push_group_start (gimage, TRANSFORM_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TRANSFORM,
_("Flip"));
/* Cut/Copy from the specified drawable */
float_tiles = gimp_drawable_transform_cut (drawable, &new_layer);
......@@ -680,7 +683,7 @@ gimp_drawable_transform_flip (GimpDrawable *drawable,
}
/* push the undo group end */
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
return success;
}
......@@ -761,12 +764,13 @@ gimp_drawable_transform_paste (GimpDrawable *drawable,
&(GIMP_DRAWABLE (layer)->offset_y));
/* Start a group undo */
undo_push_group_start (gimage, EDIT_PASTE_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_EDIT_PASTE,
_("Paste Transform"));
floating_sel_attach (layer, drawable);
/* End the group undo */
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
/* Free the tiles */
tile_manager_destroy (tiles);
......
......@@ -38,6 +38,7 @@
#include "gimpdrawable-transform.h"
#include "gimpimage.h"
#include "gimpimage-mask.h"
#include "gimpimage-undo.h"
#include "gimplayer.h"
#include "gimplayer-floating-sel.h"
......@@ -611,7 +612,8 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
/* Start a transform undo group */
undo_push_group_start (gimage, TRANSFORM_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TRANSFORM,
_("Transform"));
/* Cut/Copy from the specified drawable */
float_tiles = gimp_drawable_transform_cut (drawable, &new_layer);
......@@ -637,7 +639,7 @@ gimp_drawable_transform_affine (GimpDrawable *drawable,
}
/* push the undo group end */
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
return success;
}
......@@ -658,7 +660,8 @@ gimp_drawable_transform_flip (GimpDrawable *drawable,
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
/* Start a transform undo group */
undo_push_group_start (gimage, TRANSFORM_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TRANSFORM,
_("Flip"));
/* Cut/Copy from the specified drawable */
float_tiles = gimp_drawable_transform_cut (drawable, &new_layer);
......@@ -680,7 +683,7 @@ gimp_drawable_transform_flip (GimpDrawable *drawable,
}
/* push the undo group end */
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
return success;
}
......@@ -761,12 +764,13 @@ gimp_drawable_transform_paste (GimpDrawable *drawable,
&(GIMP_DRAWABLE (layer)->offset_y));
/* Start a group undo */
undo_push_group_start (gimage, EDIT_PASTE_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_EDIT_PASTE,
_("Paste Transform"));
floating_sel_attach (layer, drawable);
/* End the group undo */
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
/* Free the tiles */
tile_manager_destroy (tiles);
......
......@@ -37,6 +37,7 @@
#include "gimpedit.h"
#include "gimpimage.h"
#include "gimpimage-mask.h"
#include "gimpimage-undo.h"
#include "gimplayer.h"
#include "gimplayer-floating-sel.h"
#include "gimplist.h"
......@@ -58,7 +59,8 @@ gimp_edit_cut (GimpImage *gimage,
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
/* Start a group undo */
undo_push_group_start (gimage, EDIT_CUT_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_EDIT_CUT,
_("Cut"));
/* See if the gimage mask is empty */
empty = gimp_image_mask_is_empty (gimage);
......@@ -86,7 +88,7 @@ gimp_edit_cut (GimpImage *gimage,
cropped_cut = NULL;
/* end the group undo */
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
if (cropped_cut)
{
......@@ -115,7 +117,8 @@ gimp_edit_copy (GimpImage *gimage,
g_return_val_if_fail (GIMP_IS_DRAWABLE (drawable), NULL);
/* Start a group undo */
undo_push_group_start (gimage, EDIT_COPY_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_EDIT_COPY,
_("Copy"));
/* See if the gimage mask is empty */
empty = gimp_image_mask_is_empty (gimage);
......@@ -143,7 +146,7 @@ gimp_edit_copy (GimpImage *gimage,
cropped_copy = NULL;
/* end the group undo */
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
if (cropped_copy)
{
......@@ -194,7 +197,8 @@ gimp_edit_paste (GimpImage *gimage,
return NULL;
/* Start a group undo */
undo_push_group_start (gimage, EDIT_PASTE_UNDO_GROUP);
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_EDIT_PASTE,
_("Paste"));
/* Set the offsets to the center of the image */
if (drawable)
......@@ -232,7 +236,7 @@ gimp_edit_paste (GimpImage *gimage,
}
/* end the group undo */
undo_push_group_end (gimage);
gimp_image_undo_group_end (gimage);
return layer;