[gimp] pygimp: use the new "channel" property instead of poking into the scale
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] pygimp: use the new "channel" property instead of poking into the scale
- Date: Tue, 15 Feb 2011 17:53:15 +0000 (UTC)
commit 7907a496a5a7e87d855354c04b3e8368a3a14e1d
Author: Michael Natterer <mitch gimp org>
Date: Tue Feb 15 18:52:33 2011 +0100
pygimp: use the new "channel" property instead of poking into the scale
plug-ins/pygimp/gimpui.override | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/plug-ins/pygimp/gimpui.override b/plug-ins/pygimp/gimpui.override
index c7f5751..8800389 100644
--- a/plug-ins/pygimp/gimpui.override
+++ b/plug-ins/pygimp/gimpui.override
@@ -989,8 +989,6 @@ _wrap_gimp_color_scale_new(PyGObject *self, PyObject *args, PyObject *kwargs)
PyObject *py_orientation, *py_channel;
GtkOrientation orientation;
GimpColorSelectorChannel channel;
- GimpColorScale *scale;
- GtkRange *range;
static char *kwlist[] = { "orientation", "channel", NULL };
@@ -1008,15 +1006,14 @@ _wrap_gimp_color_scale_new(PyGObject *self, PyObject *args, PyObject *kwargs)
(gint*)&channel))
return -1;
- if (pygobject_construct(self, NULL))
+ if (pygobject_construct(self,
+ "orientation", orientation,
+ "channel", channel,
+ NULL));
return -1;
- scale = GIMP_COLOR_SCALE(self->obj);
- scale->channel = channel;
-
- range = GTK_RANGE(scale);
- gtk_orientable_set_orientation (GTK_ORIENTABLE (range), orientation);
- gtk_range_set_flippable (range, orientation == GTK_ORIENTATION_HORIZONTAL);
+ gtk_range_set_flippable (GTK_RANGE (self->obj),
+ orientation == GTK_ORIENTATION_HORIZONTAL);
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]