*** empty log message ***

This commit is contained in:
Marc Lehmann
1999-12-05 20:48:06 +00:00
parent 843f496ddb
commit 12976d24f4
3 changed files with 184 additions and 158 deletions

View File

@ -1,3 +1,9 @@
Sun Dec 5 19:21:33 CET 1999 Marc Lehmann <marc@gimp.org>
* plug-ins/script-fu/script-fu-scripts.c: Install function names
with underscores instead of minus signs. Should improve the life
of almost all other languages.
1999-12-05 Garry R. Osgood <gosgood@idt.net> 1999-12-05 Garry R. Osgood <gosgood@idt.net>
Inaugural checkin: Tile accounting Inaugural checkin: Tile accounting
* app/tile_cache.c * app/tile_cache.c

View File

@ -132,6 +132,7 @@ typedef struct
{ {
GtkWidget ** args_widgets; GtkWidget ** args_widgets;
gchar * script_name; gchar * script_name;
gchar * pdb_name;
gchar * description; gchar * description;
gchar * help; gchar * help;
gchar * author; gchar * author;
@ -400,7 +401,7 @@ script_fu_add_script (LISP a)
LISP color_list; LISP color_list;
LISP adj_list; LISP adj_list;
LISP brush_list; LISP brush_list;
gchar *menu_path = NULL; gchar *s, *menu_path = NULL;
/* Check the length of a */ /* Check the length of a */
if (nlength (a) < 7) if (nlength (a) < 7)
@ -414,6 +415,15 @@ script_fu_add_script (LISP a)
script->script_name = g_strdup (val); script->script_name = g_strdup (val);
a = cdr (a); a = cdr (a);
/* transform the function name into a name containing "_" for each "-".
* this does not hurt anybody, yet improves the life of many... ;)
*/
script->pdb_name = g_strdup (val);
for (s = script->pdb_name; *s; s++)
if (*s == '-')
*s = '_';
/* Find the script description */ /* Find the script description */
val = get_c_string (car (a)); val = get_c_string (car (a));
script->description = g_strdup (val); script->description = g_strdup (val);
@ -703,7 +713,7 @@ script_fu_add_script (LISP a)
} }
} }
gimp_install_temp_proc (script->script_name, gimp_install_temp_proc (script->pdb_name,
script->description, script->description,
script->help, script->help,
script->author, script->author,
@ -949,7 +959,7 @@ script_fu_script_proc (char *name,
} }
static SFScript * static SFScript *
script_fu_find_script (gchar *script_name) script_fu_find_script (gchar *pdb_name)
{ {
GList *list; GList *list;
SFScript *script; SFScript *script;
@ -958,7 +968,7 @@ script_fu_find_script (gchar *script_name)
while (list) while (list)
{ {
script = (SFScript *) list->data; script = (SFScript *) list->data;
if (! strcmp (script->script_name, script_name)) if (! strcmp (script->pdb_name, pdb_name))
return script; return script;
list = list->next; list = list->next;

View File

@ -132,6 +132,7 @@ typedef struct
{ {
GtkWidget ** args_widgets; GtkWidget ** args_widgets;
gchar * script_name; gchar * script_name;
gchar * pdb_name;
gchar * description; gchar * description;
gchar * help; gchar * help;
gchar * author; gchar * author;
@ -400,7 +401,7 @@ script_fu_add_script (LISP a)
LISP color_list; LISP color_list;
LISP adj_list; LISP adj_list;
LISP brush_list; LISP brush_list;
gchar *menu_path = NULL; gchar *s, *menu_path = NULL;
/* Check the length of a */ /* Check the length of a */
if (nlength (a) < 7) if (nlength (a) < 7)
@ -414,6 +415,15 @@ script_fu_add_script (LISP a)
script->script_name = g_strdup (val); script->script_name = g_strdup (val);
a = cdr (a); a = cdr (a);
/* transform the function name into a name containing "_" for each "-".
* this does not hurt anybody, yet improves the life of many... ;)
*/
script->pdb_name = g_strdup (val);
for (s = script->pdb_name; *s; s++)
if (*s == '-')
*s = '_';
/* Find the script description */ /* Find the script description */
val = get_c_string (car (a)); val = get_c_string (car (a));
script->description = g_strdup (val); script->description = g_strdup (val);
@ -703,7 +713,7 @@ script_fu_add_script (LISP a)
} }
} }
gimp_install_temp_proc (script->script_name, gimp_install_temp_proc (script->pdb_name,
script->description, script->description,
script->help, script->help,
script->author, script->author,
@ -949,7 +959,7 @@ script_fu_script_proc (char *name,
} }
static SFScript * static SFScript *
script_fu_find_script (gchar *script_name) script_fu_find_script (gchar *pdb_name)
{ {
GList *list; GList *list;
SFScript *script; SFScript *script;
@ -958,7 +968,7 @@ script_fu_find_script (gchar *script_name)
while (list) while (list)
{ {
script = (SFScript *) list->data; script = (SFScript *) list->data;
if (! strcmp (script->script_name, script_name)) if (! strcmp (script->pdb_name, pdb_name))
return script; return script;
list = list->next; list = list->next;