Commit 0c2d06f7 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

drop the restriction that plug-ins registered in <Image> must have

2005-09-26  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-params.c (plug_in_proc_args_check): drop the
	restriction that plug-ins registered in <Image> must have
	RUN-MODE, IMAGE, DRAWABLE parameters because everything but
	RUN-MODE is actually treated as optional be the rest of the code.

	* plug-ins/script-fu/scripts/paste-as-brush.scm
	* plug-ins/script-fu/scripts/paste-as-pattern.scm: removed IMAGE
	and DRAWABLE parameters.

	* plug-ins/common/screenshot.c
	* plug-ins/twain/twain.c
	* plug-ins/winsnap/winsnap.c: register menu entries in
	<Image>/File/Acquire
parent 2e42c8ea
2005-09-26 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-params.c (plug_in_proc_args_check): drop the
restriction that plug-ins registered in <Image> must have
RUN-MODE, IMAGE, DRAWABLE parameters because everything but
RUN-MODE is actually treated as optional be the rest of the code.
* plug-ins/script-fu/scripts/paste-as-brush.scm
* plug-ins/script-fu/scripts/paste-as-pattern.scm: removed IMAGE
and DRAWABLE parameters.
* plug-ins/common/screenshot.c
* plug-ins/twain/twain.c
* plug-ins/winsnap/winsnap.c: register menu entries in
<Image>/File/Acquire
2005-09-26 Sven Neumann <sven@gimp.org>
* plug-ins/common/gqbist.c: minor dialog tweak.
......
......@@ -514,16 +514,14 @@ plug_in_proc_args_check (const gchar *plug_in_name,
else if (strncmp (menu_path, "<Image>", 7) == 0)
{
if ((n_args < 3) ||
(args[0].arg_type != GIMP_PDB_INT32) ||
(args[1].arg_type != GIMP_PDB_IMAGE) ||
(args[2].arg_type != GIMP_PDB_DRAWABLE))
(args[0].arg_type != GIMP_PDB_INT32))
{
g_set_error (error, 0, 0,
"Plug-In \"%s\"\n(%s)\n\n"
"attempted to install <Image> procedure \"%s\" "
"which does not take the standard <Image> Plug-In "
"args.\n"
"(INT32, IMAGE, DRAWABLE)",
"(INT32)",
gimp_filename_to_utf8 (plug_in_name),
gimp_filename_to_utf8 (plug_in_prog),
procedure_name);
......
......@@ -244,7 +244,7 @@ query (void)
args, return_vals);
gimp_plugin_menu_register (PLUG_IN_PROC, "<Toolbox>/File/Acquire");
/* gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/File/Acquire"); */
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/File/Acquire");
gimp_plugin_icon_register (PLUG_IN_PROC,
GIMP_ICON_TYPE_INLINE_PIXBUF, screenshot_icon);
......
......@@ -19,9 +19,7 @@
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
(define (script-fu-paste-as-brush image
drawable
name
(define (script-fu-paste-as-brush name
filename
spacing)
......@@ -40,7 +38,7 @@
(set! path (string-append gimp-directory
"/brushes/"
filename
(number->string image)
(number->string brush-image)
".gbr"))
(file-gbr-save 1 brush-image brush-draw path "" spacing name)
......@@ -56,9 +54,7 @@
"Michael Natterer <mitch@gimp.org>"
"Michael Natterer"
"2005-09-25"
"*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
""
SF-STRING _"Brush name" "My Brush"
SF-STRING _"File name" "mybrush"
SF-ADJUSTMENT _"Spacing" '(25 0 1000 1 1 1 0))
......
......@@ -19,9 +19,7 @@
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
(define (script-fu-paste-as-pattern image
drawable
name
(define (script-fu-paste-as-pattern name
filename)
(set! pattern-image (car (gimp-edit-paste-as-new)))
......@@ -30,7 +28,7 @@
(set! path (string-append gimp-directory
"/patterns/"
filename
(number->string image)
(number->string pattern-image)
".pat"))
(file-pat-save 1 pattern-image pattern-draw path "" name)
......@@ -48,10 +46,8 @@
"Michael Natterer"
"2005-09-25"
"*"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-STRING _"Pattern name" "My Pattern"
SF-STRING _"File name" "mypattern")
SF-STRING _"Pattern name" "My Pattern"
SF-STRING _"File name" "mypattern")
(script-fu-menu-register "script-fu-paste-as-pattern"
"<Image>/Edit/Paste as")
......@@ -319,6 +319,7 @@ query (void)
return_vals);
gimp_plugin_menu_register (PLUG_IN_D_NAME, "<Toolbox>/File/Acquire");
gimp_plugin_menu_register (PLUG_IN_D_NAME, "<Image>/File/Acquire");
}
else if (twain_run_mode == RUN_READDUMP)
{
......@@ -338,6 +339,7 @@ query (void)
return_vals);
gimp_plugin_menu_register (PLUG_IN_R_NAME, "<Toolbox>/File/Acquire");
gimp_plugin_menu_register (PLUG_IN_R_NAME, "<Image>/File/Acquire");
}
else
#endif /* _DEBUG */
......@@ -358,6 +360,7 @@ query (void)
return_vals);
gimp_plugin_menu_register (PLUG_IN_NAME, "<Toolbox>/File/Acquire");
gimp_plugin_menu_register (PLUG_IN_NAME, "<Image>/File/Acquire");
}
}
......
......@@ -1000,7 +1000,7 @@ query(void)
return_vals);
gimp_plugin_menu_register (PLUG_IN_NAME, "<Toolbox>/File/Acquire");
/* gimp_plugin_menu_register (PLUG_IN_NAME, "<Image>/File/Acquire"); */
gimp_plugin_menu_register (PLUG_IN_NAME, "<Image>/File/Acquire");
}
/* Return values storage */
......
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