gimp r27043 - in trunk: . plug-ins/pygimp
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27043 - in trunk: . plug-ins/pygimp
- Date: Wed, 24 Sep 2008 11:17:12 +0000 (UTC)
Author: neo
Date: Wed Sep 24 11:17:12 2008
New Revision: 27043
URL: http://svn.gnome.org/viewvc/gimp?rev=27043&view=rev
Log:
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().
Modified:
trunk/ChangeLog
trunk/plug-ins/pygimp/pygimp-drawable.c
trunk/plug-ins/pygimp/pygimp-image.c
Modified: trunk/plug-ins/pygimp/pygimp-drawable.c
==============================================================================
--- trunk/plug-ins/pygimp/pygimp-drawable.c (original)
+++ trunk/plug-ins/pygimp/pygimp-drawable.c Wed Sep 24 11:17:12 2008
@@ -94,6 +94,18 @@
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 @@
{"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},
Modified: trunk/plug-ins/pygimp/pygimp-image.c
==============================================================================
--- trunk/plug-ins/pygimp/pygimp-image.c (original)
+++ trunk/plug-ins/pygimp/pygimp-image.c Wed Sep 24 11:17:12 2008
@@ -21,6 +21,7 @@
# include <config.h>
#endif
+#undef GIMP_DISABLE_DEPRECATED
#include "pygimp.h"
static PyObject *
@@ -500,7 +501,7 @@
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]