Fixed most of the bugs the Script-Fu logo scripts triggered:

2003-02-14  Michael Natterer  <mitch@gimp.org>

	Fixed most of the bugs the Script-Fu logo scripts triggered:

	* app/core/gimpdrawable-bucket-fill.[ch]
	(gimp_drawable_bucket_fill): added "gboolean do_seed_fill"
	parameter instead of assuming TRUE.
	(gimp_drawable_bucket_fill_full): moved "color" and "pattern"
	parameters to the end.

	* app/tools/gimpbucketfilltool.c
	* app/display/gimpdisplayshell-dnd.c
	* app/widgets/gimpdrawablelistview.c: changed accordingly.

	* tools/pdbgen/pdb/misc_tools.pdb: only pass TRUE if the selection
	is empty. Restores old PDB behaviour.

	* app/core/gimpimage-undo.c (gimp_image_undo_group_end): return
	early if gimage->undo_on is FALSE. Fixes bogus criticals.

	* app/core/gimpimage.c (gimp_image_add_[layer|channel|vectors]):
	clamp the passed position to sane values before calling
	gimp_container_insert() (Scripts adding layers at wrong indices
	are broken but should not crash the core).

	* tools/pdbgen/pdb/paint_tools.pdb: need to copy the relevant
	paint parameters from the current context now that the paint
	options are contexts themselves.

	* tools/pdbgen/pdb/palette.pdb: removed useless includes.

	(Mostly) fixed text PDB functions:

	* app/text/gimptext-compat.[ch] (text_render): don't set
	text->font_size = -1 but get the size from the PangoFontDescrition.
	(text_get_extents): return the logical_rect, not the ink_rect
	because the size of the created text layer will be the logical_rect.

	* tools/pdbgen/pdb/text_tool.pdb: removed text_fontname_create()
	utility function and the usage of pass_through and implement all
	invokers in-place, using the correct parameters.

	* plug-ins/script-fu/siod-wrapper.c: fixed BG-IMAGE-FILL compat
	define so we can BG fill again. Cleaned up color handling code.

	* plug-ins/script-fu/scripts/coolmetal-logo.scm
	* plug-ins/script-fu/scripts/glossy.scm
	* plug-ins/script-fu/scripts/land.scm
	* plug-ins/script-fu/scripts/lava.scm
	* plug-ins/script-fu/scripts/test-sphere.scm: use new gradient names.

	* app/pdb/misc_tools_cmds.c
	* app/pdb/paint_tools_cmds.c
	* app/pdb/palette_cmds.c
	* app/pdb/text_tool_cmds.c: regenerated.
This commit is contained in:
Michael Natterer
2003-02-14 22:33:22 +00:00
committed by Michael Natterer
parent 59fc2eade4
commit a4a224587b
26 changed files with 327 additions and 186 deletions

View File

@ -117,7 +117,7 @@
SF-DRAWABLE "Drawable" 0
SF-ADJUSTMENT _"Effect Size (pixels)" '(100 2 1000 1 10 0 1)
SF-COLOR _"Background Color" '(255 255 255)
SF-GRADIENT _"Gradient" "Horizon_1"
SF-GRADIENT _"Gradient" "Horizon 1"
)
@ -145,5 +145,5 @@
SF-ADJUSTMENT _"Font Size (pixels)" '(100 2 1000 1 10 0 1)
SF-FONT _"Font" "Crillee"
SF-COLOR _"Background Color" '(255 255 255)
SF-GRADIENT _"Gradient" "Horizon_1"
SF-GRADIENT _"Gradient" "Horizon 1"
)

View File

