Commit a33f06e7 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

removed the _push_undo() and _invalidate() wrappers.

2003-09-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-mask.[ch]: removed the _push_undo() and
	_invalidate() wrappers.

	* app/core/gimpimage-mask-select.c
	* app/core/gimpimage-undo-push.c
	* app/core/gimplayer-floating-sel.c
	* app/tools/gimptransformtool.c: changed accordingly.
parent f9f5089f
2003-09-04 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-mask.[ch]: removed the _push_undo() and
_invalidate() wrappers.
* app/core/gimpimage-mask-select.c
* app/core/gimpimage-undo-push.c
* app/core/gimplayer-floating-sel.c
* app/tools/gimptransformtool.c: changed accordingly.
2003-09-04 Michael Natterer <mitch@gimp.org>
 
* app/core/gimpdrawable.[ch]: added new pure virtual function
......@@ -27,7 +27,6 @@
#include "gimpchannel.h"
#include "gimpimage.h"
#include "gimpimage-contiguous-region.h"
#include "gimpimage-mask.h"
#include "gimpimage-mask-select.h"
#include "gimplayer.h"
#include "gimpscanconvert.h"
......@@ -59,7 +58,7 @@ gimp_image_mask_select_rectangle (GimpImage *gimage,
if (op == GIMP_CHANNEL_OP_REPLACE)
gimp_channel_clear (selection, _("Rect Select"), TRUE);
else
gimp_image_mask_push_undo (gimage, _("Rect Select"));
gimp_channel_push_undo (selection, _("Rect Select"));
/* if feathering for rect, make a new mask with the
* rectangle and feather that with the old mask
......@@ -110,7 +109,7 @@ gimp_image_mask_select_ellipse (GimpImage *gimage,
if (op == GIMP_CHANNEL_OP_REPLACE)
gimp_channel_clear (selection, _("Ellipse Select"), TRUE);
else
gimp_image_mask_push_undo (gimage, _("Ellipse Select"));
gimp_channel_push_undo (selection, _("Ellipse Select"));
/* if feathering for rect, make a new mask with the
* rectangle and feather that with the old mask
......@@ -165,7 +164,7 @@ gimp_image_mask_select_polygon (GimpImage *gimage,
if (op == GIMP_CHANNEL_OP_REPLACE)
gimp_channel_clear (selection, undo_desc, TRUE);
else
gimp_image_mask_push_undo (gimage, undo_desc);
gimp_channel_push_undo (selection, undo_desc);
#define SUPERSAMPLE 3
......@@ -224,7 +223,7 @@ gimp_image_mask_select_vectors (GimpImage *gimage,
if (op == GIMP_CHANNEL_OP_REPLACE)
gimp_channel_clear (selection, undo_desc, TRUE);
else
gimp_image_mask_push_undo (gimage, undo_desc);
gimp_channel_push_undo (selection, undo_desc);
#define SUPERSAMPLE 3
......@@ -303,7 +302,7 @@ gimp_image_mask_select_channel (GimpImage *gimage,
if (op == GIMP_CHANNEL_OP_REPLACE)
gimp_channel_clear (selection, undo_desc, TRUE);
else
gimp_image_mask_push_undo (gimage, undo_desc);
gimp_channel_push_undo (selection, undo_desc);
if (feather || op == GIMP_CHANNEL_OP_INTERSECT)
{
......
......@@ -27,7 +27,6 @@
#include "gimpchannel.h"
#include "gimpimage.h"
#include "gimpimage-contiguous-region.h"
#include "gimpimage-mask.h"
#include "gimpimage-mask-select.h"
#include "gimplayer.h"
#include "gimpscanconvert.h"
......@@ -59,7 +58,7 @@ gimp_image_mask_select_rectangle (GimpImage *gimage,
if (op == GIMP_CHANNEL_OP_REPLACE)
gimp_channel_clear (selection, _("Rect Select"), TRUE);
else
gimp_image_mask_push_undo (gimage, _("Rect Select"));
gimp_channel_push_undo (selection, _("Rect Select"));
/* if feathering for rect, make a new mask with the
* rectangle and feather that with the old mask
......@@ -110,7 +109,7 @@ gimp_image_mask_select_ellipse (GimpImage *gimage,
if (op == GIMP_CHANNEL_OP_REPLACE)
gimp_channel_clear (selection, _("Ellipse Select"), TRUE);
else
gimp_image_mask_push_undo (gimage, _("Ellipse Select"));
gimp_channel_push_undo (selection, _("Ellipse Select"));
/* if feathering for rect, make a new mask with the
* rectangle and feather that with the old mask
......@@ -165,7 +164,7 @@ gimp_image_mask_select_polygon (GimpImage *gimage,
if (op == GIMP_CHANNEL_OP_REPLACE)
gimp_channel_clear (selection, undo_desc, TRUE);
else
gimp_image_mask_push_undo (gimage, undo_desc);
gimp_channel_push_undo (selection, undo_desc);
#define SUPERSAMPLE 3
......@@ -224,7 +223,7 @@ gimp_image_mask_select_vectors (GimpImage *gimage,
if (op == GIMP_CHANNEL_OP_REPLACE)
gimp_channel_clear (selection, undo_desc, TRUE);
else
gimp_image_mask_push_undo (gimage, undo_desc);
gimp_channel_push_undo (selection, undo_desc);
#define SUPERSAMPLE 3
......@@ -303,7 +302,7 @@ gimp_image_mask_select_channel (GimpImage *gimage,
if (op == GIMP_CHANNEL_OP_REPLACE)
gimp_channel_clear (selection, undo_desc, TRUE);
else
gimp_image_mask_push_undo (gimage, undo_desc);
gimp_channel_push_undo (selection, undo_desc);
if (feather || op == GIMP_CHANNEL_OP_INTERSECT)
{
......
......@@ -46,27 +46,6 @@
/* public functions */
void
gimp_image_mask_push_undo (GimpImage *gimage,
const gchar *undo_desc)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
gimp_channel_push_undo (gimp_image_get_mask (gimage), undo_desc);
}
void
gimp_image_mask_invalidate (GimpImage *gimage)
{
g_return_if_fail (GIMP_IS_IMAGE (gimage));
gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (gimp_image_get_mask (gimage)));
}
TileManager *
gimp_image_mask_extract (GimpImage *gimage,
GimpDrawable *drawable,
......@@ -300,7 +279,8 @@ gimp_image_mask_load (GimpImage *gimage,
g_return_if_fail (GIMP_IS_IMAGE (gimage));
g_return_if_fail (GIMP_IS_CHANNEL (channel));
gimp_image_mask_push_undo (gimage, _("Selection from Channel"));
gimp_channel_push_undo (gimp_image_get_mask (gimage),
_("Selection from Channel"));
/* load the specified channel to the gimage mask */
gimp_channel_load (gimp_image_get_mask (gimage), channel, FALSE);
......
......@@ -20,13 +20,6 @@
#define __GIMP_IMAGE_MASK_H__
/* pure wrappers around the resp. GimpSelection functions: */
void gimp_image_mask_push_undo (GimpImage *gimage,
const gchar *undo_desc);
void gimp_image_mask_invalidate (GimpImage *gimage);
/* really implemented here: */
TileManager * gimp_image_mask_extract (GimpImage *gimage,
......
......@@ -439,7 +439,7 @@ undo_pop_image_size (GimpUndo *undo,
undo->gimage->height = height;
gimp_image_projection_allocate (undo->gimage);
gimp_image_mask_invalidate (undo->gimage);
gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (gimp_image_get_mask (undo->gimage)));
if (undo->gimage->width != isu->width ||
undo->gimage->height != isu->height)
......@@ -1029,7 +1029,7 @@ undo_pop_mask (GimpUndo *undo,
if (channel == gimp_image_get_mask (undo->gimage))
{
/* invalidate the current bounds and boundary of the mask */
gimp_image_mask_invalidate (undo->gimage);
gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (gimp_image_get_mask (undo->gimage)));
}
else
{
......@@ -2355,7 +2355,7 @@ undo_pop_channel_mod (GimpUndo *undo,
else
{
/* invalidate the current bounds and boundary of the mask */
gimp_image_mask_invalidate (undo->gimage);
gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (gimp_image_get_mask (undo->gimage)));
}
tiles = cmu->tiles;
......
......@@ -152,7 +152,7 @@ floating_sel_anchor (GimpLayer *layer)
gimp_image_undo_group_end (gimage);
/* invalidate the boundaries */
gimp_image_mask_invalidate (gimage);
gimp_drawable_invalidate_boundary (GIMP_DRAWABLE (gimp_image_get_mask (gimage)));
gimp_image_floating_selection_changed (gimage);
}
......
......@@ -994,7 +994,7 @@ gimp_transform_tool_doit (GimpTransformTool *tr_tool,
case GIMP_TRANSFORM_TYPE_SELECTION:
if (new_tiles)
{
gimp_image_mask_push_undo (gdisp->gimage, NULL);
gimp_channel_push_undo (gimp_image_get_mask (gdisp->gimage), NULL);
tile_manager_unref (GIMP_DRAWABLE (active_item)->tiles);
GIMP_DRAWABLE (active_item)->tiles = new_tiles;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment