mirror of https://github.com/GNOME/gimp.git
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:
parent
7414d0bc16
commit
4bdf294b94
|
@ -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>
|
2008-09-24 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* plug-ins/pygimp/pygimp-drawable.c
|
* plug-ins/pygimp/pygimp-drawable.c
|
||||||
|
|
|
@ -94,6 +94,18 @@ drw_merge_shadow(PyGimpDrawable *self, PyObject *args, PyObject *kwargs)
|
||||||
return Py_None;
|
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 *
|
static PyObject *
|
||||||
drw_fill(PyGimpDrawable *self, PyObject *args, PyObject *kwargs)
|
drw_fill(PyGimpDrawable *self, PyObject *args, PyObject *kwargs)
|
||||||
|
@ -890,6 +902,7 @@ static PyMethodDef drw_methods[] = {
|
||||||
{"flush", (PyCFunction)drw_flush, METH_NOARGS},
|
{"flush", (PyCFunction)drw_flush, METH_NOARGS},
|
||||||
{"update", (PyCFunction)drw_update, METH_VARARGS},
|
{"update", (PyCFunction)drw_update, METH_VARARGS},
|
||||||
{"merge_shadow", (PyCFunction)drw_merge_shadow, METH_VARARGS | METH_KEYWORDS},
|
{"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},
|
{"fill", (PyCFunction)drw_fill, METH_VARARGS | METH_KEYWORDS},
|
||||||
{"get_tile", (PyCFunction)drw_get_tile, METH_VARARGS | METH_KEYWORDS},
|
{"get_tile", (PyCFunction)drw_get_tile, METH_VARARGS | METH_KEYWORDS},
|
||||||
{"get_tile2", (PyCFunction)drw_get_tile2, METH_VARARGS | METH_KEYWORDS},
|
{"get_tile2", (PyCFunction)drw_get_tile2, METH_VARARGS | METH_KEYWORDS},
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#undef GIMP_DISABLE_DEPRECATED
|
||||||
#include "pygimp.h"
|
#include "pygimp.h"
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -500,7 +501,7 @@ static PyObject *
|
||||||
img_free_shadow(PyGimpImage *self)
|
img_free_shadow(PyGimpImage *self)
|
||||||
{
|
{
|
||||||
if (!gimp_image_free_shadow(self->ID)) {
|
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);
|
self->ID);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue