Commit ec78557f authored by Sven Neumann's avatar Sven Neumann
Browse files

Changed most of the scripts to make use of the new argument type SF-STRING .


--Sven
parent 7f6178b4
Wed Aug 5 23:31:54 MEST 1998 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/scripts/*.scm (well, almost): Changed all
scripts to make use of the new SF-STRING argument type where
appropriate.
Wed Aug 5 21:39:59 MEST 1998 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-enums.h
......
......@@ -4,3 +4,4 @@ Makefile
_libs
.libs
script-fu
convert-script
......@@ -32,6 +32,8 @@
#define COLOR_SAMPLE_WIDTH 100
#define COLOR_SAMPLE_HEIGHT 15
#define MAX_STRING_LENGTH 4096
typedef struct
{
GtkWidget *preview;
......@@ -574,7 +576,7 @@ script_fu_script_proc (char *name,
gint err_msg;
char *text = NULL;
char *command, *c;
char buffer[32];
char buffer[MAX_STRING_LENGTH];
int length;
int i;
......@@ -637,7 +639,7 @@ script_fu_script_proc (char *name,
text = params[i + 1].data.d_string;
break;
case SF_STRING:
sprintf (buffer, "\"%s\"", params[i + 1].data.d_string);
g_snprintf (buffer, MAX_STRING_LENGTH, "\"%s\"", params[i + 1].data.d_string);
text = buffer;
break;
default:
......@@ -1037,7 +1039,7 @@ script_fu_ok_callback (GtkWidget *widget,
gint err_msg;
char *text = NULL;
char *command, *c;
char buffer[32];
char buffer[MAX_STRING_LENGTH];
int length;
int i;
......@@ -1102,7 +1104,7 @@ script_fu_ok_callback (GtkWidget *widget,
break;
case SF_STRING:
text = gtk_entry_get_text (GTK_ENTRY (script->args_widgets[i]));
sprintf (buffer, "\"%s\"", text);
g_snprintf (buffer, MAX_STRING_LENGTH, "\"%s\"", text);
text = buffer;
break;
default:
......
......@@ -32,6 +32,8 @@
#define COLOR_SAMPLE_WIDTH 100
#define COLOR_SAMPLE_HEIGHT 15
#define MAX_STRING_LENGTH 4096
typedef struct
{
GtkWidget *preview;
......@@ -574,7 +576,7 @@ script_fu_script_proc (char *name,
gint err_msg;
char *text = NULL;
char *command, *c;
char buffer[32];
char buffer[MAX_STRING_LENGTH];
int length;
int i;
......@@ -637,7 +639,7 @@ script_fu_script_proc (char *name,
text = params[i + 1].data.d_string;
break;
case SF_STRING:
sprintf (buffer, "\"%s\"", params[i + 1].data.d_string);
g_snprintf (buffer, MAX_STRING_LENGTH, "\"%s\"", params[i + 1].data.d_string);
text = buffer;
break;
default:
......@@ -1037,7 +1039,7 @@ script_fu_ok_callback (GtkWidget *widget,
gint err_msg;
char *text = NULL;
char *command, *c;
char buffer[32];
char buffer[MAX_STRING_LENGTH];
int length;
int i;
......@@ -1102,7 +1104,7 @@ script_fu_ok_callback (GtkWidget *widget,
break;
case SF_STRING:
text = gtk_entry_get_text (GTK_ENTRY (script->args_widgets[i]));
sprintf (buffer, "\"%s\"", text);
g_snprintf (buffer, MAX_STRING_LENGTH, "\"%s\"", text);
text = buffer;
break;
default:
......
......@@ -81,10 +81,10 @@
"Hrvoje Horvat"
"07 April, 1998"
""
SF-VALUE "Text Pattern" "\"Parque #1\""
SF-VALUE "Text String" "\"The Gimp\""
SF-STRING "Text Pattern" "Parque #1"
SF-STRING "Text String" "The Gimp"
SF-VALUE "Font Size (in pixels)" "100"
SF-VALUE "Font" "\"Roostheavy\""
SF-STRING "Font" "Roostheavy"
SF-VALUE "Outline blur radius" "5"
SF-VALUE "Shadow blur radius" "10"
SF-VALUE "Bump-map (alpha layer) blur radius" "5"
......
......@@ -151,14 +151,14 @@
"Adrian Likins"
"July 1997"
""
SF-VALUE "Text" "\"Hello world!\""
SF-STRING "Text" "Hello world!"
SF-VALUE "Size" "22"
SF-VALUE "Foundry" "\"*\""
SF-VALUE "Family" "\"futura_poster\""
SF-VALUE "Weight" "\"*\""
SF-VALUE "Slant" "\"*\""
SF-VALUE "Set width" "\"*\""
SF-VALUE "Spacing" "\"*\""
SF-STRING "Foundry" "*"
SF-STRING "Family" "futura_poster"
SF-STRING "Weight" "*"
SF-STRING "Slant" "*"
SF-STRING "Set width" "*"
SF-STRING "Spacing" "*"
SF-COLOR "Text color" '(0 0 0)
SF-COLOR "Glow Color" '(63 252 0)
SF-COLOR "Background Color" '(0 0 0)
......
......@@ -44,7 +44,7 @@
"Spencer Kimball"
"1997"
""
SF-VALUE "Text String" "\"ALIEN\""
SF-STRING "Text String" "ALIEN"
SF-VALUE "Font Size (in pixels)" "150"
SF-VALUE "Font" "\"futura_poster\""
SF-STRING "Font" "futura_poster"
SF-COLOR "Glow Color" '(63 252 0))
......@@ -242,8 +242,8 @@
"8th April 1998"
"Chris Gutteridge / ECS @ University of Southampton, England"
"bar"
SF-VALUE "File Name:" "\"afile\""
SF-VALUE "Font:" "\"Charter\""
SF-STRING "File Name:" "afile"
SF-STRING "Font:" "Charter"
SF-VALUE "Font size:" "45"
SF-COLOR "Text Color:" '(0 0 0)
SF-TOGGLE "Transparent BG?" FALSE
......@@ -262,8 +262,8 @@
"bar"
SF-IMAGE "Image" 0
SF-DRAWABLE "Layer" 0
SF-VALUE "File Name:" "\"afile\""
SF-VALUE "Font:" "\"Charter\""
SF-STRING "File Name:" "afile"
SF-STRING "Font:" "Charter"
SF-VALUE "Font size:" "45"
SF-COLOR "Text Color:" '(0 0 0)
SF-TOGGLE "Flatten Image?" TRUE
......
......@@ -41,8 +41,8 @@
"Spencer Kimball"
"1996"
""
SF-VALUE "Text String" "\"The Gimp\""
SF-STRING "Text String" "The Gimp"
SF-VALUE "Font Size (in pixels)" "100"
SF-VALUE "Font" "\"Dragonwick\""
SF-STRING "Font" "Dragonwick"
SF-COLOR "Background Color" '(255 255 255)
SF-COLOR "Text Color" '(6 6 206))
......@@ -57,8 +57,8 @@
"Spencer Kimball"
"1996"
""
SF-VALUE "Text String" "\"SCRIPT-FU\""
SF-STRING "Text String" "SCRIPT-FU"
SF-VALUE "Font Size (in pixels)" "150"
SF-VALUE "Font" "\"futura_poster\""
SF-STRING "Font" "futura_poster"
SF-COLOR "Background Color" '(255 255 255)
SF-COLOR "Text Color" '(206 6 50))
......@@ -169,14 +169,14 @@
"Federico Mena Quintero"
"June 1997"
""
SF-VALUE "Text" "\"Hello world!\""
SF-STRING "Text" "Hello world!"
SF-VALUE "Size" "16"
SF-VALUE "Foundry" "\"adobe\""
SF-VALUE "Family" "\"helvetica\""
SF-VALUE "Weight" "\"bold\""
SF-VALUE "Slant" "\"r\""
SF-VALUE "Set width" "\"normal\""
SF-VALUE "Spacing" "\"p\""
SF-STRING "Foundry" "adobe"
SF-STRING "Family" "helvetica"
SF-STRING "Weight" "bold"
SF-STRING "Slant" "r"
SF-STRING "Set width" "normal"
SF-STRING "Spacing" "p"
SF-COLOR "Upper-left color" '(0 255 127)
SF-COLOR "Lower-right color" '(0 127 255)
SF-COLOR "Text color" '(0 0 0)
......
......@@ -142,4 +142,4 @@
""
SF-VALUE "Size" "32"
SF-VALUE "Orientation" "'right"
SF-VALUE "Pattern" "\"Wood\"")
SF-STRING "Pattern" "Wood")
......@@ -81,5 +81,5 @@
"July 1997"
""
SF-VALUE "Diameter" "16"
SF-VALUE "Pattern" "\"Wood\""
SF-STRING "Pattern" "Wood"
SF-TOGGLE "Transparent background" FALSE)
......@@ -116,14 +116,14 @@
"Federico Mena Quintero"
"July 1997"
""
SF-VALUE "Text" "\"Hello world!\""
SF-STRING "Text" "Hello world!"
SF-VALUE "Text size" "32"
SF-VALUE "Foundry" "\"adobe\""
SF-VALUE "Family" "\"utopia\""
SF-VALUE "Weight" "\"bold\""
SF-VALUE "Slant" "\"r\""
SF-VALUE "Set width" "\"normal\""
SF-VALUE "Spacing" "\"p\""
SF-STRING "Foundry" "adobe"
SF-STRING "Family" "utopia"
SF-STRING "Weight" "bold"
SF-STRING "Slant" "r"
SF-STRING "Set width" "normal"
SF-STRING "Spacing" "p"
SF-COLOR "Text color" '(0 0 0)
SF-VALUE "Pattern" "\"Wood\""
SF-STRING "Pattern" "Wood"
SF-TOGGLE "Pressed?" FALSE)
......@@ -94,13 +94,13 @@
"Federico Mena Quintero"
"July 1997"
""
SF-VALUE "Text" "\"Hello world!\""
SF-STRING "Text" "Hello world!"
SF-VALUE "Text size" "72"
SF-VALUE "Foundry" "\"adobe\""
SF-VALUE "Family" "\"utopia\""
SF-VALUE "Weight" "\"bold\""
SF-VALUE "Slant" "\"r\""
SF-VALUE "Set width" "\"normal\""
SF-VALUE "Spacing" "\"p\""
SF-VALUE "Pattern" "\"Wood\""
SF-STRING "Foundry" "adobe"
SF-STRING "Family" "utopia"
SF-STRING "Weight" "bold"
SF-STRING "Slant" "r"
SF-STRING "Set width" "normal"
SF-STRING "Spacing" "p"
SF-STRING "Pattern" "Wood"
SF-TOGGLE "Transparent background" FALSE)
......@@ -71,4 +71,4 @@
""
SF-VALUE "Width" "480"
SF-VALUE "Height" "16"
SF-VALUE "Pattern" "\"Wood\"")
SF-STRING "Pattern" "Wood")
......@@ -81,9 +81,9 @@
"1996"
""
SF-VALUE "Blend Mode" "FG-BG-RGB"
SF-VALUE "Text String" "\"The GIMP\""
SF-STRING "Text String" "The GIMP"
SF-VALUE "Font Size (in pixels)" "150"
SF-VALUE "Font" "\"Crillee\""
SF-STRING "Font" "Crillee"
SF-COLOR "Background Color" '(255 255 255)
SF-COLOR "Text Color" '(124 174 255)
SF-COLOR "Starting Blend" '(22 9 129)
......
......@@ -75,6 +75,6 @@
"Brian McFee"
"April 1998"
""
SF-VALUE "Text String" "\"Fear the Cow\""
SF-STRING "Text String" "Fear the Cow"
SF-VALUE "Font Size (in pixels)" "80"
SF-VALUE "Font" "\"roostheavy\"")
SF-STRING "Font" "roostheavy")
......@@ -157,8 +157,8 @@
"Spencer Kimball"
"1997"
""
SF-VALUE "Text String" "\"Marble\""
SF-STRING "Text String" "Marble"
SF-VALUE "Font Size (in pixels)" "100"
SF-VALUE "Font" "\"Engraver\""
SF-VALUE "Background Img" (string-append "\"" gimp-data-dir "/scripts/texture3.jpg\"")
SF-STRING "Font" "Engraver"
SF-STRING "Background Img" (string-append "" gimp-data-dir "/scripts/texture3.jpg")
SF-TOGGLE "Carve Raised Text" FALSE)
......@@ -73,8 +73,8 @@
"Manish Singh"
"October 1997"
""
SF-VALUE "Text String" "\"CHALK\""
SF-STRING "Text String" "CHALK"
SF-VALUE "Font Size (in pixels)" "150"
SF-VALUE "Font" "\"Cooper\""
SF-STRING "Font" "Cooper"
SF-COLOR "Background Color" '(0 0 0)
SF-COLOR "Chalk Color" '(255 255 255))
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