[gimp] Porting scripts to new API, marking layer names for translation
- From: Alexandre Prokoudine <aprokoudine src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] Porting scripts to new API, marking layer names for translation
- Date: Sat, 9 Oct 2010 23:52:44 +0000 (UTC)
commit 0a4657ae9fce7ca4757aa533dbde48d1e52c4079
Author: Alexandre Prokoudine <alexandre prokoudine gmail com>
Date: Sun Oct 10 03:52:15 2010 +0400
Porting scripts to new API, marking layer names for translation
plug-ins/script-fu/scripts/beveled-button.scm | 8 ++++----
.../script-fu/scripts/beveled-pattern-arrow.scm | 8 ++++----
.../script-fu/scripts/beveled-pattern-bullet.scm | 8 ++++----
.../script-fu/scripts/beveled-pattern-button.scm | 8 ++++----
.../script-fu/scripts/beveled-pattern-heading.scm | 14 +++++++-------
.../script-fu/scripts/beveled-pattern-hrule.scm | 8 ++++----
6 files changed, 27 insertions(+), 27 deletions(-)
---
diff --git a/plug-ins/script-fu/scripts/beveled-button.scm b/plug-ins/script-fu/scripts/beveled-button.scm
index 5e75efa..adf4d39 100644
--- a/plug-ins/script-fu/scripts/beveled-button.scm
+++ b/plug-ins/script-fu/scripts/beveled-button.scm
@@ -74,10 +74,10 @@
(bumpmap (car (gimp-layer-new img
img-width img-height RGBA-IMAGE
- "Bumpmap" 100 NORMAL-MODE)))
+ _"Bumpmap" 100 NORMAL-MODE)))
(gradient (car (gimp-layer-new img
img-width img-height RGBA-IMAGE
- "Gradient" 100 NORMAL-MODE)))
+ _"Gradient" 100 NORMAL-MODE)))
)
(gimp-context-push)
@@ -86,7 +86,7 @@
; Create bumpmap layer
- (gimp-image-add-layer img bumpmap -1)
+ (gimp-image-insert-layer img bumpmap -1 -1)
(gimp-context-set-foreground '(0 0 0))
(gimp-context-set-background '(255 255 255))
(gimp-edit-fill bumpmap BACKGROUND-FILL)
@@ -107,7 +107,7 @@
; Create gradient layer
- (gimp-image-add-layer img gradient -1)
+ (gimp-image-insert-layer img gradient -1 -1)
(gimp-context-set-foreground ul-color)
(gimp-context-set-background lr-color)
diff --git a/plug-ins/script-fu/scripts/beveled-pattern-arrow.scm b/plug-ins/script-fu/scripts/beveled-pattern-arrow.scm
index ebd61b5..66a1845 100644
--- a/plug-ins/script-fu/scripts/beveled-pattern-arrow.scm
+++ b/plug-ins/script-fu/scripts/beveled-pattern-arrow.scm
@@ -75,8 +75,8 @@
(let* (
(img (car (gimp-image-new size size RGB)))
- (background (car (gimp-layer-new img size size RGB-IMAGE "Arrow" 100 NORMAL-MODE)))
- (bumpmap (car (gimp-layer-new img size size RGB-IMAGE "Bumpmap" 100 NORMAL-MODE)))
+ (background (car (gimp-layer-new img size size RGB-IMAGE _"Arrow" 100 NORMAL-MODE)))
+ (bumpmap (car (gimp-layer-new img size size RGB-IMAGE _"Bumpmap" 100 NORMAL-MODE)))
(big-arrow (point-list->double-array (rotate-points (make-arrow size 6) size orientation)))
(med-arrow (point-list->double-array (rotate-points (make-arrow size 7) size orientation)))
(small-arrow (point-list->double-array (rotate-points (make-arrow size 8) size orientation)))
@@ -85,8 +85,8 @@
(gimp-context-push)
(gimp-image-undo-disable img)
- (gimp-image-add-layer img background -1)
- (gimp-image-add-layer img bumpmap -1)
+ (gimp-image-insert-layer img background -1 -1)
+ (gimp-image-insert-layer img bumpmap -1 -1)
; Create pattern layer
diff --git a/plug-ins/script-fu/scripts/beveled-pattern-bullet.scm b/plug-ins/script-fu/scripts/beveled-pattern-bullet.scm
index fc9d978..4ee81f2 100644
--- a/plug-ins/script-fu/scripts/beveled-pattern-bullet.scm
+++ b/plug-ins/script-fu/scripts/beveled-pattern-bullet.scm
@@ -22,15 +22,15 @@
(define (script-fu-beveled-pattern-bullet diameter pattern transparent)
(let* (
(img (car (gimp-image-new diameter diameter RGB)))
- (background (car (gimp-layer-new img diameter diameter RGBA-IMAGE "Bullet" 100 NORMAL-MODE)))
- (bumpmap (car (gimp-layer-new img diameter diameter RGBA-IMAGE "Bumpmap" 100 NORMAL-MODE)))
+ (background (car (gimp-layer-new img diameter diameter RGBA-IMAGE _"Bullet" 100 NORMAL-MODE)))
+ (bumpmap (car (gimp-layer-new img diameter diameter RGBA-IMAGE _"Bumpmap" 100 NORMAL-MODE)))
)
(gimp-context-push)
(gimp-image-undo-disable img)
- (gimp-image-add-layer img background -1)
- (gimp-image-add-layer img bumpmap -1)
+ (gimp-image-insert-layer img background -1 -1)
+ (gimp-image-insert-layer img bumpmap -1 -1)
; Create pattern layer
diff --git a/plug-ins/script-fu/scripts/beveled-pattern-button.scm b/plug-ins/script-fu/scripts/beveled-pattern-button.scm
index 37a69a7..e6aad41 100644
--- a/plug-ins/script-fu/scripts/beveled-pattern-button.scm
+++ b/plug-ins/script-fu/scripts/beveled-pattern-button.scm
@@ -53,8 +53,8 @@
(+ ascent descent)))
(img (car (gimp-image-new width height RGB)))
- (background (car (gimp-layer-new img width height RGBA-IMAGE "Background" 100 NORMAL-MODE)))
- (bumpmap (car (gimp-layer-new img width height RGBA-IMAGE "Bumpmap" 100 NORMAL-MODE)))
+ (background (car (gimp-layer-new img width height RGBA-IMAGE _"Background" 100 NORMAL-MODE)))
+ (bumpmap (car (gimp-layer-new img width height RGBA-IMAGE _"Bumpmap" 100 NORMAL-MODE)))
(textl (car
(gimp-text-fontname
img -1 0 0 text 0 TRUE text-size PIXELS font)))
@@ -63,8 +63,8 @@
(gimp-context-push)
(gimp-image-undo-disable img)
- (gimp-image-add-layer img background 1)
- (gimp-image-add-layer img bumpmap 1)
+ (gimp-image-insert-layer img background -1 1)
+ (gimp-image-insert-layer img bumpmap -1 1)
; Create pattern layer
diff --git a/plug-ins/script-fu/scripts/beveled-pattern-heading.scm b/plug-ins/script-fu/scripts/beveled-pattern-heading.scm
index 1238e2a..e15bdf1 100644
--- a/plug-ins/script-fu/scripts/beveled-pattern-heading.scm
+++ b/plug-ins/script-fu/scripts/beveled-pattern-heading.scm
@@ -38,18 +38,18 @@
(background (car (gimp-layer-new img
width height RGBA-IMAGE
- "Background" 100 NORMAL-MODE)))
+ _"Background" 100 NORMAL-MODE)))
(bumpmap (car (gimp-layer-new img
width height RGBA-IMAGE
- "Bumpmap" 100 NORMAL-MODE)))
+ _"Bumpmap" 100 NORMAL-MODE)))
)
(gimp-context-push)
(gimp-image-undo-disable img)
(gimp-image-resize img width height 0 0)
- (gimp-image-add-layer img background 1)
- (gimp-image-add-layer img bumpmap 1)
+ (gimp-image-insert-layer img background -1 1)
+ (gimp-image-insert-layer img bumpmap -1 1)
; Create pattern layer
@@ -64,12 +64,12 @@
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-context-set-background '(127 127 127))
- (gimp-selection-layer-alpha textl)
+ (gimp-item-to-selection textl 2)
(gimp-selection-shrink img 1)
(gimp-edit-fill bumpmap BACKGROUND-FILL)
(gimp-context-set-background '(255 255 255))
- (gimp-selection-layer-alpha textl)
+ (gimp-item-to-selection textl 2)
(gimp-selection-shrink img 2)
(gimp-edit-fill bumpmap BACKGROUND-FILL)
@@ -82,7 +82,7 @@
; Clean up
(gimp-context-set-background '(0 0 0))
- (gimp-selection-layer-alpha textl)
+ (gimp-item-to-selection textl 2)
(gimp-selection-invert img)
(gimp-edit-clear background)
(gimp-selection-none img)
diff --git a/plug-ins/script-fu/scripts/beveled-pattern-hrule.scm b/plug-ins/script-fu/scripts/beveled-pattern-hrule.scm
index 98bf1d5..779bb4c 100644
--- a/plug-ins/script-fu/scripts/beveled-pattern-hrule.scm
+++ b/plug-ins/script-fu/scripts/beveled-pattern-hrule.scm
@@ -24,17 +24,17 @@
(img (car (gimp-image-new width height RGB)))
(background (car (gimp-layer-new img
width height RGB-IMAGE
- "Hrule" 100 NORMAL-MODE)))
+ _"Hrule" 100 NORMAL-MODE)))
(bumpmap (car (gimp-layer-new img
width height RGBA-IMAGE
- "Bumpmap" 100 NORMAL-MODE)))
+ _"Bumpmap" 100 NORMAL-MODE)))
)
(gimp-context-push)
(gimp-image-undo-disable img)
- (gimp-image-add-layer img background -1)
- (gimp-image-add-layer img bumpmap -1)
+ (gimp-image-insert-layer img background -1 -1)
+ (gimp-image-insert-layer img bumpmap -1 -1)
; Create pattern layer
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]