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.
This commit is contained in:
parent
8457eb6a2b
commit
b600fd8605
45 changed files with 524 additions and 408 deletions
40
ChangeLog
40
ChangeLog
|
|
@ -1,3 +1,43 @@
|
|||
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>>" >*/
|
||||
GIMP_UNDO_GROUP_NONE = 0, /*< desc="<<invalid>>" >*/
|
||||
|
||||
FIRST_UNDO_GROUP = NO_UNDO_GROUP,
|
||||
GIMP_UNDO_GROUP_FIRST = GIMP_UNDO_GROUP_NONE, /*< skip >*/
|
||||
|
||||
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" >*/
|
||||
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" >*/
|
||||
|
||||
LAST_UNDO_GROUP = MISC_UNDO_GROUP,
|
||||
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" >*/
|
||||
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" >*/
|
||||
|
||||
CANT_UNDO, /*< desc="EEK: can't undo" >*/
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,6 +139,7 @@
|
|||
#include "gimpdrawable.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-projection.h"
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimplist.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
|
|
@ -151,6 +152,8 @@
|
|||
#include "gimpimage-convert-data.h"
|
||||
#include "gimpimage-convert.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
/* basic memory/quality tradeoff */
|
||||
#define PRECISION_R 8
|
||||
|
|
@ -744,7 +747,8 @@ gimp_image_convert (GimpImage *gimage,
|
|||
/* Get the floating layer if one exists */
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
||||
undo_push_group_start (gimage, IMAGE_CONVERT_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_CONVERT,
|
||||
_("Convert"));
|
||||
|
||||
/* Relax the floating selection */
|
||||
if (floating_layer)
|
||||
|
|
@ -1010,7 +1014,7 @@ gimp_image_convert (GimpImage *gimage,
|
|||
if (floating_layer)
|
||||
floating_sel_rigor (floating_layer, TRUE);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
#if 0 /* gone in cvs */
|
||||
/* shrink wrap and update all views */
|
||||
|
|
|
|||
|
|
@ -33,12 +33,15 @@
|
|||
#include "gimpimage-crop.h"
|
||||
#include "gimpimage-mask.h"
|
||||
#include "gimpimage-projection.h"
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
#include "gimplist.h"
|
||||
|
||||
#include "undo.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
@ -123,7 +126,8 @@ gimp_image_crop (GimpImage *gimage,
|
|||
off_x = (doff_x - x1);
|
||||
off_y = (doff_y - y1);
|
||||
|
||||
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);
|
||||
|
|
@ -133,13 +137,14 @@ gimp_image_crop (GimpImage *gimage,
|
|||
if (gimp_layer_is_floating_sel (layer))
|
||||
floating_sel_rigor (layer, TRUE);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
else
|
||||
{
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
||||
undo_push_group_start (gimage, IMAGE_CROP_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_CROP,
|
||||
_("Crop Image"));
|
||||
|
||||
/* relax the floating layer */
|
||||
if (floating_layer)
|
||||
|
|
@ -218,7 +223,7 @@ gimp_image_crop (GimpImage *gimage,
|
|||
undo_push_image_guide (gimage, (GimpGuide *) guide_list_ptr->data);
|
||||
guide_list_ptr = guide_list_ptr->next;
|
||||
}
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
/* Adjust any guides we might have laying about */
|
||||
gimp_image_crop_adjust_guides (gimage, x1, y1, x2, y2);
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "gimpcontext.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-mask.h"
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
#include "gimplayermask.h"
|
||||
|
|
@ -376,7 +377,8 @@ gimp_image_mask_float (GimpImage *gimage,
|
|||
}
|
||||
|
||||
/* Start an undo group */
|
||||
undo_push_group_start (gimage, FS_FLOAT_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_FS_FLOAT,
|
||||
_("Float Selection"));
|
||||
|
||||
/* Cut the selected region */
|
||||
tiles = gimp_image_mask_extract (gimage, drawable, TRUE, FALSE, TRUE);
|
||||
|
|
@ -403,7 +405,7 @@ gimp_image_mask_float (GimpImage *gimage,
|
|||
floating_sel_attach (layer, drawable);
|
||||
|
||||
/* End an undo group */
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
/* invalidate the gimage's boundary variables */
|
||||
mask->boundary_known = FALSE;
|
||||
|
|
@ -686,7 +688,8 @@ gimp_image_mask_stroke (GimpImage *gimage,
|
|||
gimp_image_mask_stroking = TRUE;
|
||||
|
||||
/* Start an undo group */
|
||||
undo_push_group_start (gimage, PAINT_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_PAINT,
|
||||
_("Stroke Selection"));
|
||||
|
||||
seg = 0;
|
||||
cpnt = 0;
|
||||
|
|
@ -741,7 +744,7 @@ gimp_image_mask_stroke (GimpImage *gimage,
|
|||
g_free (stroke_segs);
|
||||
|
||||
/* End an undo group */
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -296,7 +296,8 @@ gimp_image_merge_layers (GimpImage *gimage,
|
|||
|
||||
/* Start a merge undo group. */
|
||||
|
||||
undo_push_group_start (gimage, IMAGE_LAYERS_MERGE_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_LAYERS_MERGE,
|
||||
_("Merge Layers"));
|
||||
|
||||
name = g_strdup (gimp_object_get_name (GIMP_OBJECT (layer)));
|
||||
|
||||
|
|
@ -484,7 +485,7 @@ gimp_image_merge_layers (GimpImage *gimage,
|
|||
g_free (name);
|
||||
|
||||
/* End the merge undo group */
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
gimp_drawable_set_visible (GIMP_DRAWABLE (merge_layer), TRUE);
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "gimpimage.h"
|
||||
#include "gimpimage-mask.h"
|
||||
#include "gimpimage-qmask.h"
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
|
||||
#include "undo.h"
|
||||
|
|
@ -67,7 +68,8 @@ gimp_image_set_qmask_state (GimpImage *gimage,
|
|||
|
||||
if (! mask)
|
||||
{
|
||||
undo_push_group_start (gimage, IMAGE_QMASK_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_QMASK,
|
||||
_("Enable QuickMask"));
|
||||
|
||||
if (gimp_image_mask_is_empty (gimage))
|
||||
{
|
||||
|
|
@ -108,7 +110,7 @@ gimp_image_set_qmask_state (GimpImage *gimage,
|
|||
|
||||
undo_push_image_qmask (gimage);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
/* connect to the removed signal, so the buttons get updated */
|
||||
g_signal_connect (mask, "removed",
|
||||
|
|
@ -122,7 +124,8 @@ gimp_image_set_qmask_state (GimpImage *gimage,
|
|||
|
||||
if (mask)
|
||||
{
|
||||
undo_push_group_start (gimage, IMAGE_QMASK_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_QMASK,
|
||||
_("Disable QuickMask"));
|
||||
|
||||
/* push the undo here since removing the mask will
|
||||
* call the qmask_removed_callback() which will set
|
||||
|
|
@ -136,7 +139,7 @@ gimp_image_set_qmask_state (GimpImage *gimage,
|
|||
gimp_image_mask_load (gimage, mask);
|
||||
gimp_image_remove_channel (gimage, mask);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "gimpimage.h"
|
||||
#include "gimpimage-mask.h"
|
||||
#include "gimpimage-qmask.h"
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
|
||||
#include "undo.h"
|
||||
|
|
@ -67,7 +68,8 @@ gimp_image_set_qmask_state (GimpImage *gimage,
|
|||
|
||||
if (! mask)
|
||||
{
|
||||
undo_push_group_start (gimage, IMAGE_QMASK_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_QMASK,
|
||||
_("Enable QuickMask"));
|
||||
|
||||
if (gimp_image_mask_is_empty (gimage))
|
||||
{
|
||||
|
|
@ -108,7 +110,7 @@ gimp_image_set_qmask_state (GimpImage *gimage,
|
|||
|
||||
undo_push_image_qmask (gimage);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
/* connect to the removed signal, so the buttons get updated */
|
||||
g_signal_connect (mask, "removed",
|
||||
|
|
@ -122,7 +124,8 @@ gimp_image_set_qmask_state (GimpImage *gimage,
|
|||
|
||||
if (mask)
|
||||
{
|
||||
undo_push_group_start (gimage, IMAGE_QMASK_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_QMASK,
|
||||
_("Disable QuickMask"));
|
||||
|
||||
/* push the undo here since removing the mask will
|
||||
* call the qmask_removed_callback() which will set
|
||||
|
|
@ -136,7 +139,7 @@ gimp_image_set_qmask_state (GimpImage *gimage,
|
|||
gimp_image_mask_load (gimage, mask);
|
||||
gimp_image_remove_channel (gimage, mask);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,12 +29,15 @@
|
|||
#include "gimpimage-mask.h"
|
||||
#include "gimpimage-projection.h"
|
||||
#include "gimpimage-resize.h"
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
#include "gimplist.h"
|
||||
|
||||
#include "undo.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
void
|
||||
gimp_image_resize (GimpImage *gimage,
|
||||
|
|
@ -57,7 +60,8 @@ gimp_image_resize (GimpImage *gimage,
|
|||
/* Get the floating layer if one exists */
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
||||
undo_push_group_start (gimage, IMAGE_RESIZE_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_RESIZE,
|
||||
_("Resize Image"));
|
||||
|
||||
/* Relax the floating selection */
|
||||
if (floating_layer)
|
||||
|
|
@ -132,7 +136,7 @@ gimp_image_resize (GimpImage *gimage,
|
|||
if (floating_layer)
|
||||
floating_sel_rigor (floating_layer, TRUE);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
|
|
|
|||
|
|
@ -28,12 +28,15 @@
|
|||
#include "gimpimage-mask.h"
|
||||
#include "gimpimage-projection.h"
|
||||
#include "gimpimage-scale.h"
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
#include "gimplist.h"
|
||||
|
||||
#include "undo.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
void
|
||||
gimp_image_scale (GimpImage *gimage,
|
||||
|
|
@ -69,7 +72,8 @@ gimp_image_scale (GimpImage *gimage,
|
|||
/* Get the floating layer if one exists */
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
||||
undo_push_group_start (gimage, IMAGE_SCALE_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_IMAGE_SCALE,
|
||||
_("Scale Image"));
|
||||
|
||||
/* Relax the floating selection */
|
||||
if (floating_layer)
|
||||
|
|
@ -179,7 +183,7 @@ gimp_image_scale (GimpImage *gimage,
|
|||
if (floating_layer)
|
||||
floating_sel_rigor (floating_layer, TRUE);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
gimp_viewable_size_changed (GIMP_VIEWABLE (gimage));
|
||||
|
||||
|
|
|
|||
|
|
@ -69,23 +69,6 @@
|
|||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
/**********************/
|
||||
/* group Undo funcs */
|
||||
|
||||
gboolean
|
||||
undo_push_group_start (GimpImage *gimage,
|
||||
GimpUndoType type)
|
||||
{
|
||||
return gimp_image_undo_group_start (gimage, type, NULL);
|
||||
}
|
||||
|
||||
gboolean
|
||||
undo_push_group_end (GimpImage *gimage)
|
||||
{
|
||||
return gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
|
||||
|
||||
/****************/
|
||||
/* Image Undo */
|
||||
/****************/
|
||||
|
|
@ -129,7 +112,7 @@ undo_push_image (GimpImage *gimage,
|
|||
|
||||
if ((new = gimp_image_undo_push (gimage,
|
||||
size, sizeof (ImageUndo),
|
||||
IMAGE_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE, NULL,
|
||||
TRUE,
|
||||
undo_pop_image,
|
||||
undo_free_image)))
|
||||
|
|
@ -195,7 +178,7 @@ undo_push_image_mod (GimpImage *gimage,
|
|||
|
||||
if ((new = gimp_image_undo_push (gimage,
|
||||
size, sizeof (ImageUndo),
|
||||
IMAGE_MOD_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE_MOD, NULL,
|
||||
TRUE,
|
||||
undo_pop_image,
|
||||
undo_free_image)))
|
||||
|
|
@ -335,7 +318,7 @@ undo_push_image_type (GimpImage *gimage)
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ImageTypeUndo),
|
||||
sizeof (ImageTypeUndo),
|
||||
IMAGE_TYPE_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE_TYPE, NULL,
|
||||
TRUE,
|
||||
undo_pop_image_type,
|
||||
undo_free_image_type)))
|
||||
|
|
@ -414,7 +397,7 @@ undo_push_image_size (GimpImage *gimage)
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ImageSizeUndo),
|
||||
sizeof (ImageSizeUndo),
|
||||
IMAGE_SIZE_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE_SIZE, NULL,
|
||||
TRUE,
|
||||
undo_pop_image_size,
|
||||
undo_free_image_size)))
|
||||
|
|
@ -503,7 +486,7 @@ undo_push_image_resolution (GimpImage *gimage)
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ResolutionUndo),
|
||||
sizeof (ResolutionUndo),
|
||||
IMAGE_RESOLUTION_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE_RESOLUTION, NULL,
|
||||
TRUE,
|
||||
undo_pop_image_resolution,
|
||||
undo_free_image_resolution)))
|
||||
|
|
@ -601,7 +584,7 @@ undo_push_image_qmask (GimpImage *gimage)
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (QmaskUndo),
|
||||
sizeof (QmaskUndo),
|
||||
IMAGE_QMASK_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE_QMASK, NULL,
|
||||
TRUE,
|
||||
undo_pop_image_qmask,
|
||||
undo_free_image_qmask)))
|
||||
|
|
@ -678,7 +661,7 @@ undo_push_image_guide (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (GuideUndo),
|
||||
sizeof (GuideUndo),
|
||||
IMAGE_GUIDE_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE_GUIDE, NULL,
|
||||
TRUE,
|
||||
undo_pop_image_guide,
|
||||
undo_free_image_guide)))
|
||||
|
|
@ -796,7 +779,7 @@ undo_push_mask (GimpImage *gimage,
|
|||
|
||||
if ((new = gimp_image_undo_push (gimage,
|
||||
size, sizeof (MaskUndo),
|
||||
MASK_UNDO, NULL,
|
||||
GIMP_UNDO_MASK, NULL,
|
||||
FALSE,
|
||||
undo_pop_mask,
|
||||
undo_free_mask)))
|
||||
|
|
@ -965,7 +948,7 @@ undo_push_item_rename (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ItemRenameUndo),
|
||||
sizeof (ItemRenameUndo),
|
||||
ITEM_RENAME_UNDO, NULL,
|
||||
GIMP_UNDO_ITEM_RENAME, NULL,
|
||||
TRUE,
|
||||
undo_pop_item_rename,
|
||||
undo_free_item_rename)))
|
||||
|
|
@ -1050,7 +1033,7 @@ undo_push_layer_add (GimpImage *gimage,
|
|||
gint prev_position,
|
||||
GimpLayer *prev_layer)
|
||||
{
|
||||
return undo_push_layer (gimage, LAYER_ADD_UNDO,
|
||||
return undo_push_layer (gimage, GIMP_UNDO_LAYER_ADD,
|
||||
layer, prev_position, prev_layer);
|
||||
}
|
||||
|
||||
|
|
@ -1060,7 +1043,7 @@ undo_push_layer_remove (GimpImage *gimage,
|
|||
gint prev_position,
|
||||
GimpLayer *prev_layer)
|
||||
{
|
||||
return undo_push_layer (gimage, LAYER_REMOVE_UNDO,
|
||||
return undo_push_layer (gimage, GIMP_UNDO_LAYER_REMOVE,
|
||||
layer, prev_position, prev_layer);
|
||||
}
|
||||
|
||||
|
|
@ -1074,8 +1057,8 @@ undo_push_layer (GimpImage *gimage,
|
|||
GimpUndo *new;
|
||||
gsize size;
|
||||
|
||||
g_return_val_if_fail (type == LAYER_ADD_UNDO ||
|
||||
type == LAYER_REMOVE_UNDO,
|
||||
g_return_val_if_fail (type == GIMP_UNDO_LAYER_ADD ||
|
||||
type == GIMP_UNDO_LAYER_REMOVE,
|
||||
FALSE);
|
||||
|
||||
size = sizeof (LayerUndo) + gimp_object_get_memsize (GIMP_OBJECT (layer));
|
||||
|
|
@ -1111,8 +1094,10 @@ undo_pop_layer (GimpUndo *undo,
|
|||
|
||||
lu = (LayerUndo *) undo->data;
|
||||
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO && undo->undo_type == LAYER_ADD_UNDO) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO && undo->undo_type == LAYER_REMOVE_UNDO))
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO &&
|
||||
undo->undo_type == GIMP_UNDO_LAYER_ADD) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO &&
|
||||
undo->undo_type == GIMP_UNDO_LAYER_REMOVE))
|
||||
{
|
||||
/* remove layer */
|
||||
|
||||
|
|
@ -1237,7 +1222,7 @@ undo_push_layer_mod (GimpImage *gimage,
|
|||
|
||||
if ((new = gimp_image_undo_push (gimage,
|
||||
size, sizeof (LayerModUndo),
|
||||
LAYER_MOD_UNDO, NULL,
|
||||
GIMP_UNDO_LAYER_MOD, NULL,
|
||||
TRUE,
|
||||
undo_pop_layer_mod,
|
||||
undo_free_layer_mod)))
|
||||
|
|
@ -1373,7 +1358,7 @@ undo_push_layer_mask_add (GimpImage *gimage,
|
|||
GimpLayer *layer,
|
||||
GimpLayerMask *mask)
|
||||
{
|
||||
return undo_push_layer_mask (gimage, LAYER_MASK_ADD_UNDO,
|
||||
return undo_push_layer_mask (gimage, GIMP_UNDO_LAYER_MASK_ADD,
|
||||
layer, mask);
|
||||
}
|
||||
|
||||
|
|
@ -1382,7 +1367,7 @@ undo_push_layer_mask_remove (GimpImage *gimage,
|
|||
GimpLayer *layer,
|
||||
GimpLayerMask *mask)
|
||||
{
|
||||
return undo_push_layer_mask (gimage, LAYER_MASK_REMOVE_UNDO,
|
||||
return undo_push_layer_mask (gimage, GIMP_UNDO_LAYER_MASK_REMOVE,
|
||||
layer, mask);
|
||||
}
|
||||
|
||||
|
|
@ -1395,8 +1380,8 @@ undo_push_layer_mask (GimpImage *gimage,
|
|||
GimpUndo *new;
|
||||
gsize size;
|
||||
|
||||
g_return_val_if_fail (type == LAYER_MASK_ADD_UNDO ||
|
||||
type == LAYER_MASK_REMOVE_UNDO,
|
||||
g_return_val_if_fail (type == GIMP_UNDO_LAYER_MASK_ADD ||
|
||||
type == GIMP_UNDO_LAYER_MASK_REMOVE,
|
||||
FALSE);
|
||||
|
||||
size = sizeof (LayerMaskUndo) + gimp_object_get_memsize (GIMP_OBJECT (mask));
|
||||
|
|
@ -1432,8 +1417,10 @@ undo_pop_layer_mask (GimpUndo *undo,
|
|||
|
||||
lmu = (LayerMaskUndo *) undo->data;
|
||||
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO && undo->undo_type == LAYER_MASK_ADD_UNDO) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO && undo->undo_type == LAYER_MASK_REMOVE_UNDO))
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO &&
|
||||
undo->undo_type == GIMP_UNDO_LAYER_MASK_ADD) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO &&
|
||||
undo->undo_type == GIMP_UNDO_LAYER_MASK_REMOVE))
|
||||
{
|
||||
/* remove layer mask */
|
||||
|
||||
|
|
@ -1492,7 +1479,7 @@ undo_push_layer_reposition (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (LayerRepositionUndo),
|
||||
sizeof (LayerRepositionUndo),
|
||||
LAYER_REPOSITION_UNDO, NULL,
|
||||
GIMP_UNDO_LAYER_REPOSITION, NULL,
|
||||
TRUE,
|
||||
undo_pop_layer_reposition,
|
||||
undo_free_layer_reposition)))
|
||||
|
|
@ -1570,7 +1557,7 @@ undo_push_layer_displace (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (LayerDisplaceUndo),
|
||||
sizeof (LayerDisplaceUndo),
|
||||
LAYER_DISPLACE_UNDO, NULL,
|
||||
GIMP_UNDO_LAYER_DISPLACE, NULL,
|
||||
TRUE,
|
||||
undo_pop_layer_displace,
|
||||
undo_free_layer_displace)))
|
||||
|
|
@ -1692,7 +1679,7 @@ undo_push_channel_add (GimpImage *gimage,
|
|||
gint prev_position,
|
||||
GimpChannel *prev_channel)
|
||||
{
|
||||
return undo_push_channel (gimage, CHANNEL_ADD_UNDO,
|
||||
return undo_push_channel (gimage, GIMP_UNDO_CHANNEL_ADD,
|
||||
channel, prev_position, prev_channel);
|
||||
}
|
||||
|
||||
|
|
@ -1702,7 +1689,7 @@ undo_push_channel_remove (GimpImage *gimage,
|
|||
gint prev_position,
|
||||
GimpChannel *prev_channel)
|
||||
{
|
||||
return undo_push_channel (gimage, CHANNEL_REMOVE_UNDO,
|
||||
return undo_push_channel (gimage, GIMP_UNDO_CHANNEL_REMOVE,
|
||||
channel, prev_position, prev_channel);
|
||||
}
|
||||
|
||||
|
|
@ -1716,8 +1703,8 @@ undo_push_channel (GimpImage *gimage,
|
|||
GimpUndo *new;
|
||||
gsize size;
|
||||
|
||||
g_return_val_if_fail (type == CHANNEL_ADD_UNDO ||
|
||||
type == CHANNEL_REMOVE_UNDO,
|
||||
g_return_val_if_fail (type == GIMP_UNDO_CHANNEL_ADD ||
|
||||
type == GIMP_UNDO_CHANNEL_REMOVE,
|
||||
FALSE);
|
||||
|
||||
size = sizeof (ChannelUndo) + gimp_object_get_memsize (GIMP_OBJECT (channel));
|
||||
|
|
@ -1754,8 +1741,10 @@ undo_pop_channel (GimpUndo *undo,
|
|||
|
||||
cu = (ChannelUndo *) undo->data;
|
||||
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO && undo->undo_type == CHANNEL_ADD_UNDO) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO && undo->undo_type == CHANNEL_REMOVE_UNDO))
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO &&
|
||||
undo->undo_type == GIMP_UNDO_CHANNEL_ADD) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO &&
|
||||
undo->undo_type == GIMP_UNDO_CHANNEL_REMOVE))
|
||||
{
|
||||
/* remove channel */
|
||||
|
||||
|
|
@ -1849,7 +1838,7 @@ undo_push_channel_mod (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
size,
|
||||
sizeof (ChannelModUndo),
|
||||
CHANNEL_MOD_UNDO, NULL,
|
||||
GIMP_UNDO_CHANNEL_MOD, NULL,
|
||||
TRUE,
|
||||
undo_pop_channel_mod,
|
||||
undo_free_channel_mod)))
|
||||
|
|
@ -1957,7 +1946,7 @@ undo_push_channel_reposition (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ChannelRepositionUndo),
|
||||
sizeof (ChannelRepositionUndo),
|
||||
CHANNEL_REPOSITION_UNDO, NULL,
|
||||
GIMP_UNDO_CHANNEL_REPOSITION, NULL,
|
||||
TRUE,
|
||||
undo_pop_channel_reposition,
|
||||
undo_free_channel_reposition)))
|
||||
|
|
@ -2036,7 +2025,7 @@ undo_push_vectors_add (GimpImage *gimage,
|
|||
gint prev_position,
|
||||
GimpVectors *prev_vectors)
|
||||
{
|
||||
return undo_push_vectors (gimage, VECTORS_ADD_UNDO,
|
||||
return undo_push_vectors (gimage, GIMP_UNDO_VECTORS_ADD,
|
||||
vectors, prev_position, prev_vectors);
|
||||
}
|
||||
|
||||
|
|
@ -2046,7 +2035,7 @@ undo_push_vectors_remove (GimpImage *gimage,
|
|||
gint prev_position,
|
||||
GimpVectors *prev_vectors)
|
||||
{
|
||||
return undo_push_vectors (gimage, VECTORS_REMOVE_UNDO,
|
||||
return undo_push_vectors (gimage, GIMP_UNDO_VECTORS_REMOVE,
|
||||
vectors, prev_position, prev_vectors);
|
||||
}
|
||||
|
||||
|
|
@ -2060,8 +2049,8 @@ undo_push_vectors (GimpImage *gimage,
|
|||
GimpUndo *new;
|
||||
gsize size;
|
||||
|
||||
g_return_val_if_fail (type == VECTORS_ADD_UNDO ||
|
||||
type == VECTORS_REMOVE_UNDO,
|
||||
g_return_val_if_fail (type == GIMP_UNDO_VECTORS_ADD ||
|
||||
type == GIMP_UNDO_VECTORS_REMOVE,
|
||||
FALSE);
|
||||
|
||||
size = sizeof (VectorsUndo) + gimp_object_get_memsize (GIMP_OBJECT (vectors));
|
||||
|
|
@ -2098,8 +2087,10 @@ undo_pop_vectors (GimpUndo *undo,
|
|||
|
||||
vu = (VectorsUndo *) undo->data;
|
||||
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO && undo->undo_type == VECTORS_ADD_UNDO) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO && undo->undo_type == VECTORS_REMOVE_UNDO))
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO &&
|
||||
undo->undo_type == GIMP_UNDO_VECTORS_ADD) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO &&
|
||||
undo->undo_type == GIMP_UNDO_VECTORS_REMOVE))
|
||||
{
|
||||
/* remove vectors */
|
||||
|
||||
|
|
@ -2179,7 +2170,7 @@ undo_push_vectors_mod (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
size,
|
||||
sizeof (VectorsModUndo),
|
||||
VECTORS_MOD_UNDO, NULL,
|
||||
GIMP_UNDO_VECTORS_MOD, NULL,
|
||||
TRUE,
|
||||
undo_pop_vectors_mod,
|
||||
undo_free_vectors_mod)))
|
||||
|
|
@ -2268,7 +2259,7 @@ undo_push_vectors_reposition (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (VectorsRepositionUndo),
|
||||
sizeof (VectorsRepositionUndo),
|
||||
VECTORS_REPOSITION_UNDO, NULL,
|
||||
GIMP_UNDO_VECTORS_REPOSITION, NULL,
|
||||
TRUE,
|
||||
undo_pop_vectors_reposition,
|
||||
undo_free_vectors_reposition)))
|
||||
|
|
@ -2345,7 +2336,7 @@ undo_push_fs_to_layer (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (FStoLayerUndo),
|
||||
sizeof (FStoLayerUndo),
|
||||
FS_TO_LAYER_UNDO, NULL,
|
||||
GIMP_UNDO_FS_TO_LAYER, NULL,
|
||||
TRUE,
|
||||
undo_pop_fs_to_layer,
|
||||
undo_free_fs_to_layer)))
|
||||
|
|
@ -2469,7 +2460,7 @@ undo_push_fs_rigor (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (gint32),
|
||||
sizeof (gint32),
|
||||
FS_RIGOR_UNDO, NULL,
|
||||
GIMP_UNDO_FS_RIGOR, NULL,
|
||||
FALSE,
|
||||
undo_pop_fs_rigor,
|
||||
undo_free_fs_rigor)))
|
||||
|
|
@ -2562,7 +2553,7 @@ undo_push_fs_relax (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (gint32),
|
||||
sizeof (gint32),
|
||||
FS_RELAX_UNDO, NULL,
|
||||
GIMP_UNDO_FS_RELAX, NULL,
|
||||
FALSE,
|
||||
undo_pop_fs_relax,
|
||||
undo_free_fs_relax)))
|
||||
|
|
@ -2671,7 +2662,7 @@ undo_push_transform (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (TransformUndo),
|
||||
sizeof (TransformUndo),
|
||||
TRANSFORM_UNDO, NULL,
|
||||
GIMP_UNDO_TRANSFORM, NULL,
|
||||
FALSE,
|
||||
undo_pop_transform,
|
||||
undo_free_transform)))
|
||||
|
|
@ -2799,7 +2790,7 @@ undo_push_paint (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (PaintUndo),
|
||||
sizeof (PaintUndo),
|
||||
PAINT_UNDO, NULL,
|
||||
GIMP_UNDO_PAINT, NULL,
|
||||
FALSE,
|
||||
undo_pop_paint,
|
||||
undo_free_paint)))
|
||||
|
|
@ -2895,7 +2886,7 @@ undo_push_image_parasite (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ParasiteUndo),
|
||||
sizeof (ParasiteUndo),
|
||||
PARASITE_ATTACH_UNDO, NULL,
|
||||
GIMP_UNDO_PARASITE_ATTACH, NULL,
|
||||
TRUE,
|
||||
undo_pop_parasite,
|
||||
undo_free_parasite)))
|
||||
|
|
@ -2925,7 +2916,7 @@ undo_push_image_parasite_remove (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ParasiteUndo),
|
||||
sizeof (ParasiteUndo),
|
||||
PARASITE_REMOVE_UNDO, NULL,
|
||||
GIMP_UNDO_PARASITE_REMOVE, NULL,
|
||||
TRUE,
|
||||
undo_pop_parasite,
|
||||
undo_free_parasite)))
|
||||
|
|
@ -2956,7 +2947,7 @@ undo_push_item_parasite (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ParasiteUndo),
|
||||
sizeof (ParasiteUndo),
|
||||
PARASITE_ATTACH_UNDO, NULL,
|
||||
GIMP_UNDO_PARASITE_ATTACH, NULL,
|
||||
TRUE,
|
||||
undo_pop_parasite,
|
||||
undo_free_parasite)))
|
||||
|
|
@ -2986,7 +2977,7 @@ undo_push_item_parasite_remove (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ParasiteUndo),
|
||||
sizeof (ParasiteUndo),
|
||||
PARASITE_REMOVE_UNDO, NULL,
|
||||
GIMP_UNDO_PARASITE_REMOVE, NULL,
|
||||
TRUE,
|
||||
undo_pop_parasite,
|
||||
undo_free_parasite)))
|
||||
|
|
@ -3097,7 +3088,7 @@ undo_push_cantundo (GimpImage *gimage,
|
|||
|
||||
if ((new = gimp_image_undo_push (gimage,
|
||||
0, 0,
|
||||
CANT_UNDO, NULL,
|
||||
GIMP_UNDO_CANT, NULL,
|
||||
TRUE,
|
||||
undo_pop_cantundo,
|
||||
NULL)))
|
||||
|
|
|
|||
|
|
@ -20,13 +20,6 @@
|
|||
#define __UNDO_H__
|
||||
|
||||
|
||||
/* undo groups */
|
||||
|
||||
gboolean undo_push_group_start (GimpImage *gimage,
|
||||
GimpUndoType undo_type);
|
||||
gboolean undo_push_group_end (GimpImage *gimage);
|
||||
|
||||
|
||||
/* image undos */
|
||||
|
||||
gboolean undo_push_image (GimpImage *gimage,
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ gboolean
|
|||
gimp_image_undo (GimpImage *gimage)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
|
||||
g_return_val_if_fail (gimage->pushing_undo_group == NO_UNDO_GROUP, FALSE);
|
||||
g_return_val_if_fail (gimage->pushing_undo_group == GIMP_UNDO_GROUP_NONE,
|
||||
FALSE);
|
||||
|
||||
gimp_image_undo_pop_stack (gimage,
|
||||
gimage->undo_stack,
|
||||
|
|
@ -61,7 +62,8 @@ gboolean
|
|||
gimp_image_redo (GimpImage *gimage)
|
||||
{
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
|
||||
g_return_val_if_fail (gimage->pushing_undo_group == NO_UNDO_GROUP, FALSE);
|
||||
g_return_val_if_fail (gimage->pushing_undo_group == GIMP_UNDO_GROUP_NONE,
|
||||
FALSE);
|
||||
|
||||
gimp_image_undo_pop_stack (gimage,
|
||||
gimage->redo_stack,
|
||||
|
|
@ -103,8 +105,8 @@ gimp_image_undo_group_start (GimpImage *gimage,
|
|||
GimpUndoStack *undo_group;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), FALSE);
|
||||
g_return_val_if_fail (type > FIRST_UNDO_GROUP &&
|
||||
type <= LAST_UNDO_GROUP, FALSE);
|
||||
g_return_val_if_fail (type > GIMP_UNDO_GROUP_FIRST &&
|
||||
type <= GIMP_UNDO_GROUP_LAST, FALSE);
|
||||
|
||||
if (! name)
|
||||
name = gimp_image_undo_type_to_name (type);
|
||||
|
|
@ -160,7 +162,7 @@ gimp_image_undo_group_end (GimpImage *gimage)
|
|||
|
||||
if (gimage->group_count == 0)
|
||||
{
|
||||
gimage->pushing_undo_group = NO_UNDO_GROUP;
|
||||
gimage->pushing_undo_group = GIMP_UNDO_GROUP_NONE;
|
||||
|
||||
gimp_image_undo_free_space (gimage);
|
||||
|
||||
|
|
@ -187,7 +189,7 @@ gimp_image_undo_push (GimpImage *gimage,
|
|||
gpointer undo_struct = NULL;
|
||||
|
||||
g_return_val_if_fail (GIMP_IS_IMAGE (gimage), NULL);
|
||||
g_return_val_if_fail (type > LAST_UNDO_GROUP, NULL);
|
||||
g_return_val_if_fail (type > GIMP_UNDO_GROUP_LAST, NULL);
|
||||
|
||||
if (! name)
|
||||
name = gimp_image_undo_type_to_name (type);
|
||||
|
|
@ -223,7 +225,7 @@ gimp_image_undo_push (GimpImage *gimage,
|
|||
dirties_image,
|
||||
pop_func, free_func);
|
||||
|
||||
if (gimage->pushing_undo_group == NO_UNDO_GROUP)
|
||||
if (gimage->pushing_undo_group == GIMP_UNDO_GROUP_NONE)
|
||||
{
|
||||
gimp_undo_stack_push_undo (gimage->undo_stack, new);
|
||||
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ gimp_image_init (GimpImage *gimage)
|
|||
gimage->undo_stack = gimp_undo_stack_new (gimage);
|
||||
gimage->redo_stack = gimp_undo_stack_new (gimage);
|
||||
gimage->group_count = 0;
|
||||
gimage->pushing_undo_group = NO_UNDO_GROUP;
|
||||
gimage->pushing_undo_group = GIMP_UNDO_GROUP_NONE;
|
||||
|
||||
|
||||
gimage->comp_preview = NULL;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
#include "gimp-parasites.h"
|
||||
#include "gimpchannel.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimpitem.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplist.h"
|
||||
|
|
@ -446,7 +447,8 @@ gimp_item_parasite_attach (GimpItem *item,
|
|||
if (gimp_parasite_is_undoable (parasite))
|
||||
{
|
||||
/* do a group in case we have attach_parent set */
|
||||
undo_push_group_start (item->gimage, PARASITE_ATTACH_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (item->gimage, GIMP_UNDO_GROUP_PARASITE_ATTACH,
|
||||
_("Attach Parasite"));
|
||||
|
||||
undo_push_item_parasite (item->gimage, item, parasite);
|
||||
}
|
||||
|
|
@ -474,7 +476,7 @@ gimp_item_parasite_attach (GimpItem *item,
|
|||
|
||||
if (gimp_parasite_is_undoable (parasite))
|
||||
{
|
||||
undo_push_group_end (item->gimage);
|
||||
gimp_image_undo_group_end (item->gimage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-mask.h"
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
#include "gimplayermask.h"
|
||||
|
|
@ -127,7 +128,8 @@ floating_sel_anchor (GimpLayer *layer)
|
|||
}
|
||||
|
||||
/* Start a floating selection anchoring undo */
|
||||
undo_push_group_start (gimage, FS_ANCHOR_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_FS_ANCHOR,
|
||||
_("Anchor Floating Selection"));
|
||||
|
||||
/* Invalidate the previews of the layer that will be composited
|
||||
* with the floating section.
|
||||
|
|
@ -148,7 +150,7 @@ floating_sel_anchor (GimpLayer *layer)
|
|||
gimp_image_remove_layer (gimage, layer);
|
||||
|
||||
/* end the group undo */
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
/* invalidate the boundaries */
|
||||
gimp_image_mask_invalidate (gimage);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include "gimpcontainer.h"
|
||||
#include "gimpimage.h"
|
||||
#include "gimpimage-convert.h"
|
||||
#include "gimpimage-undo.h"
|
||||
#include "gimplayer.h"
|
||||
#include "gimplayer-floating-sel.h"
|
||||
#include "gimplayermask.h"
|
||||
|
|
@ -787,7 +788,8 @@ gimp_layer_apply_mask (GimpLayer *layer,
|
|||
|
||||
if (push_undo)
|
||||
{
|
||||
undo_push_group_start (gimage, LAYER_APPLY_MASK_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_LAYER_APPLY_MASK,
|
||||
_("Apply Layer Mask"));
|
||||
|
||||
undo_push_layer_mask_remove (gimage, layer, layer->mask);
|
||||
}
|
||||
|
|
@ -832,7 +834,7 @@ gimp_layer_apply_mask (GimpLayer *layer,
|
|||
|
||||
if (push_undo)
|
||||
{
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
|
||||
/* If applying actually changed the view */
|
||||
|
|
@ -1323,7 +1325,8 @@ gimp_layer_resize_to_image (GimpLayer *layer)
|
|||
if (! (gimage = gimp_item_get_image (GIMP_ITEM (layer))))
|
||||
return;
|
||||
|
||||
undo_push_group_start (gimage, LAYER_RESIZE_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_LAYER_RESIZE,
|
||||
_("Layer to Image Size"));
|
||||
|
||||
if (gimp_layer_is_floating_sel (layer))
|
||||
floating_sel_relax (layer, TRUE);
|
||||
|
|
@ -1334,7 +1337,7 @@ gimp_layer_resize_to_image (GimpLayer *layer)
|
|||
if (gimp_layer_is_floating_sel (layer))
|
||||
floating_sel_rigor (layer, TRUE);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
|
||||
BoundSeg *
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "core/gimpdrawable-bucket-fill.h"
|
||||
#include "core/gimpedit.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimplayer.h"
|
||||
#include "core/gimppattern.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
|
@ -60,7 +61,8 @@ gimp_display_shell_drop_drawable (GtkWidget *widget,
|
|||
|
||||
drawable = GIMP_DRAWABLE (viewable);
|
||||
|
||||
undo_push_group_start (gdisp->gimage, EDIT_PASTE_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gdisp->gimage, GIMP_UNDO_GROUP_EDIT_PASTE,
|
||||
_("Drop New Layer"));
|
||||
|
||||
new_layer = gimp_layer_new_from_drawable (drawable, gdisp->gimage);
|
||||
|
||||
|
|
@ -71,7 +73,7 @@ gimp_display_shell_drop_drawable (GtkWidget *widget,
|
|||
|
||||
gimp_image_add_layer (gdisp->gimage, new_layer, -1);
|
||||
|
||||
undo_push_group_end (gdisp->gimage);
|
||||
gimp_image_undo_group_end (gdisp->gimage);
|
||||
|
||||
gimp_image_flush (gdisp->gimage);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@
|
|||
#include "core/gimpgradient.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-mask.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimpmarshal.h"
|
||||
|
||||
#include "gimppaintcore.h"
|
||||
|
|
@ -435,7 +436,8 @@ gimp_paint_core_finish (GimpPaintCore *core,
|
|||
(core->y2 == core->y1))
|
||||
return;
|
||||
|
||||
undo_push_group_start (gimage, PAINT_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_PAINT,
|
||||
_("Paint"));
|
||||
|
||||
undo_push_paint (gimage,
|
||||
core->ID,
|
||||
|
|
@ -449,7 +451,7 @@ gimp_paint_core_finish (GimpPaintCore *core,
|
|||
TRUE);
|
||||
core->undo_tiles = NULL;
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
/* invalidate the drawable--have to do it here, because
|
||||
* it is not done during the actual painting.
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "core/core-enums.h"
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimplayer-floating-sel.h"
|
||||
#include "core/gimplayer.h"
|
||||
|
|
@ -41,6 +42,8 @@
|
|||
#include "pdb_glue.h"
|
||||
#include "undo.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
static ProcRecord layer_new_proc;
|
||||
static ProcRecord layer_copy_proc;
|
||||
static ProcRecord layer_create_mask_proc;
|
||||
|
|
@ -400,7 +403,8 @@ layer_scale_invoker (Gimp *gimp,
|
|||
{
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
||||
undo_push_group_start (gimage, LAYER_SCALE_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_LAYER_SCALE,
|
||||
_("Scale Layer"));
|
||||
|
||||
if (floating_layer)
|
||||
floating_sel_relax (floating_layer, TRUE);
|
||||
|
|
@ -410,7 +414,7 @@ layer_scale_invoker (Gimp *gimp,
|
|||
if (floating_layer)
|
||||
floating_sel_rigor (floating_layer, TRUE);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
|
@ -494,7 +498,8 @@ layer_resize_invoker (Gimp *gimp,
|
|||
{
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
||||
undo_push_group_start (gimage, LAYER_RESIZE_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_LAYER_RESIZE,
|
||||
_("Resize Layer"));
|
||||
|
||||
if (floating_layer)
|
||||
floating_sel_relax (floating_layer, TRUE);
|
||||
|
|
@ -504,7 +509,7 @@ layer_resize_invoker (Gimp *gimp,
|
|||
if (floating_layer)
|
||||
floating_sel_rigor (floating_layer, TRUE);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
|
@ -633,7 +638,8 @@ layer_translate_invoker (Gimp *gimp,
|
|||
{
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
||||
undo_push_group_start (gimage, LAYER_LINKED_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_LAYER_LINKED,
|
||||
_("Move Layer"));
|
||||
|
||||
if (floating_layer)
|
||||
floating_sel_relax (floating_layer, TRUE);
|
||||
|
|
@ -651,7 +657,7 @@ layer_translate_invoker (Gimp *gimp,
|
|||
if (floating_layer)
|
||||
floating_sel_rigor (floating_layer, TRUE);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
|
@ -764,7 +770,8 @@ layer_set_offsets_invoker (Gimp *gimp,
|
|||
{
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
||||
undo_push_group_start (gimage, LAYER_LINKED_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_LAYER_LINKED,
|
||||
_("Move Layer"));
|
||||
|
||||
if (floating_layer)
|
||||
floating_sel_relax (floating_layer, TRUE);
|
||||
|
|
@ -784,7 +791,7 @@ layer_set_offsets_invoker (Gimp *gimp,
|
|||
if (floating_layer)
|
||||
floating_sel_rigor (floating_layer, TRUE);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
|
|
|||
|
|
@ -28,8 +28,10 @@
|
|||
#include "pdb-types.h"
|
||||
#include "procedural_db.h"
|
||||
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "undo.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
static ProcRecord undo_push_group_start_proc;
|
||||
static ProcRecord undo_push_group_end_proc;
|
||||
|
|
@ -53,7 +55,7 @@ undo_push_group_start_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
undo_push_group_start (gimage, MISC_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_MISC, _("Plug-In"));
|
||||
|
||||
return procedural_db_return_args (&undo_push_group_start_proc, success);
|
||||
}
|
||||
|
|
@ -95,7 +97,7 @@ undo_push_group_end_invoker (Gimp *gimp,
|
|||
success = FALSE;
|
||||
|
||||
if (success)
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
return procedural_db_return_args (&undo_push_group_end_proc, success);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-mask.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimplayer-floating-sel.h"
|
||||
|
||||
#include "gimptext.h"
|
||||
|
|
@ -43,6 +44,8 @@
|
|||
|
||||
#include "undo.h"
|
||||
|
||||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
GimpLayer *
|
||||
text_render (GimpImage *gimage,
|
||||
|
|
@ -85,7 +88,8 @@ text_render (GimpImage *gimage,
|
|||
return NULL;
|
||||
|
||||
/* Start a group undo */
|
||||
undo_push_group_start (gimage, TEXT_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TEXT,
|
||||
_("Text"));
|
||||
|
||||
/* Set the layer offsets */
|
||||
GIMP_DRAWABLE (layer)->offset_x = text_x;
|
||||
|
|
@ -106,7 +110,7 @@ text_render (GimpImage *gimage,
|
|||
floating_sel_attach (layer, drawable);
|
||||
|
||||
/* end the group undo */
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
return layer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-mask.h"
|
||||
#include "core/gimpimage-mask-select.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimppaintinfo.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
|
|
@ -3431,7 +3432,8 @@ bezier_stroke (GimpBezierSelectTool *bezier_sel,
|
|||
rpnts = g_new0 (BezierRenderPnts, 1);
|
||||
|
||||
/* Start an undo group */
|
||||
undo_push_group_start (gdisp->gimage, PAINT_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gdisp->gimage, GIMP_UNDO_GROUP_PAINT,
|
||||
_("Stroke Path"));
|
||||
|
||||
bezier_gen_points (bezier_sel,open_path,rpnts);
|
||||
|
||||
|
|
@ -3483,7 +3485,7 @@ bezier_stroke (GimpBezierSelectTool *bezier_sel,
|
|||
while (rpnts);
|
||||
|
||||
/* End an undo group */
|
||||
undo_push_group_end (gdisp->gimage);
|
||||
gimp_image_undo_group_end (gdisp->gimage);
|
||||
gimp_image_flush (gdisp->gimage);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -243,7 +243,8 @@ init_edit_selection (GimpTool *tool,
|
|||
|
||||
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
|
||||
|
||||
undo_push_group_start (gdisp->gimage, LAYER_DISPLACE_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gdisp->gimage, GIMP_UNDO_GROUP_LAYER_DISPLACE,
|
||||
_("Move Layer"));
|
||||
|
||||
gimp_drawable_offsets (gimp_image_active_drawable (gdisp->gimage),
|
||||
&off_x, &off_y);
|
||||
|
|
@ -383,7 +384,7 @@ gimp_edit_selection_tool_button_release (GimpTool *tool,
|
|||
gimp_viewable_invalidate_preview (GIMP_VIEWABLE (layer));
|
||||
}
|
||||
|
||||
undo_push_group_end (gdisp->gimage);
|
||||
gimp_image_undo_group_end (gdisp->gimage);
|
||||
|
||||
if (state & GDK_BUTTON3_MASK) /* OPERATION CANCELLED */
|
||||
{
|
||||
|
|
@ -886,7 +887,8 @@ gimp_edit_selection_tool_arrow_key (GimpTool *tool,
|
|||
if (inc_x == 0 && inc_y == 0 && mask_inc_x == 0 && mask_inc_y == 0)
|
||||
return;
|
||||
|
||||
undo_push_group_start (gdisp->gimage, LAYER_DISPLACE_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gdisp->gimage, GIMP_UNDO_GROUP_LAYER_DISPLACE,
|
||||
_("Move Layer"));
|
||||
|
||||
if (mask_inc_x != 0 || mask_inc_y != 0)
|
||||
gimp_image_mask_translate (gdisp->gimage, mask_inc_x, mask_inc_y);
|
||||
|
|
@ -943,6 +945,6 @@ gimp_edit_selection_tool_arrow_key (GimpTool *tool,
|
|||
}
|
||||
}
|
||||
|
||||
undo_push_group_end (gdisp->gimage);
|
||||
gimp_image_undo_group_end (gdisp->gimage);
|
||||
gimp_image_flush (gdisp->gimage);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-guides.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "widgets/gimpviewabledialog.h"
|
||||
|
|
@ -280,8 +281,9 @@ gimp_measure_tool_button_press (GimpTool *tool,
|
|||
gdisp->gimage->width)));
|
||||
|
||||
if (create_hguide && create_vguide)
|
||||
undo_push_group_start (gdisp->gimage,
|
||||
IMAGE_GUIDE_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gdisp->gimage,
|
||||
GIMP_UNDO_GROUP_IMAGE_GUIDE,
|
||||
_("Add Guides"));
|
||||
|
||||
if (create_hguide)
|
||||
{
|
||||
|
|
@ -302,7 +304,7 @@ gimp_measure_tool_button_press (GimpTool *tool,
|
|||
}
|
||||
|
||||
if (create_hguide && create_vguide)
|
||||
undo_push_group_end (gdisp->gimage);
|
||||
gimp_image_undo_group_end (gdisp->gimage);
|
||||
|
||||
if (create_hguide || create_vguide)
|
||||
gimp_image_flush (gdisp->gimage);
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "core/gimp.h"
|
||||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "config/gimpconfig.h"
|
||||
|
|
@ -283,14 +284,15 @@ text_tool_create_layer (GimpTextTool *text_tool)
|
|||
if (!layer)
|
||||
return;
|
||||
|
||||
undo_push_group_start (gimage, TEXT_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_TEXT,
|
||||
_("Add Text Layer"));
|
||||
|
||||
GIMP_DRAWABLE (layer)->offset_x = text_tool->click_x;
|
||||
GIMP_DRAWABLE (layer)->offset_y = text_tool->click_y;
|
||||
|
||||
gimp_image_add_layer (gimage, layer, -1);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
|
||||
gimp_image_flush (gimage);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include "core/gimpdrawable-transform.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-mask.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimplayer.h"
|
||||
#include "core/gimpmarshal.h"
|
||||
#include "core/gimptoolinfo.h"
|
||||
|
|
@ -823,7 +824,8 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
|
|||
gimp_tool_control_set_preserve (tool->control, TRUE);
|
||||
|
||||
/* Start a transform undo group */
|
||||
undo_push_group_start (gdisp->gimage, TRANSFORM_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gdisp->gimage, GIMP_UNDO_GROUP_TRANSFORM,
|
||||
_("Transform"));
|
||||
|
||||
/* With the old UI, if original is NULL, then this is the
|
||||
* first transformation. In the new UI, it is always so, right?
|
||||
|
|
@ -873,7 +875,7 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
|
|||
}
|
||||
|
||||
/* push the undo group end */
|
||||
undo_push_group_end (gdisp->gimage);
|
||||
gimp_image_undo_group_end (gdisp->gimage);
|
||||
|
||||
/* We're done dirtying the image, and would like to be restarted
|
||||
* if the image gets dirty while the tool exists
|
||||
|
|
|
|||
125
app/undo.c
125
app/undo.c
|
|
@ -69,23 +69,6 @@
|
|||
#include "libgimp/gimpintl.h"
|
||||
|
||||
|
||||
/**********************/
|
||||
/* group Undo funcs */
|
||||
|
||||
gboolean
|
||||
undo_push_group_start (GimpImage *gimage,
|
||||
GimpUndoType type)
|
||||
{
|
||||
return gimp_image_undo_group_start (gimage, type, NULL);
|
||||
}
|
||||
|
||||
gboolean
|
||||
undo_push_group_end (GimpImage *gimage)
|
||||
{
|
||||
return gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
|
||||
|
||||
/****************/
|
||||
/* Image Undo */
|
||||
/****************/
|
||||
|
|
@ -129,7 +112,7 @@ undo_push_image (GimpImage *gimage,
|
|||
|
||||
if ((new = gimp_image_undo_push (gimage,
|
||||
size, sizeof (ImageUndo),
|
||||
IMAGE_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE, NULL,
|
||||
TRUE,
|
||||
undo_pop_image,
|
||||
undo_free_image)))
|
||||
|
|
@ -195,7 +178,7 @@ undo_push_image_mod (GimpImage *gimage,
|
|||
|
||||
if ((new = gimp_image_undo_push (gimage,
|
||||
size, sizeof (ImageUndo),
|
||||
IMAGE_MOD_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE_MOD, NULL,
|
||||
TRUE,
|
||||
undo_pop_image,
|
||||
undo_free_image)))
|
||||
|
|
@ -335,7 +318,7 @@ undo_push_image_type (GimpImage *gimage)
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ImageTypeUndo),
|
||||
sizeof (ImageTypeUndo),
|
||||
IMAGE_TYPE_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE_TYPE, NULL,
|
||||
TRUE,
|
||||
undo_pop_image_type,
|
||||
undo_free_image_type)))
|
||||
|
|
@ -414,7 +397,7 @@ undo_push_image_size (GimpImage *gimage)
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ImageSizeUndo),
|
||||
sizeof (ImageSizeUndo),
|
||||
IMAGE_SIZE_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE_SIZE, NULL,
|
||||
TRUE,
|
||||
undo_pop_image_size,
|
||||
undo_free_image_size)))
|
||||
|
|
@ -503,7 +486,7 @@ undo_push_image_resolution (GimpImage *gimage)
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ResolutionUndo),
|
||||
sizeof (ResolutionUndo),
|
||||
IMAGE_RESOLUTION_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE_RESOLUTION, NULL,
|
||||
TRUE,
|
||||
undo_pop_image_resolution,
|
||||
undo_free_image_resolution)))
|
||||
|
|
@ -601,7 +584,7 @@ undo_push_image_qmask (GimpImage *gimage)
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (QmaskUndo),
|
||||
sizeof (QmaskUndo),
|
||||
IMAGE_QMASK_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE_QMASK, NULL,
|
||||
TRUE,
|
||||
undo_pop_image_qmask,
|
||||
undo_free_image_qmask)))
|
||||
|
|
@ -678,7 +661,7 @@ undo_push_image_guide (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (GuideUndo),
|
||||
sizeof (GuideUndo),
|
||||
IMAGE_GUIDE_UNDO, NULL,
|
||||
GIMP_UNDO_IMAGE_GUIDE, NULL,
|
||||
TRUE,
|
||||
undo_pop_image_guide,
|
||||
undo_free_image_guide)))
|
||||
|
|
@ -796,7 +779,7 @@ undo_push_mask (GimpImage *gimage,
|
|||
|
||||
if ((new = gimp_image_undo_push (gimage,
|
||||
size, sizeof (MaskUndo),
|
||||
MASK_UNDO, NULL,
|
||||
GIMP_UNDO_MASK, NULL,
|
||||
FALSE,
|
||||
undo_pop_mask,
|
||||
undo_free_mask)))
|
||||
|
|
@ -965,7 +948,7 @@ undo_push_item_rename (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ItemRenameUndo),
|
||||
sizeof (ItemRenameUndo),
|
||||
ITEM_RENAME_UNDO, NULL,
|
||||
GIMP_UNDO_ITEM_RENAME, NULL,
|
||||
TRUE,
|
||||
undo_pop_item_rename,
|
||||
undo_free_item_rename)))
|
||||
|
|
@ -1050,7 +1033,7 @@ undo_push_layer_add (GimpImage *gimage,
|
|||
gint prev_position,
|
||||
GimpLayer *prev_layer)
|
||||
{
|
||||
return undo_push_layer (gimage, LAYER_ADD_UNDO,
|
||||
return undo_push_layer (gimage, GIMP_UNDO_LAYER_ADD,
|
||||
layer, prev_position, prev_layer);
|
||||
}
|
||||
|
||||
|
|
@ -1060,7 +1043,7 @@ undo_push_layer_remove (GimpImage *gimage,
|
|||
gint prev_position,
|
||||
GimpLayer *prev_layer)
|
||||
{
|
||||
return undo_push_layer (gimage, LAYER_REMOVE_UNDO,
|
||||
return undo_push_layer (gimage, GIMP_UNDO_LAYER_REMOVE,
|
||||
layer, prev_position, prev_layer);
|
||||
}
|
||||
|
||||
|
|
@ -1074,8 +1057,8 @@ undo_push_layer (GimpImage *gimage,
|
|||
GimpUndo *new;
|
||||
gsize size;
|
||||
|
||||
g_return_val_if_fail (type == LAYER_ADD_UNDO ||
|
||||
type == LAYER_REMOVE_UNDO,
|
||||
g_return_val_if_fail (type == GIMP_UNDO_LAYER_ADD ||
|
||||
type == GIMP_UNDO_LAYER_REMOVE,
|
||||
FALSE);
|
||||
|
||||
size = sizeof (LayerUndo) + gimp_object_get_memsize (GIMP_OBJECT (layer));
|
||||
|
|
@ -1111,8 +1094,10 @@ undo_pop_layer (GimpUndo *undo,
|
|||
|
||||
lu = (LayerUndo *) undo->data;
|
||||
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO && undo->undo_type == LAYER_ADD_UNDO) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO && undo->undo_type == LAYER_REMOVE_UNDO))
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO &&
|
||||
undo->undo_type == GIMP_UNDO_LAYER_ADD) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO &&
|
||||
undo->undo_type == GIMP_UNDO_LAYER_REMOVE))
|
||||
{
|
||||
/* remove layer */
|
||||
|
||||
|
|
@ -1237,7 +1222,7 @@ undo_push_layer_mod (GimpImage *gimage,
|
|||
|
||||
if ((new = gimp_image_undo_push (gimage,
|
||||
size, sizeof (LayerModUndo),
|
||||
LAYER_MOD_UNDO, NULL,
|
||||
GIMP_UNDO_LAYER_MOD, NULL,
|
||||
TRUE,
|
||||
undo_pop_layer_mod,
|
||||
undo_free_layer_mod)))
|
||||
|
|
@ -1373,7 +1358,7 @@ undo_push_layer_mask_add (GimpImage *gimage,
|
|||
GimpLayer *layer,
|
||||
GimpLayerMask *mask)
|
||||
{
|
||||
return undo_push_layer_mask (gimage, LAYER_MASK_ADD_UNDO,
|
||||
return undo_push_layer_mask (gimage, GIMP_UNDO_LAYER_MASK_ADD,
|
||||
layer, mask);
|
||||
}
|
||||
|
||||
|
|
@ -1382,7 +1367,7 @@ undo_push_layer_mask_remove (GimpImage *gimage,
|
|||
GimpLayer *layer,
|
||||
GimpLayerMask *mask)
|
||||
{
|
||||
return undo_push_layer_mask (gimage, LAYER_MASK_REMOVE_UNDO,
|
||||
return undo_push_layer_mask (gimage, GIMP_UNDO_LAYER_MASK_REMOVE,
|
||||
layer, mask);
|
||||
}
|
||||
|
||||
|
|
@ -1395,8 +1380,8 @@ undo_push_layer_mask (GimpImage *gimage,
|
|||
GimpUndo *new;
|
||||
gsize size;
|
||||
|
||||
g_return_val_if_fail (type == LAYER_MASK_ADD_UNDO ||
|
||||
type == LAYER_MASK_REMOVE_UNDO,
|
||||
g_return_val_if_fail (type == GIMP_UNDO_LAYER_MASK_ADD ||
|
||||
type == GIMP_UNDO_LAYER_MASK_REMOVE,
|
||||
FALSE);
|
||||
|
||||
size = sizeof (LayerMaskUndo) + gimp_object_get_memsize (GIMP_OBJECT (mask));
|
||||
|
|
@ -1432,8 +1417,10 @@ undo_pop_layer_mask (GimpUndo *undo,
|
|||
|
||||
lmu = (LayerMaskUndo *) undo->data;
|
||||
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO && undo->undo_type == LAYER_MASK_ADD_UNDO) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO && undo->undo_type == LAYER_MASK_REMOVE_UNDO))
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO &&
|
||||
undo->undo_type == GIMP_UNDO_LAYER_MASK_ADD) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO &&
|
||||
undo->undo_type == GIMP_UNDO_LAYER_MASK_REMOVE))
|
||||
{
|
||||
/* remove layer mask */
|
||||
|
||||
|
|
@ -1492,7 +1479,7 @@ undo_push_layer_reposition (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (LayerRepositionUndo),
|
||||
sizeof (LayerRepositionUndo),
|
||||
LAYER_REPOSITION_UNDO, NULL,
|
||||
GIMP_UNDO_LAYER_REPOSITION, NULL,
|
||||
TRUE,
|
||||
undo_pop_layer_reposition,
|
||||
undo_free_layer_reposition)))
|
||||
|
|
@ -1570,7 +1557,7 @@ undo_push_layer_displace (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (LayerDisplaceUndo),
|
||||
sizeof (LayerDisplaceUndo),
|
||||
LAYER_DISPLACE_UNDO, NULL,
|
||||
GIMP_UNDO_LAYER_DISPLACE, NULL,
|
||||
TRUE,
|
||||
undo_pop_layer_displace,
|
||||
undo_free_layer_displace)))
|
||||
|
|
@ -1692,7 +1679,7 @@ undo_push_channel_add (GimpImage *gimage,
|
|||
gint prev_position,
|
||||
GimpChannel *prev_channel)
|
||||
{
|
||||
return undo_push_channel (gimage, CHANNEL_ADD_UNDO,
|
||||
return undo_push_channel (gimage, GIMP_UNDO_CHANNEL_ADD,
|
||||
channel, prev_position, prev_channel);
|
||||
}
|
||||
|
||||
|
|
@ -1702,7 +1689,7 @@ undo_push_channel_remove (GimpImage *gimage,
|
|||
gint prev_position,
|
||||
GimpChannel *prev_channel)
|
||||
{
|
||||
return undo_push_channel (gimage, CHANNEL_REMOVE_UNDO,
|
||||
return undo_push_channel (gimage, GIMP_UNDO_CHANNEL_REMOVE,
|
||||
channel, prev_position, prev_channel);
|
||||
}
|
||||
|
||||
|
|
@ -1716,8 +1703,8 @@ undo_push_channel (GimpImage *gimage,
|
|||
GimpUndo *new;
|
||||
gsize size;
|
||||
|
||||
g_return_val_if_fail (type == CHANNEL_ADD_UNDO ||
|
||||
type == CHANNEL_REMOVE_UNDO,
|
||||
g_return_val_if_fail (type == GIMP_UNDO_CHANNEL_ADD ||
|
||||
type == GIMP_UNDO_CHANNEL_REMOVE,
|
||||
FALSE);
|
||||
|
||||
size = sizeof (ChannelUndo) + gimp_object_get_memsize (GIMP_OBJECT (channel));
|
||||
|
|
@ -1754,8 +1741,10 @@ undo_pop_channel (GimpUndo *undo,
|
|||
|
||||
cu = (ChannelUndo *) undo->data;
|
||||
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO && undo->undo_type == CHANNEL_ADD_UNDO) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO && undo->undo_type == CHANNEL_REMOVE_UNDO))
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO &&
|
||||
undo->undo_type == GIMP_UNDO_CHANNEL_ADD) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO &&
|
||||
undo->undo_type == GIMP_UNDO_CHANNEL_REMOVE))
|
||||
{
|
||||
/* remove channel */
|
||||
|
||||
|
|
@ -1849,7 +1838,7 @@ undo_push_channel_mod (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
size,
|
||||
sizeof (ChannelModUndo),
|
||||
CHANNEL_MOD_UNDO, NULL,
|
||||
GIMP_UNDO_CHANNEL_MOD, NULL,
|
||||
TRUE,
|
||||
undo_pop_channel_mod,
|
||||
undo_free_channel_mod)))
|
||||
|
|
@ -1957,7 +1946,7 @@ undo_push_channel_reposition (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ChannelRepositionUndo),
|
||||
sizeof (ChannelRepositionUndo),
|
||||
CHANNEL_REPOSITION_UNDO, NULL,
|
||||
GIMP_UNDO_CHANNEL_REPOSITION, NULL,
|
||||
TRUE,
|
||||
undo_pop_channel_reposition,
|
||||
undo_free_channel_reposition)))
|
||||
|
|
@ -2036,7 +2025,7 @@ undo_push_vectors_add (GimpImage *gimage,
|
|||
gint prev_position,
|
||||
GimpVectors *prev_vectors)
|
||||
{
|
||||
return undo_push_vectors (gimage, VECTORS_ADD_UNDO,
|
||||
return undo_push_vectors (gimage, GIMP_UNDO_VECTORS_ADD,
|
||||
vectors, prev_position, prev_vectors);
|
||||
}
|
||||
|
||||
|
|
@ -2046,7 +2035,7 @@ undo_push_vectors_remove (GimpImage *gimage,
|
|||
gint prev_position,
|
||||
GimpVectors *prev_vectors)
|
||||
{
|
||||
return undo_push_vectors (gimage, VECTORS_REMOVE_UNDO,
|
||||
return undo_push_vectors (gimage, GIMP_UNDO_VECTORS_REMOVE,
|
||||
vectors, prev_position, prev_vectors);
|
||||
}
|
||||
|
||||
|
|
@ -2060,8 +2049,8 @@ undo_push_vectors (GimpImage *gimage,
|
|||
GimpUndo *new;
|
||||
gsize size;
|
||||
|
||||
g_return_val_if_fail (type == VECTORS_ADD_UNDO ||
|
||||
type == VECTORS_REMOVE_UNDO,
|
||||
g_return_val_if_fail (type == GIMP_UNDO_VECTORS_ADD ||
|
||||
type == GIMP_UNDO_VECTORS_REMOVE,
|
||||
FALSE);
|
||||
|
||||
size = sizeof (VectorsUndo) + gimp_object_get_memsize (GIMP_OBJECT (vectors));
|
||||
|
|
@ -2098,8 +2087,10 @@ undo_pop_vectors (GimpUndo *undo,
|
|||
|
||||
vu = (VectorsUndo *) undo->data;
|
||||
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO && undo->undo_type == VECTORS_ADD_UNDO) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO && undo->undo_type == VECTORS_REMOVE_UNDO))
|
||||
if ((undo_mode == GIMP_UNDO_MODE_UNDO &&
|
||||
undo->undo_type == GIMP_UNDO_VECTORS_ADD) ||
|
||||
(undo_mode == GIMP_UNDO_MODE_REDO &&
|
||||
undo->undo_type == GIMP_UNDO_VECTORS_REMOVE))
|
||||
{
|
||||
/* remove vectors */
|
||||
|
||||
|
|
@ -2179,7 +2170,7 @@ undo_push_vectors_mod (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
size,
|
||||
sizeof (VectorsModUndo),
|
||||
VECTORS_MOD_UNDO, NULL,
|
||||
GIMP_UNDO_VECTORS_MOD, NULL,
|
||||
TRUE,
|
||||
undo_pop_vectors_mod,
|
||||
undo_free_vectors_mod)))
|
||||
|
|
@ -2268,7 +2259,7 @@ undo_push_vectors_reposition (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (VectorsRepositionUndo),
|
||||
sizeof (VectorsRepositionUndo),
|
||||
VECTORS_REPOSITION_UNDO, NULL,
|
||||
GIMP_UNDO_VECTORS_REPOSITION, NULL,
|
||||
TRUE,
|
||||
undo_pop_vectors_reposition,
|
||||
undo_free_vectors_reposition)))
|
||||
|
|
@ -2345,7 +2336,7 @@ undo_push_fs_to_layer (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (FStoLayerUndo),
|
||||
sizeof (FStoLayerUndo),
|
||||
FS_TO_LAYER_UNDO, NULL,
|
||||
GIMP_UNDO_FS_TO_LAYER, NULL,
|
||||
TRUE,
|
||||
undo_pop_fs_to_layer,
|
||||
undo_free_fs_to_layer)))
|
||||
|
|
@ -2469,7 +2460,7 @@ undo_push_fs_rigor (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (gint32),
|
||||
sizeof (gint32),
|
||||
FS_RIGOR_UNDO, NULL,
|
||||
GIMP_UNDO_FS_RIGOR, NULL,
|
||||
FALSE,
|
||||
undo_pop_fs_rigor,
|
||||
undo_free_fs_rigor)))
|
||||
|
|
@ -2562,7 +2553,7 @@ undo_push_fs_relax (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (gint32),
|
||||
sizeof (gint32),
|
||||
FS_RELAX_UNDO, NULL,
|
||||
GIMP_UNDO_FS_RELAX, NULL,
|
||||
FALSE,
|
||||
undo_pop_fs_relax,
|
||||
undo_free_fs_relax)))
|
||||
|
|
@ -2671,7 +2662,7 @@ undo_push_transform (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (TransformUndo),
|
||||
sizeof (TransformUndo),
|
||||
TRANSFORM_UNDO, NULL,
|
||||
GIMP_UNDO_TRANSFORM, NULL,
|
||||
FALSE,
|
||||
undo_pop_transform,
|
||||
undo_free_transform)))
|
||||
|
|
@ -2799,7 +2790,7 @@ undo_push_paint (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (PaintUndo),
|
||||
sizeof (PaintUndo),
|
||||
PAINT_UNDO, NULL,
|
||||
GIMP_UNDO_PAINT, NULL,
|
||||
FALSE,
|
||||
undo_pop_paint,
|
||||
undo_free_paint)))
|
||||
|
|
@ -2895,7 +2886,7 @@ undo_push_image_parasite (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ParasiteUndo),
|
||||
sizeof (ParasiteUndo),
|
||||
PARASITE_ATTACH_UNDO, NULL,
|
||||
GIMP_UNDO_PARASITE_ATTACH, NULL,
|
||||
TRUE,
|
||||
undo_pop_parasite,
|
||||
undo_free_parasite)))
|
||||
|
|
@ -2925,7 +2916,7 @@ undo_push_image_parasite_remove (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ParasiteUndo),
|
||||
sizeof (ParasiteUndo),
|
||||
PARASITE_REMOVE_UNDO, NULL,
|
||||
GIMP_UNDO_PARASITE_REMOVE, NULL,
|
||||
TRUE,
|
||||
undo_pop_parasite,
|
||||
undo_free_parasite)))
|
||||
|
|
@ -2956,7 +2947,7 @@ undo_push_item_parasite (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ParasiteUndo),
|
||||
sizeof (ParasiteUndo),
|
||||
PARASITE_ATTACH_UNDO, NULL,
|
||||
GIMP_UNDO_PARASITE_ATTACH, NULL,
|
||||
TRUE,
|
||||
undo_pop_parasite,
|
||||
undo_free_parasite)))
|
||||
|
|
@ -2986,7 +2977,7 @@ undo_push_item_parasite_remove (GimpImage *gimage,
|
|||
if ((new = gimp_image_undo_push (gimage,
|
||||
sizeof (ParasiteUndo),
|
||||
sizeof (ParasiteUndo),
|
||||
PARASITE_REMOVE_UNDO, NULL,
|
||||
GIMP_UNDO_PARASITE_REMOVE, NULL,
|
||||
TRUE,
|
||||
undo_pop_parasite,
|
||||
undo_free_parasite)))
|
||||
|
|
@ -3097,7 +3088,7 @@ undo_push_cantundo (GimpImage *gimage,
|
|||
|
||||
if ((new = gimp_image_undo_push (gimage,
|
||||
0, 0,
|
||||
CANT_UNDO, NULL,
|
||||
GIMP_UNDO_CANT, NULL,
|
||||
TRUE,
|
||||
undo_pop_cantundo,
|
||||
NULL)))
|
||||
|
|
|
|||
|
|
@ -20,13 +20,6 @@
|
|||
#define __UNDO_H__
|
||||
|
||||
|
||||
/* undo groups */
|
||||
|
||||
gboolean undo_push_group_start (GimpImage *gimage,
|
||||
GimpUndoType undo_type);
|
||||
gboolean undo_push_group_end (GimpImage *gimage);
|
||||
|
||||
|
||||
/* image undos */
|
||||
|
||||
gboolean undo_push_image (GimpImage *gimage,
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ undo_history_set_pixmap_idle (gpointer data)
|
|||
|
||||
utype = gimp_undo_stack_peek (idle->gimage->undo_stack)->undo_type;
|
||||
|
||||
if ((utype != MASK_UNDO && utype != IMAGE_QMASK_UNDO) ||
|
||||
if ((utype != GIMP_UNDO_MASK && utype != GIMP_UNDO_IMAGE_QMASK) ||
|
||||
(mbuf = mask_render_preview (idle->gimage, &width, &height)) == NULL)
|
||||
{
|
||||
buf = gimp_viewable_get_new_preview (GIMP_VIEWABLE (idle->gimage),
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpdrawable-bucket-fill.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimplayer.h"
|
||||
#include "core/gimpmarshal.h"
|
||||
#include "core/gimppattern.h"
|
||||
|
|
@ -203,7 +204,8 @@ gimp_drawable_list_view_new_dropped (GimpItemListView *view,
|
|||
GimpToolInfo *tool_info;
|
||||
GimpContext *context;
|
||||
|
||||
undo_push_group_start (view->gimage, EDIT_PASTE_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (view->gimage, GIMP_UNDO_GROUP_EDIT_PASTE,
|
||||
_("New Layer"));
|
||||
|
||||
view->new_item_func (view->gimage, NULL, FALSE);
|
||||
|
||||
|
|
@ -231,7 +233,7 @@ gimp_drawable_list_view_new_dropped (GimpItemListView *view,
|
|||
FALSE /* no seed fill */,
|
||||
FALSE, 0.0, FALSE, 0.0, 0.0 /* fill params */);
|
||||
|
||||
undo_push_group_end (view->gimage);
|
||||
gimp_image_undo_group_end (view->gimage);
|
||||
|
||||
gimp_image_flush (view->gimage);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "core/gimpdrawable.h"
|
||||
#include "core/gimpdrawable-bucket-fill.h"
|
||||
#include "core/gimpimage.h"
|
||||
#include "core/gimpimage-undo.h"
|
||||
#include "core/gimplayer.h"
|
||||
#include "core/gimpmarshal.h"
|
||||
#include "core/gimppattern.h"
|
||||
|
|
@ -203,7 +204,8 @@ gimp_drawable_list_view_new_dropped (GimpItemListView *view,
|
|||
GimpToolInfo *tool_info;
|
||||
GimpContext *context;
|
||||
|
||||
undo_push_group_start (view->gimage, EDIT_PASTE_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (view->gimage, GIMP_UNDO_GROUP_EDIT_PASTE,
|
||||
_("New Layer"));
|
||||
|
||||
view->new_item_func (view->gimage, NULL, FALSE);
|
||||
|
||||
|
|
@ -231,7 +233,7 @@ gimp_drawable_list_view_new_dropped (GimpItemListView *view,
|
|||
FALSE /* no seed fill */,
|
||||
FALSE, 0.0, FALSE, 0.0, 0.0 /* fill params */);
|
||||
|
||||
undo_push_group_end (view->gimage);
|
||||
gimp_image_undo_group_end (view->gimage);
|
||||
|
||||
gimp_image_flush (view->gimage);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ sub layer_arg () {{
|
|||
}}
|
||||
|
||||
sub layer_change_invoke {
|
||||
my ($undo, $code) = @_;
|
||||
my ($undo, $undo_name, $code) = @_;
|
||||
my $indent = 6;
|
||||
|
||||
chomp $code;
|
||||
|
|
@ -49,7 +49,8 @@ sub layer_change_invoke {
|
|||
{
|
||||
floating_layer = gimp_image_floating_sel (gimage);
|
||||
|
||||
undo_push_group_start (gimage, ${undo}_UNDO_GROUP);
|
||||
gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_${undo},
|
||||
_("${undo_name}"));
|
||||
|
||||
if (floating_layer)
|
||||
floating_sel_relax (floating_layer, TRUE);
|
||||
|
|
@ -59,7 +60,7 @@ sub layer_change_invoke {
|
|||
if (floating_layer)
|
||||
floating_sel_rigor (floating_layer, TRUE);
|
||||
|
||||
undo_push_group_end (gimage);
|
||||
gimp_image_undo_group_end (gimage);
|
||||
}
|
||||
else
|
||||
success = FALSE;
|
||||
|
|
@ -98,10 +99,10 @@ HELP
|
|||
}
|
||||
|
||||
if ($op eq 'scale') {
|
||||
&layer_change_invoke("LAYER_\U$op\E",
|
||||
&layer_change_invoke("LAYER_\U$op\E", 'Scale Layer',
|
||||
"gimp_layer_$op (layer, new_width, new_height, gimp->config->interpolation_type, $args);");
|
||||
} else {
|
||||
&layer_change_invoke("LAYER_\U$op\E",
|
||||
&layer_change_invoke("LAYER_\U$op\E", 'Resize Layer',
|
||||
"gimp_layer_$op (layer, new_width, new_height, $args);");
|
||||
}
|
||||
}
|
||||
|
|
@ -398,7 +399,7 @@ HELP
|
|||
desc => "Offset in $_ direction" }
|
||||
}
|
||||
|
||||
&layer_change_invoke('LAYER_LINKED', <<'CODE');
|
||||
&layer_change_invoke('LAYER_LINKED', 'Move Layer', <<'CODE');
|
||||
{
|
||||
for (layer_list = GIMP_LIST (gimage->layers)->list;
|
||||
layer_list;
|
||||
|
|
@ -602,8 +603,8 @@ HELP
|
|||
CODE
|
||||
|
||||
@headers = qw( "config/gimpcoreconfig.h"
|
||||
"core/gimplist.h" "core/gimp.h"
|
||||
"pdb_glue.h");
|
||||
"core/gimplist.h" "core/gimp.h" "core/gimpimage-undo.h"
|
||||
"pdb_glue.h" "libgimp/gimpintl.h");
|
||||
|
||||
unshift @procs, qw(layer_new layer_copy layer_create_mask layer_scale
|
||||
layer_resize layer_delete layer_translate layer_add_alpha
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ HELP
|
|||
|
||||
&inargs;
|
||||
|
||||
%invoke = ( code => 'undo_push_group_start (gimage, MISC_UNDO_GROUP);' );
|
||||
%invoke = ( code => 'gimp_image_undo_group_start (gimage, GIMP_UNDO_GROUP_MISC, _("Plug-In"));' );
|
||||
}
|
||||
|
||||
sub undo_push_group_end {
|
||||
|
|
@ -54,10 +54,10 @@ HELP
|
|||
|
||||
&inargs;
|
||||
|
||||
%invoke = ( code => 'undo_push_group_end (gimage);' );
|
||||
%invoke = ( code => 'gimp_image_undo_group_end (gimage);' );
|
||||
}
|
||||
|
||||
@headers = qw("undo.h");
|
||||
@headers = qw("core/gimpimage-undo.h" "libgimp/gimpintl.h");
|
||||
|
||||
@procs = qw(undo_push_group_start undo_push_group_end);
|
||||
%exports = (app => [@procs], lib => [@procs]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue