[gimp] pygimp: use the new properties instead of hacking around
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] pygimp: use the new properties instead of hacking around
- Date: Tue, 15 Feb 2011 20:28:40 +0000 (UTC)
commit 4ec309d5625b1784f82f140e30553fb239ca0fd8
Author: Michael Natterer <mitch gimp org>
Date: Tue Feb 15 21:28:13 2011 +0100
pygimp: use the new properties instead of hacking around
plug-ins/pygimp/gimpui.override | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/plug-ins/pygimp/gimpui.override b/plug-ins/pygimp/gimpui.override
index 566b919..37cd291 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;
}
%%
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]