? changes ? notes ? psd-pathimport.diff ? type-problem.diff ? type-problem2.diff ? xor-funk.diff Index: app/actions/plug-in-commands.c =================================================================== RCS file: /cvs/gnome/gimp/app/actions/plug-in-commands.c,v retrieving revision 1.229 diff -u -p -r1.229 plug-in-commands.c --- app/actions/plug-in-commands.c 29 Oct 2006 22:19:33 -0000 1.229 +++ app/actions/plug-in-commands.c 17 Nov 2006 16:16:43 -0000 @@ -79,6 +79,7 @@ static gint plug_in_collect_image_args static gint plug_in_collect_item_args (GtkAction *action, GimpImage *image, GimpItem *item, + GParamSpec **pspecs, GValueArray *args, gint n_args); static gint plug_in_collect_drawable_args (GtkAction *action, @@ -159,6 +160,7 @@ plug_in_run_cmd_callback (GtkAction item = NULL; n_args = plug_in_collect_item_args (action, image, item, + procedure->args, args, n_args); } else @@ -352,6 +354,7 @@ static gint plug_in_collect_item_args (GtkAction *action, GimpImage *image, GimpItem *item, + GParamSpec **pspecs, GValueArray *args, gint n_args) { @@ -364,9 +367,11 @@ plug_in_collect_item_args (GtkAction * n_args++; if (args->n_values > n_args && - GIMP_VALUE_HOLDS_ITEM_ID (&args->values[n_args])) + GIMP_IS_PARAM_SPEC_ITEM_ID (pspecs[n_args])) { - if (item) + if (item && + g_type_is_a (G_TYPE_FROM_INSTANCE (item), + GIMP_PARAM_SPEC_ITEM_ID (pspecs[n_args])->item_type)) { gimp_value_set_item (&args->values[n_args], item); n_args++; Index: app/core/gimpparamspecs.c =================================================================== RCS file: /cvs/gnome/gimp/app/core/gimpparamspecs.c,v retrieving revision 1.14 diff -u -p -r1.14 gimpparamspecs.c --- app/core/gimpparamspecs.c 18 Oct 2006 13:17:47 -0000 1.14 +++ app/core/gimpparamspecs.c 17 Nov 2006 16:16:43 -0000 @@ -883,10 +883,40 @@ void gimp_value_set_item (GValue *value, GimpItem *item) { - g_return_if_fail (GIMP_VALUE_HOLDS_ITEM_ID (value)); g_return_if_fail (item == NULL || GIMP_IS_ITEM (item)); - value->data[0].v_int = item ? gimp_item_get_ID (item) : -1; +#ifdef __GNUC__ +#warning FIXME remove hack as soon as bug #375864 is fixed */ +#endif + + if (GIMP_VALUE_HOLDS_ITEM_ID (value)) + value->data[0].v_int = item ? gimp_item_get_ID (item) : -1; + + else if (GIMP_VALUE_HOLDS_DRAWABLE_ID (value) && + GIMP_IS_DRAWABLE (item)) + gimp_value_set_drawable (value, GIMP_DRAWABLE (item)); + + else if (GIMP_VALUE_HOLDS_LAYER_ID (value) && + GIMP_IS_LAYER (item)) + gimp_value_set_layer (value, GIMP_LAYER (item)); + + else if (GIMP_VALUE_HOLDS_CHANNEL_ID (value) && + GIMP_IS_CHANNEL (item)) + gimp_value_set_channel (value, GIMP_CHANNEL (item)); + + else if (GIMP_VALUE_HOLDS_LAYER_MASK_ID (value) && + GIMP_IS_LAYER_MASK (item)) + gimp_value_set_layer_mask (value, GIMP_LAYER_MASK (item)); + + else if (GIMP_VALUE_HOLDS_SELECTION_ID (value) && + GIMP_IS_SELECTION (item)) + gimp_value_set_selection (value, GIMP_SELECTION (item)); + + else if (GIMP_VALUE_HOLDS_VECTORS_ID (value) && + GIMP_IS_VECTORS (item)) + gimp_value_set_vectors (value, GIMP_VECTORS (item)); + else + g_return_if_reached (); }