@ -161,8 +161,8 @@
"RGBA"
SF-IMAGE "Image" 0
SF-DRAWABLE "Drawable" 0
SF-GRADIENT _"Blend Gradient (Text)" "Shadows_2"
SF-GRADIENT _"Blend Gradient (Outline)" "Shadows_2"
SF-GRADIENT _"Blend Gradient (Text)" "Shadows 2"
SF-GRADIENT _"Blend Gradient (Outline)" "Shadows 2"
SF-ADJUSTMENT _"Outline Size" '(5 0 250 1 10 0 1)
SF-COLOR _"Background Color" '(255 255 255)
SF-TOGGLE _"Use Pattern for Text instead of Gradient" FALSE
@ -219,8 +219,8 @@
SF-STRING _"Text" "Galaxy"
SF-ADJUSTMENT _"Font Size (pixels)" '(100 2 1000 1 10 0 1)
SF-FONT _"Font" "Eras"
SF-GRADIENT _"Blend Gradient (Text)" "Shadows_2"
SF-GRADIENT _"Blend Gradient (Outline)" "Shadows_2"
SF-GRADIENT _"Blend Gradient (Text)" "Shadows 2"
SF-GRADIENT _"Blend Gradient (Outline)" "Shadows 2"
SF-ADJUSTMENT _"Outline Size" '(5 0 250 1 10 0 1)
SF-COLOR _"Background Color" '(255 255 255)
SF-TOGGLE _"Use Pattern for Text instead of Gradient" FALSE

View File

@ -80,4 +80,4 @@
SF-ADJUSTMENT _"Sea Depth" '(4 1 65 1 10 0 1)
SF-ADJUSTMENT _"Scale X" '(4 0.1 16 1 5 0.1 0)
SF-ADJUSTMENT _"Scale Y" '(4 0.1 16 1 5 0.1 0)
SF-GRADIENT _"Gradient" "Land_1")
SF-GRADIENT _"Gradient" "Land 1")

View File

@ -110,7 +110,7 @@
SF-ADJUSTMENT _"Seed" '(10 1 30000 1 10 0 1)
SF-ADJUSTMENT _"Size" '(10 0 100 1 10 0 1)
SF-ADJUSTMENT _"Roughness" '(7 3 50 1 10 0 0)
SF-GRADIENT _"Gradient" "German_flag_smooth"
SF-GRADIENT _"Gradient" "German flag smooth"
SF-TOGGLE _"Keep Selection" TRUE
SF-TOGGLE _"Separate Layer" TRUE
SF-TOGGLE _"Use Current Gradient" FALSE)

View File

@ -67,11 +67,11 @@
; gradient. If the button is pressed a gradient selection dialog will popup.
;
; Usage:
; SF-GRADIENT "Gradient" "Deep_Sea"
; SF-GRADIENT "Gradient" "Deep Sea"
;
; The value returned when the script is invoked is a string containing the
; gradient name. If the above selection was not altered the string would
; contain "Deep_Sea"
; contain "Deep Sea"
; ----------------------------------------------------------------------
; SF-FILENAME
; Only useful in interactive mode. It will create a widget in the control
@ -197,14 +197,12 @@
SF-TOGGLE "Shadow" TRUE
SF-COLOR "Background Color" '(255 255 255)
SF-COLOR "Sphere Color" '(255 0 0)
SF-BRUSH "Brush" '("Circle (03)" 1.0 44 0)
SF-BRUSH "Brush" '("Circle (03)" 1.0 44 0)
SF-STRING "Text" "Script-Fu rocks!"
SF-PATTERN "Pattern" "Maple Leaves"
SF-GRADIENT "Gradient" "Deep Sea"
SF-FONT "Font" "Agate"
SF-ADJUSTMENT "Font Size (pixels)" '(50 1 1000 1 10 0 1)
SF-ADJUSTMENT "Font Size (pixels)" '(50 1 1000 1 10 0 1)
SF-FILENAME "Environment Map" (string-append "" gimp-data-dir "/scripts/beavis.jpg")
SF-OPTION "Orientation" '("Horzontal" "Vertical")
SF-DIRNAME "Output Directory" "/var/tmp/")