undef GIMP_DISABLE_DEPRECATED as we need the deprecated

2008-09-24  Sven Neumann  <sven@gimp.org>

	* plug-ins/pygimp/pygimp-image.c: undef GIMP_DISABLE_DEPRECATED
	as we need the deprecated gimp_image_free_shadow() here.

	* plug-ins/pygimp/pygimp-drawable.c: added 
Drawable.free_shadow().


svn path=/trunk/; revision=27043
This commit is contained in:
Sven Neumann 2008-09-24 11:17:12 +00:00 committed by Sven Neumann
parent 7414d0bc16
commit 4bdf294b94
3 changed files with 22 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2008-09-24 Sven Neumann <sven@gimp.org>
* plug-ins/pygimp/pygimp-image.c: undef GIMP_DISABLE_DEPRECATED
as we need the deprecated gimp_image_free_shadow() here.
* plug-ins/pygimp/pygimp-drawable.c: added Drawable.free_shadow().
2008-09-24 Sven Neumann <sven@gimp.org>
* plug-ins/pygimp/pygimp-drawable.c

View File

@ -94,6 +94,18 @@ drw_merge_shadow(PyGimpDrawable *self, PyObject *args, PyObject *kwargs)
return Py_None;
}
static PyObject *
drw_free_shadow(PyGimpDrawable *self)
{
if (!gimp_drawable_free_shadow(self->ID)) {
PyErr_Format(pygimp_error, "could not free shadow tiles on drawable (ID %d)",
self->ID);
return NULL;
}
Py_INCREF(Py_None);
return Py_None;
}
static PyObject *
drw_fill(PyGimpDrawable *self, PyObject *args, PyObject *kwargs)
@ -890,6 +902,7 @@ static PyMethodDef drw_methods[] = {
{"flush", (PyCFunction)drw_flush, METH_NOARGS},
{"update", (PyCFunction)drw_update, METH_VARARGS},
{"merge_shadow", (PyCFunction)drw_merge_shadow, METH_VARARGS | METH_KEYWORDS},
{"free_shadow", (PyCFunction)drw_free_shadow, METH_NOARGS},
{"fill", (PyCFunction)drw_fill, METH_VARARGS | METH_KEYWORDS},
{"get_tile", (PyCFunction)drw_get_tile, METH_VARARGS | METH_KEYWORDS},
{"get_tile2", (PyCFunction)drw_get_tile2, METH_VARARGS | METH_KEYWORDS},

View File

@ -21,6 +21,7 @@
# include <config.h>
#endif
#undef GIMP_DISABLE_DEPRECATED
#include "pygimp.h"
static PyObject *
@ -500,7 +501,7 @@ static PyObject *
img_free_shadow(PyGimpImage *self)
{
if (!gimp_image_free_shadow(self->ID)) {
PyErr_Format(pygimp_error, "could not free shadow on image (ID %d)",
PyErr_Format(pygimp_error, "could not free shadow tiles on image (ID %d)",
self->ID);
return NULL;
}