Commit fdb9060f authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/tools/gimpgegltool.c (gimp_param_spec_duplicate) add support for

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.


svn path=/trunk/; revision=24824
parent f4272e69
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.
2008-02-06 Michael Natterer <mitch@gimp.org>
* app/paint/gimpclone.c
......
......@@ -465,16 +465,24 @@ gimp_image_map_apply (GimpImageMap *image_map,
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 @@ gimp_image_map_apply (GimpImageMap *image_map,
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,
......
......@@ -350,6 +350,17 @@ gimp_param_spec_duplicate (GParamSpec *pspec)
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);
......
......@@ -792,6 +792,11 @@ gimp_prop_table_new (GObject *config,
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) ||
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment