let gimp_drawable_invert() take a GimpProgress parameter.

2007-12-30  Sven Neumann  <sven@gimp.org>

	* app/core/gimpdrawable-invert.[ch]: let gimp_drawable_invert()
	take a GimpProgress parameter.

	* tools/pdbgen/pdb/color.pdb
	* app/pdb/color_cmds.c
	* app/actions/drawable-commands.c: changed accordingly.


svn path=/trunk/; revision=24473
This commit is contained in:
Sven Neumann 2007-12-29 23:04:37 +00:00 committed by Sven Neumann
parent 529fd5e629
commit ff768c5261
6 changed files with 21 additions and 5 deletions

View File

@ -1,3 +1,12 @@
2007-12-30 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-invert.[ch]: let gimp_drawable_invert()
take a GimpProgress parameter.
* tools/pdbgen/pdb/color.pdb
* app/pdb/color_cmds.c
* app/actions/drawable-commands.c: changed accordingly.
2007-12-29 Michael Natterer <mitch@gimp.org>
* app/actions/Makefile.am

View File

@ -34,6 +34,7 @@
#include "core/gimpitem-linked.h"
#include "core/gimpitemundo.h"
#include "core/gimplayermask.h"
#include "core/gimpprogress.h"
#include "dialogs/desaturate-dialog.h"
#include "dialogs/offset-dialog.h"
@ -114,8 +115,10 @@ drawable_invert_cmd_callback (GtkAction *action,
{
GimpImage *image;
GimpDrawable *drawable;
GimpDisplay *display;
GtkWidget *widget;
return_if_no_drawable (image, drawable, data);
return_if_no_display (display, data);
return_if_no_widget (widget, data);
if (gimp_drawable_is_indexed (drawable))
@ -125,7 +128,7 @@ drawable_invert_cmd_callback (GtkAction *action,
return;
}
gimp_drawable_invert (drawable);
gimp_drawable_invert (drawable, GIMP_PROGRESS (display));
gimp_image_flush (image);
}

View File

@ -29,12 +29,14 @@
#include "gimpdrawable.h"
#include "gimpdrawable-invert.h"
#include "gimpprogress.h"
#include "gimp-intl.h"
void
gimp_drawable_invert (GimpDrawable *drawable)
gimp_drawable_invert (GimpDrawable *drawable,
GimpProgress *progress)
{
PixelRegion srcPR, destPR;
gint x, y, width, height;
@ -42,6 +44,7 @@ gimp_drawable_invert (GimpDrawable *drawable)
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
if (! gimp_drawable_mask_intersect (drawable, &x, &y, &width, &height))
return;

View File

@ -20,7 +20,8 @@
#define __GIMP_DRAWABLE_INVERT_H__
void gimp_drawable_invert (GimpDrawable *drawable);
void gimp_drawable_invert (GimpDrawable *drawable,
GimpProgress *progress);
#endif /* __GIMP_DRAWABLE_INVERT_H__ */

View File

@ -363,7 +363,7 @@ invert_invoker (GimpProcedure *procedure,
success = FALSE;
if (success)
gimp_drawable_invert (drawable);
gimp_drawable_invert (drawable, progress);
}
return gimp_procedure_get_return_values (procedure, success);

View File

@ -388,7 +388,7 @@ HELP
success = FALSE;
if (success)
gimp_drawable_invert (drawable);
gimp_drawable_invert (drawable, progress);
}
CODE
);