renamed member "decription" to "menu_path".

2004-09-30  Michael Natterer  <mitch@gimp.org>

	* plug-ins/script-fu/script-fu-types.h (struct SFScript): renamed
	member "decription" to "menu_path".

	* plug-ins/script-fu/script-fu-interface.c: changed accordingly.

	* plug-ins/script-fu/script-fu-scripts.c: ditto. Don't pass the
	menu_path as "blurb" to gimp_install_temp_proc(). Instead,
	pass "help" as "blurb" and nothing as "help".

	* plug-ins/script-fu/scripts/test-sphere.scm: shortened overly
	long and useless help text.
This commit is contained in:
Michael Natterer
2004-09-30 12:37:42 +00:00
committed by Michael Natterer
parent 662559ee88
commit 18af15ee94
5 changed files with 26 additions and 12 deletions

View File

@ -1,3 +1,17 @@
2004-09-30 Michael Natterer <mitch@gimp.org>
* plug-ins/script-fu/script-fu-types.h (struct SFScript): renamed
member "decription" to "menu_path".
* plug-ins/script-fu/script-fu-interface.c: changed accordingly.
* plug-ins/script-fu/script-fu-scripts.c: ditto. Don't pass the
menu_path as "blurb" to gimp_install_temp_proc(). Instead,
pass "help" as "blurb" and nothing as "help".
* plug-ins/script-fu/scripts/test-sphere.scm: shortened overly
long and useless help text.
2004-09-30 Michael Natterer <mitch@gimp.org>
* plug-ins/dbbrowser/gimpprocbox.c: don't include

View File

@ -187,11 +187,11 @@ script_fu_interface (SFScript *script)
sf_interface->args_widgets = g_new0 (GtkWidget *, script->num_args);
/* strip the first part of the menupath if it contains _("/Script-Fu/") */
buf = strstr (gettext (script->description), _("/Script-Fu/"));
buf = strstr (gettext (script->menu_path), _("/Script-Fu/"));
if (buf)
title = g_strdup (buf + strlen (_("/Script-Fu/")));
else
title = g_strdup (gettext (script->description));
title = g_strdup (gettext (script->menu_path));
/* strip mnemonics from the menupath */
sf_interface->title = gimp_strip_uline (title);

View File

@ -160,9 +160,9 @@ script_fu_add_script (LISP a)
if (*s == '-')
*s = '_';
/* Find the script description */
/* Find the script menu_path */
val = get_c_string (car (a));
script->description = g_strdup (val);
script->menu_path = g_strdup (val);
a = cdr (a);
/* Find the script help */
@ -539,7 +539,7 @@ script_fu_add_script (LISP a)
}
script->args = args;
g_tree_insert (script_list, gettext (script->description), script);
g_tree_insert (script_list, gettext (script->menu_path), script);
return NIL;
}
@ -592,12 +592,12 @@ script_fu_install_script (gpointer foo,
gchar *menu_path = NULL;
/* Allow scripts with no menus */
if (strncmp (script->description, "<None>", 6) != 0)
menu_path = script->description;
if (strncmp (script->menu_path, "<None>", 6) != 0)
menu_path = script->menu_path;
gimp_install_temp_proc (script->pdb_name,
script->description,
script->help,
"",
script->author,
script->copyright,
script->date,
@ -657,7 +657,7 @@ script_fu_script_proc (const gchar *name,
case GIMP_RUN_INTERACTIVE:
case GIMP_RUN_WITH_LAST_VALS:
/* Determine whether the script is image based (runs on an image) */
if (strncmp (script->description, "<Image>", 7) == 0)
if (strncmp (script->menu_path, "<Image>", 7) == 0)
{
script->arg_values[0].sfa_image = params[1].data.d_image;
script->arg_values[1].sfa_drawable = params[2].data.d_drawable;
@ -830,7 +830,7 @@ script_fu_free_script (SFScript *script)
if (script)
{
g_free (script->script_name);
g_free (script->description);
g_free (script->menu_path);
g_free (script->help);
g_free (script->author);
g_free (script->copyright);

View File

@ -78,7 +78,7 @@ typedef struct
{
gchar *script_name;
gchar *pdb_name;
gchar *description;
gchar *menu_path;
gchar *help;
gchar *author;
gchar *copyright;

View File

@ -211,7 +211,7 @@
(script-fu-register "script-fu-test-sphere"
"<Toolbox>/Xtns/Script-Fu/Test/_Sphere..."
"Simple script to test and show the usage of the new Script-Fu API extensions. \n\nNote the use of spinbuttons, sliders, the font, pattern, brush and gradient selectors and do not forget the about dialog..."
"Simple script to test and show the usage of the new Script-Fu API extensions."
"Spencer Kimball, Sven Neumann"
"Spencer Kimball"
"1996, 1998"