gimp r24824 - in trunk: . app/core app/tools app/widgets
- From: mitch svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r24824 - in trunk: . app/core app/tools app/widgets
- Date: Wed, 6 Feb 2008 18:38:29 +0000 (GMT)
Author: mitch
Date: Wed Feb 6 18:38:29 2008
New Revision: 24824
URL: http://svn.gnome.org/viewvc/gimp?rev=24824&view=rev
Log:
2008-02-06 Michael Natterer <mitch gimp org>
* app/tools/gimpgegltool.c (gimp_param_spec_duplicate)
* app/widgets/gimppropwidgets.c (gimp_prop_table_new): add support
for GParamSpecEnum.
* app/core/gimpimagemap.c (gimp_image_map_apply): add even better
checks for input and output pads of the passed operation.
Modified:
trunk/ChangeLog
trunk/app/core/gimpimagemap.c
trunk/app/tools/gimpgegltool.c
trunk/app/widgets/gimppropwidgets.c
Modified: trunk/app/core/gimpimagemap.c
==============================================================================
--- trunk/app/core/gimpimagemap.c (original)
+++ trunk/app/core/gimpimagemap.c Wed Feb 6 18:38:29 2008
@@ -465,16 +465,24 @@
g_object_unref (sink_operation);
}
- if (gegl_node_get_pad (image_map->operation, "input"))
+ if (gegl_node_get_pad (image_map->operation, "input") &&
+ gegl_node_get_pad (image_map->operation, "output"))
{
+ /* if there are input and output pads we probably have a
+ * filter OP, connect it on both ends.
+ */
gegl_node_link_many (image_map->input,
image_map->shift,
image_map->operation,
image_map->output,
NULL);
}
- else
+ else if (gegl_node_get_pad (image_map->operation, "output"))
{
+ /* if there is only an output pad we probably have a
+ * source OP, blend its result on top of the original
+ * pixels.
+ */
GeglNode *over = gegl_node_new_child (image_map->gegl,
"operation", "over",
NULL);
@@ -488,6 +496,15 @@
gegl_node_connect_to (image_map->operation, "output",
over, "aux");
}
+ else
+ {
+ /* otherwise we just construct a silly nop pipleline
+ */
+ gegl_node_link_many (image_map->input,
+ image_map->shift,
+ image_map->output,
+ NULL);
+ }
}
gegl_node_set (image_map->input,
Modified: trunk/app/tools/gimpgegltool.c
==============================================================================
--- trunk/app/tools/gimpgegltool.c (original)
+++ trunk/app/tools/gimpgegltool.c Wed Feb 6 18:38:29 2008
@@ -350,6 +350,17 @@
spec->default_value,
pspec->flags);
}
+ else if (G_IS_PARAM_SPEC_ENUM (pspec))
+ {
+ GParamSpecEnum *spec = G_PARAM_SPEC_ENUM (pspec);
+
+ return g_param_spec_enum (pspec->name,
+ g_param_spec_get_nick (pspec),
+ g_param_spec_get_blurb (pspec),
+ G_TYPE_FROM_CLASS (spec->enum_class),
+ spec->default_value,
+ pspec->flags);
+ }
else if (G_IS_PARAM_SPEC_DOUBLE (pspec))
{
GParamSpecDouble *spec = G_PARAM_SPEC_DOUBLE (pspec);
Modified: trunk/app/widgets/gimppropwidgets.c
==============================================================================
--- trunk/app/widgets/gimppropwidgets.c (original)
+++ trunk/app/widgets/gimppropwidgets.c Wed Feb 6 18:38:29 2008
@@ -792,6 +792,11 @@
widget = gimp_prop_check_button_new (config, pspec->name,
g_param_spec_get_nick (pspec));
}
+ else if (G_IS_PARAM_SPEC_ENUM (pspec))
+ {
+ widget = gimp_prop_enum_combo_box_new (config, pspec->name, 0, 0);
+ label = g_param_spec_get_nick (pspec);
+ }
else if (G_IS_PARAM_SPEC_INT (pspec) ||
G_IS_PARAM_SPEC_UINT (pspec) ||
G_IS_PARAM_SPEC_FLOAT (pspec) ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]