Commit 4bdf294b authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

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
parent 7414d0bc
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
......
......@@ -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},
......
......@@ -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;
}
......
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