Commit a7e638ab authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

removed explicit spinbutton pixel size.

2002-09-08  Michael Natterer  <mitch@gimp.org>

	* plug-ins/script-fu/script-fu-scripts.c: removed explicit
	spinbutton pixel size.

	* plug-ins/script-fu/scripts/blended-logo.scm
	* plug-ins/script-fu/scripts/coffee.scm
	* plug-ins/script-fu/scripts/comic-logo.scm
	* 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/rendermap.scm
	* plug-ins/script-fu/scripts/test-sphere.scm: follow PDB change:
	gimp-gradients-[set|get]-active have been renamed to *-gradient
	to match the brush, pattern and palette APIs.
parent 24e4b4fe
2002-09-08 Michael Natterer <mitch@gimp.org>
* plug-ins/script-fu/script-fu-scripts.c: removed explicit
spinbutton pixel size.
* plug-ins/script-fu/scripts/blended-logo.scm
* plug-ins/script-fu/scripts/coffee.scm
* plug-ins/script-fu/scripts/comic-logo.scm
* 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/rendermap.scm
* plug-ins/script-fu/scripts/test-sphere.scm: follow PDB change:
gimp-gradients-[set|get]-active have been renamed to *-gradient
to match the brush, pattern and palette APIs.
2002-09-08 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.c (gimp_image_get_colormap): return
......
......@@ -42,11 +42,9 @@
#define TEXT_WIDTH 100
#define TEXT_HEIGHT 25
#define COLOR_SAMPLE_WIDTH 100
#define COLOR_SAMPLE_HEIGHT 15
#define SLIDER_WIDTH 100
#define SPINNER_WIDTH 75
#define FONT_PREVIEW_WIDTH 100
#define DEFAULT_FONT_SIZE 240
......@@ -1373,14 +1371,12 @@ script_fu_interface (SFScript *script)
break;
case SF_SPINNER:
sf_interface->args_widgets[i] =
gtk_spin_button_new (script->arg_values[i].sfa_adjustment.adj, 0, 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (sf_interface->args_widgets[i]), TRUE);
gtk_widget_set_size_request (sf_interface->args_widgets[i],
SPINNER_WIDTH, -1);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (sf_interface->args_widgets[i]),
script->arg_defaults[i].sfa_adjustment.digits);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sf_interface->args_widgets[i]), TRUE);
sf_interface->args_widgets[i] =
gtk_spin_button_new (script->arg_values[i].sfa_adjustment.adj,
0,
script->arg_defaults[i].sfa_adjustment.digits);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (sf_interface->args_widgets[i]), TRUE);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sf_interface->args_widgets[i]), TRUE);
break;
default: /* this shouldn't happen */
......
......@@ -42,11 +42,9 @@
#define TEXT_WIDTH 100
#define TEXT_HEIGHT 25
#define COLOR_SAMPLE_WIDTH 100
#define COLOR_SAMPLE_HEIGHT 15
#define SLIDER_WIDTH 100
#define SPINNER_WIDTH 75
#define FONT_PREVIEW_WIDTH 100
#define DEFAULT_FONT_SIZE 240
......@@ -1373,14 +1371,12 @@ script_fu_interface (SFScript *script)
break;
case SF_SPINNER:
sf_interface->args_widgets[i] =
gtk_spin_button_new (script->arg_values[i].sfa_adjustment.adj, 0, 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (sf_interface->args_widgets[i]), TRUE);
gtk_widget_set_size_request (sf_interface->args_widgets[i],
SPINNER_WIDTH, -1);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (sf_interface->args_widgets[i]),
script->arg_defaults[i].sfa_adjustment.digits);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sf_interface->args_widgets[i]), TRUE);
sf_interface->args_widgets[i] =
gtk_spin_button_new (script->arg_values[i].sfa_adjustment.adj,
0,
script->arg_defaults[i].sfa_adjustment.digits);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (sf_interface->args_widgets[i]), TRUE);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sf_interface->args_widgets[i]), TRUE);
break;
default: /* this shouldn't happen */
......
......@@ -29,7 +29,7 @@
(dsl-layer-mask (car (gimp-layer-create-mask drop-shadow-layer BLACK-MASK)))
(old-fg (car (gimp-palette-get-foreground)))
(old-bg (car (gimp-palette-get-background)))
(old-grad (car (gimp-gradients-get-active))))
(old-grad (car (gimp-gradients-get-gradient))))
(gimp-image-resize img width height 0 0)
(gimp-image-add-layer img shadow-layer 1)
(gimp-image-add-layer img blend-layer 1)
......@@ -58,7 +58,7 @@
(gimp-selection-none img)
(gimp-palette-set-foreground blend-fg)
(gimp-palette-set-background blend-bg)
(gimp-gradients-set-active blend-gradient)
(gimp-gradients-set-gradient blend-gradient)
(gimp-blend blend-layer blend-mode NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 0 0 width 0)
(gimp-layer-translate logo-layer (- b-size-2) (- b-size-2))
(gimp-layer-translate blend-layer (- b-size) (- b-size))
......@@ -72,7 +72,7 @@
(gimp-selection-none img)
(gimp-palette-set-foreground old-fg)
(gimp-palette-set-background old-bg)
(gimp-gradients-set-active old-grad)))
(gimp-gradients-set-gradient old-grad)))
(define (script-fu-blended-logo-alpha img
logo-layer
......
......@@ -21,7 +21,7 @@
(define (script-fu-coffee-stain inImage inLayer inNumber inDark)
(set! old-gradient (car (gimp-gradients-get-active)))
(set! old-gradient (car (gimp-gradients-get-gradient)))
(set! theImage inImage)
(set! theHeight (car (gimp-image-height theImage)))
(set! theWidth (car (gimp-image-width theImage)))
......@@ -45,12 +45,12 @@
blobSize blobSize REPLACE TRUE 0 FALSE)
)
(script-fu-distress-selection theImage theStain (* (+ (rand 15) 1) (+ (rand 15) 1)) (/ theSize 25) 4 2 TRUE TRUE )
(gimp-gradients-set-active "Coffee")
(gimp-gradients-set-gradient "Coffee")
(gimp-blend theStain CUSTOM NORMAL SHAPEBURST-DIMPLED 100 0 REPEAT-NONE FALSE 0 0 0 0 0 0)
(gimp-layer-set-offsets theStain (- (rand theWidth) (/ theSize 2)) (- (rand theHeight) (/ theSize 2)) theSize)
)
(gimp-selection-none theImage)
(gimp-gradients-set-active old-gradient)
(gimp-gradients-set-gradient old-gradient)
(gimp-displays-flush)
)
......
......@@ -30,7 +30,7 @@
(bg-layer (car (gimp-layer-new img width height RGBA_IMAGE "Background" 100 NORMAL)))
(white-layer (car (gimp-layer-copy logo-layer 1)))
(black-layer (car (gimp-layer-copy logo-layer 1)))
(old-gradient (car (gimp-gradients-get-active)))
(old-gradient (car (gimp-gradients-get-gradient)))
(old-fg (car (gimp-palette-get-foreground)))
(old-bg (car (gimp-palette-get-background))))
(gimp-image-resize img width height 0 0)
......@@ -64,7 +64,7 @@
(plug-in-gauss-rle 1 img black-layer ol-width 1 1)
(plug-in-threshold-alpha 1 img black-layer 0)
(gimp-gradients-set-active gradient)
(gimp-gradients-set-gradient gradient)
(gimp-layer-set-preserve-trans logo-layer TRUE)
(gimp-selection-all img)
(gimp-blend logo-layer CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 0 (* height 0.33333) 0 (* height 0.83333))
......@@ -74,7 +74,7 @@
(gimp-brightness-contrast logo-layer 0 30)
(plug-in-threshold-alpha 1 img logo-layer 60)
(gimp-image-set-active-layer img logo-layer)
(gimp-gradients-set-active old-gradient)
(gimp-gradients-set-gradient old-gradient)
(gimp-palette-set-background old-bg)
(gimp-palette-set-foreground old-fg)))
......
......@@ -25,7 +25,7 @@
(channel 0)
(fs 0)
(layer-mask 0)
(old-gradient (car (gimp-gradients-get-active)))
(old-gradient (car (gimp-gradients-get-gradient)))
(old-fg (car (gimp-palette-get-foreground)))
(old-bg (car (gimp-palette-get-background))))
(gimp-image-resize img img-width img-height 0 0)
......@@ -40,7 +40,7 @@
(gimp-palette-set-background '(0 0 0))
(gimp-edit-fill shadow-layer BG-IMAGE-FILL)
(gimp-gradients-set-active gradient)
(gimp-gradients-set-gradient gradient)
(gimp-blend logo-layer CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 0 0 0 (+ height 5))
(gimp-rect-select img 0 (- (/ height 2) feather) img-width (* 2 feather) REPLACE 0 0)
(plug-in-gauss-iir 1 img logo-layer smear TRUE TRUE)
......@@ -90,7 +90,7 @@
(gimp-image-remove-channel img channel)
(gimp-gradients-set-active old-gradient)
(gimp-gradients-set-gradient old-gradient)
(gimp-palette-set-background old-bg)
(gimp-palette-set-foreground old-fg)))
......
......@@ -43,7 +43,7 @@
(bg-layer (car (gimp-layer-new img width height RGB_IMAGE "Background" 100 NORMAL)))
(grow-me (car (gimp-layer-copy logo-layer TRUE)))
(old-gradient (car (gimp-gradients-get-active)))
(old-gradient (car (gimp-gradients-get-gradient)))
(old-patterns (car (gimp-patterns-get-pattern)))
(old-fg (car (gimp-palette-get-foreground)))
(old-bg (car (gimp-palette-get-background))))
......@@ -73,7 +73,7 @@
(if (= use-pattern-text FALSE)
(begin
(gimp-gradients-set-active blend-gradient-text)
(gimp-gradients-set-gradient blend-gradient-text)
(gimp-blend logo-layer CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 0 0 0 (+ height 5))))
(gimp-selection-none img)
......@@ -94,7 +94,7 @@
(if (= use-pattern-outline FALSE)
(begin
(gimp-gradients-set-active blend-gradient-outline)
(gimp-gradients-set-gradient blend-gradient-outline)
(gimp-blend grow-me CUSTOM NORMAL LINEAR 100 0 REPEAT-NONE FALSE 0 0 0 0 0 (+ height 5))))
(gimp-selection-none img)
......@@ -118,7 +118,7 @@
(set! height (car (gimp-image-height img)))
(gimp-selection-none img)))
(gimp-gradients-set-active old-gradient)
(gimp-gradients-set-gradient old-gradient)
(gimp-palette-set-background old-bg)
(gimp-palette-set-foreground old-fg)))
......
......@@ -35,7 +35,7 @@
(img (car (gimp-image-new width height RGB)))
(layer-one (car (gimp-layer-new img width height RGB "bottom" 100 NORMAL)))
)
(gimp-gradients-set-active gradient)
(gimp-gradients-set-gradient gradient)
(gimp-image-undo-disable img)
(gimp-image-add-layer img layer-one 0)
......
......@@ -36,7 +36,7 @@
(type (car (gimp-drawable-type-with-alpha drawable)))
(image-width (car (gimp-image-width image)))
(image-height (car (gimp-image-height image)))
(old-gradient (car (gimp-gradients-get-active)))
(old-gradient (car (gimp-gradients-get-gradient)))
(old-bg (car (gimp-palette-get-background))))
(gimp-image-undo-disable image)
......@@ -78,7 +78,7 @@
(set! active-layer (car (gimp-image-get-active-layer image)))
(if (= current-grad FALSE)
(gimp-gradients-set-active gradient))
(gimp-gradients-set-gradient gradient))
(plug-in-solid-noise 1 image active-layer FALSE TRUE seed 2 2 2)
(plug-in-cubism 1 image active-layer tile_size 2.5 0)
......@@ -87,7 +87,7 @@
(plug-in-gauss-rle 1 image active-layer 2 TRUE TRUE)
(plug-in-gradmap 1 image active-layer)
(gimp-gradients-set-active old-gradient)
(gimp-gradients-set-gradient old-gradient)
(gimp-palette-set-background old-bg)
(if (= keep-selection FALSE)
......
......@@ -21,7 +21,7 @@
(define (script-fu-render-map inSize inGrain inGrad inWiden)
(set! old-gradient (car (gimp-gradients-get-active)))
(set! old-gradient (car (gimp-gradients-get-gradient)))
(set! old-fg (car (gimp-palette-get-foreground)))
(set! old-bg (car (gimp-palette-get-background)))
......@@ -52,9 +52,9 @@
))
(gimp-selection-none theImage)
(gimp-gradients-set-active inGrad)
(gimp-gradients-set-gradient inGrad)
(plug-in-gradmap TRUE theImage theLayer)
(gimp-gradients-set-active old-gradient)
(gimp-gradients-set-gradient old-gradient)
(gimp-palette-set-background old-bg)
(gimp-palette-set-foreground old-fg)
(gimp-display-new theImage)
......
......@@ -137,7 +137,7 @@
(x-position (- cx (/ (car text-extents) 2)))
(y-position (- cy (/ (cadr text-extents) 2)))
(old-pattern (car (gimp-patterns-get-pattern)))
(old-gradient (car (gimp-gradients-get-active)))
(old-gradient (car (gimp-gradients-get-gradient)))
(old-fg (car (gimp-palette-get-foreground)))
(old-bg (car (gimp-palette-get-background))))
(gimp-image-undo-disable img)
......@@ -164,7 +164,7 @@
FALSE 0 0 light-x light-y light-end-x light-end-y)
(gimp-selection-none img)
(gimp-gradients-set-active gradient)
(gimp-gradients-set-gradient gradient)
(gimp-ellipse-select img 10 10 50 50 REPLACE TRUE FALSE 0)
(gimp-blend drawable CUSTOM NORMAL LINEAR 100 offset REPEAT-NONE
FALSE 0 0 10 10 30 60)
......@@ -178,7 +178,7 @@
size PIXELS
font)))
(gimp-gradients-set-active old-gradient)
(gimp-gradients-set-gradient old-gradient)
(gimp-patterns-set-pattern old-pattern)
(gimp-palette-set-background old-bg)
(gimp-palette-set-foreground old-fg)
......@@ -200,7 +200,7 @@
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-GRADIENT "Gradient" "Deep Sea"
SF-FONT "Font" "-freefont-agate-normal-r-normal-*-24-*-*-*-p-*-*-*"
SF-ADJUSTMENT "Font Size (pixels)" '(50 1 1000 1 10 0 1)
SF-FILENAME "Environment Map" (string-append "" gimp-data-dir "/scripts/beavis.jpg")
......
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