From 4ec309d5625b1784f82f140e30553fb239ca0fd8 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Tue, 15 Feb 2011 21:28:13 +0100 Subject: [PATCH] pygimp: use the new properties instead of hacking around --- plug-ins/pygimp/gimpui.override | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/plug-ins/pygimp/gimpui.override b/plug-ins/pygimp/gimpui.override index 566b919011..37cd291a00 100644 --- a/plug-ins/pygimp/gimpui.override +++ b/plug-ins/pygimp/gimpui.override @@ -1025,9 +1025,8 @@ static int _wrap_gimp_enum_label_new(PyGObject *self, PyObject *args, PyObject *kwargs) { PyObject *py_enum_type = NULL; - gint value; GType enum_type; - GimpEnumLabel *label; + gint value; static char *kwlist[] = { "enum_type", "value", NULL }; @@ -1040,15 +1039,12 @@ _wrap_gimp_enum_label_new(PyGObject *self, PyObject *args, PyObject *kwargs) if ((enum_type = pyg_type_from_object(py_enum_type)) == 0) return -1; - if (pygobject_construct(self, NULL)) + if (pygobject_construct(self, + "enum-type", enum_type, + "enum-value", value, + NULL)) return -1; - label = GIMP_ENUM_LABEL(self->obj); - - label->enum_class = g_type_class_ref(enum_type); - - gimp_enum_label_set_value (label, value); - return 0; } %%