plug-ins/script-fu/scripts/paste-as-brush.scm Some variables were not

2006-10-28  Kevin Cozens  <kcozens@cvs.gnome.org>

	* plug-ins/script-fu/scripts/paste-as-brush.scm
	* plug-ins/script-fu/scripts/paste-as-pattern.scm: Some variables
	were not being declared before first use. Spotted by Saul Goode.
This commit is contained in:
Kevin Cozens 2006-10-29 05:18:44 +00:00 committed by Kevin Cozens
parent 1fb934b9f8
commit 3e691c6999
3 changed files with 24 additions and 17 deletions

View File

@ -1,3 +1,9 @@
2006-10-28 Kevin Cozens <kcozens@cvs.gnome.org>
* plug-ins/script-fu/scripts/paste-as-brush.scm
* plug-ins/script-fu/scripts/paste-as-pattern.scm: Some variables
were not being declared before first use. Spotted by Saul Goode.
2006-10-28 Manish Singh <yosh@gimp.org>
* plug-ins/pygimp/plug-ins/gimpcons.py: can't use gettext.install

View File

@ -25,6 +25,12 @@
(brush-image (car (gimp-edit-paste-as-new)))
(brush-draw (car (gimp-image-get-active-drawable brush-image)))
(type (car (gimp-drawable-type brush-draw)))
(path (string-append gimp-directory
"/brushes/"
filename
(number->string brush-image)
".gbr"))
)
(if (= type GRAYA-IMAGE)
@ -36,12 +42,6 @@
)
)
(set! path (string-append gimp-directory
"/brushes/"
filename
(number->string brush-image)
".gbr"))
(file-gbr-save RUN-NONINTERACTIVE
brush-image brush-draw path path
spacing name)

View File

@ -20,24 +20,25 @@
(define (script-fu-paste-as-pattern name filename)
(set! pattern-image (car (gimp-edit-paste-as-new)))
(set! pattern-draw (car (gimp-image-get-active-drawable pattern-image)))
(set! path (string-append gimp-directory
(let* (
(pattern-image (car (gimp-edit-paste-as-new)))
(pattern-draw (car (gimp-image-get-active-drawable pattern-image)))
(path (string-append gimp-directory
"/patterns/"
filename
(number->string pattern-image)
".pat"))
)
(file-pat-save RUN-NONINTERACTIVE
pattern-image pattern-draw path path
name)
(file-pat-save RUN-NONINTERACTIVE
pattern-image pattern-draw path path
name)
(gimp-image-delete pattern-image)
(gimp-image-delete pattern-image)
(gimp-patterns-refresh)
(gimp-context-set-pattern name)
(gimp-patterns-refresh)
(gimp-context-set-pattern name)
)
)
(script-fu-register "script-fu-paste-as-pattern"