gimp r26305 - in branches/soc-2008-python: . plug-ins/pygimp
- From: larsc svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26305 - in branches/soc-2008-python: . plug-ins/pygimp
- Date: Fri, 25 Jul 2008 14:13:05 +0000 (UTC)
Author: larsc
Date: Fri Jul 25 14:13:05 2008
New Revision: 26305
URL: http://svn.gnome.org/viewvc/gimp?rev=26305&view=rev
Log:
2008-07-25 Lars-Peter Clausen <lars metafoo de>
* plug-ins/pygimp/gimpui.override: Let ZoomPreview.get_drawable and
AspectPreview.get_drawable return the PyGimpDrawable which was passed to
their constructors.
Modified:
branches/soc-2008-python/ChangeLog
branches/soc-2008-python/plug-ins/pygimp/gimpui.override
Modified: branches/soc-2008-python/plug-ins/pygimp/gimpui.override
==============================================================================
--- branches/soc-2008-python/plug-ins/pygimp/gimpui.override (original)
+++ branches/soc-2008-python/plug-ins/pygimp/gimpui.override Fri Jul 25 14:13:05 2008
@@ -1679,19 +1679,24 @@
static PyObject *
_wrap_gimp_drawable_preview_get_drawable(PyGObject *self)
{
- GimpDrawable *drawable;
- drawable = gimp_drawable_preview_get_drawable(
- GIMP_DRAWABLE_PREVIEW(self->obj));
- return pygimp_drawable_new(drawable, -1);
+ PyObject *drawable;
+
+ drawable = g_object_get_data(self->obj,
+ "pygimp-drawable-preview-pydrawable");
+ Py_INCREF(drawable);
+ return drawable;
}
%%
override gimp_zoom_preview_get_drawable noargs
static PyObject *
_wrap_gimp_zoom_preview_get_drawable(PyGObject *self)
{
- GimpDrawable *drawable;
- drawable = gimp_zoom_preview_get_drawable(GIMP_ZOOM_PREVIEW(self->obj));
- return pygimp_drawable_new(drawable, -1);
+ PyObject *drawable;
+
+ drawable = g_object_get_data(self->obj,
+ "pygimp-zoom-preview-pydrawable");
+ Py_INCREF(drawable);
+ return drawable;
}
%%
override gimp_drawable_preview_draw_region kwargs
@@ -1902,7 +1907,10 @@
if (pygobject_construct(self, "drawable", py_drawable->drawable, "model", zoom_model, NULL))
return -1;
- g_signal_connect_swapped(self->obj, "destroy", (GCallback)pygimp_decref_callback, py_drawable);
+ g_object_set_data_full(self->obj, "pygimp-zoom-preview-pydrawable",
+ py_drawable,
+ (GDestroyNotify)pygimp_decref_callback);
+
Py_INCREF(py_drawable);
return 0;
@@ -1925,7 +1933,8 @@
if (pygobject_construct(self, "drawable", py_drawable->drawable, NULL))
return -1;
- g_signal_connect_swapped(self->obj, "destroy", (GCallback)pygimp_decref_callback, py_drawable);
+ g_signal_connect_swapped(self->obj, "destroy",
+ (GCallback)pygimp_decref_callback, py_drawable);
Py_INCREF(py_drawable);
return 0;
@@ -1948,7 +1957,10 @@
if (pygobject_construct(self, "drawable", py_drawable->drawable, NULL))
return -1;
- g_signal_connect_swapped(self->obj, "destroy", (GCallback)pygimp_decref_callback, py_drawable);
+ g_object_set_data_full(self->obj, "pygimp-drawable-preview-pydrawable",
+ py_drawable,
+ (GDestroyNotify)pygimp_decref_callback);
+
Py_INCREF(py_drawable);
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]