Index: plug-ins/script-fu/scheme-wrapper.c =================================================================== RCS file: /cvs/gnome/gimp/plug-ins/script-fu/scheme-wrapper.c,v retrieving revision 1.69 diff -u -p -r1.69 scheme-wrapper.c --- plug-ins/script-fu/scheme-wrapper.c 9 Nov 2006 23:03:54 -0000 1.69 +++ plug-ins/script-fu/scheme-wrapper.c 15 Nov 2006 19:49:42 -0000 @@ -76,6 +76,7 @@ struct named_constant const script_const { "SF-DRAWABLE", SF_DRAWABLE }, { "SF-LAYER", SF_LAYER }, { "SF-CHANNEL", SF_CHANNEL }, + { "SF-VECTORS", SF_VECTORS }, { "SF-COLOR", SF_COLOR }, { "SF-TOGGLE", SF_TOGGLE }, { "SF-VALUE", SF_VALUE }, Index: plug-ins/script-fu/script-fu-enums.h =================================================================== RCS file: /cvs/gnome/gimp/plug-ins/script-fu/script-fu-enums.h,v retrieving revision 1.14 diff -u -p -r1.14 script-fu-enums.h --- plug-ins/script-fu/script-fu-enums.h 22 Jan 2005 22:46:24 -0000 1.14 +++ plug-ins/script-fu/script-fu-enums.h 15 Nov 2006 19:49:42 -0000 @@ -27,6 +27,7 @@ typedef enum SF_DRAWABLE, SF_LAYER, SF_CHANNEL, + SF_VECTORS, SF_COLOR, SF_TOGGLE, SF_VALUE, Index: plug-ins/script-fu/script-fu-interface.c =================================================================== RCS file: /cvs/gnome/gimp/plug-ins/script-fu/script-fu-interface.c,v retrieving revision 1.165 diff -u -p -r1.165 script-fu-interface.c --- plug-ins/script-fu/script-fu-interface.c 19 Oct 2006 15:24:56 -0000 1.165 +++ plug-ins/script-fu/script-fu-interface.c 15 Nov 2006 19:49:42 -0000 @@ -292,6 +292,7 @@ script_fu_interface (SFScript *script, case SF_DRAWABLE: case SF_LAYER: case SF_CHANNEL: + case SF_VECTORS: switch (script->arg_types[i]) { case SF_IMAGE: @@ -314,6 +315,11 @@ script_fu_interface (SFScript *script, ID_ptr = &script->arg_values[i].sfa_channel; break; + case SF_VECTORS: + widget = gimp_channel_combo_box_new (NULL, NULL); + ID_ptr = &script->arg_values[i].sfa_vectors; + break; + default: menu = NULL; break; @@ -761,6 +767,7 @@ script_fu_ok (SFScript *script) case SF_DRAWABLE: case SF_LAYER: case SF_CHANNEL: + case SF_VECTORS: g_string_append_printf (s, "%d", arg_value->sfa_image); break; @@ -895,6 +902,7 @@ script_fu_reset (SFScript *script) case SF_DRAWABLE: case SF_LAYER: case SF_CHANNEL: + case SF_VECTORS: break; case SF_COLOR: Index: plug-ins/script-fu/script-fu-scripts.c =================================================================== RCS file: /cvs/gnome/gimp/plug-ins/script-fu/script-fu-scripts.c,v retrieving revision 1.148 diff -u -p -r1.148 script-fu-scripts.c --- plug-ins/script-fu/script-fu-scripts.c 20 Oct 2006 09:54:05 -0000 1.148 +++ plug-ins/script-fu/script-fu-scripts.c 15 Nov 2006 19:49:42 -0000 @@ -248,6 +248,7 @@ script_fu_add_script (scheme *sc, pointe case SF_DRAWABLE: case SF_LAYER: case SF_CHANNEL: + case SF_VECTORS: if (!sc->vptr->is_integer (sc->vptr->pair_car (a))) return my_err (sc, "script-fu-register: drawable defaults must be integer values"); script->arg_defaults[i].sfa_image = @@ -277,6 +278,11 @@ script_fu_add_script (scheme *sc, pointe args[i + 1].name = "channel"; break; + case SF_VECTORS: + args[i + 1].type = GIMP_PDB_VECTORS; + args[i + 1].name = "vectors"; + break; + default: break; } @@ -798,6 +804,16 @@ script_fu_script_proc (const gchar min_args++; } + g_printerr ("%d, %d\n", nparams, script->num_args); + + if (nparams > 2 && params[2].type == GIMP_PDB_VECTORS && + script->num_args > 1 && script->arg_types[1] == SF_VECTORS) + { + g_printerr ("copying vectors parameter\n"); + script->arg_values[1].sfa_vectors = params[2].data.d_vectors; + min_args++; + } + /* First acquire information with a dialog */ /* Skip this part if the script takes no parameters */ if (script->num_args > min_args) @@ -834,6 +850,7 @@ script_fu_script_proc (const gchar case SF_DRAWABLE: case SF_LAYER: case SF_CHANNEL: + case SF_VECTORS: g_string_append_printf (s, "%d", param->data.d_int32); break; @@ -982,6 +999,7 @@ script_fu_free_script (SFScript *script) case SF_DRAWABLE: case SF_LAYER: case SF_CHANNEL: + case SF_VECTORS: case SF_COLOR: break; Index: plug-ins/script-fu/script-fu-types.h =================================================================== RCS file: /cvs/gnome/gimp/plug-ins/script-fu/script-fu-types.h,v retrieving revision 1.8 diff -u -p -r1.8 script-fu-types.h --- plug-ins/script-fu/script-fu-types.h 19 Oct 2006 14:50:46 -0000 1.8 +++ plug-ins/script-fu/script-fu-types.h 15 Nov 2006 19:49:42 -0000 @@ -66,6 +66,7 @@ typedef union gint32 sfa_drawable; gint32 sfa_layer; gint32 sfa_channel; + gint32 sfa_vectors; GimpRGB sfa_color; gint32 sfa_toggle; gchar *sfa_value;