don't load script-fu-compat.init here.

2006-10-19  Sven Neumann  <sven@gimp.org>

	* plug-ins/script-fu/scripts/script-fu.init: don't load
	script-fu-compat.init here.

	* plug-ins/script-fu/scheme-wrapper.c (tinyscheme_init): load it
	here, from the same place where script-fu.init was found.

	* plug-ins/script-fu/script-fu-interface.c: made the code more
	robust against invalid adjustment types.
This commit is contained in:
Sven Neumann
2006-10-19 15:25:02 +00:00
committed by Sven Neumann
parent c97fc7a7a5
commit a92d405849
4 changed files with 31 additions and 4 deletions

View File

@ -1,3 +1,14 @@
2006-10-19 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/scripts/script-fu.init: don't load
script-fu-compat.init here.
* plug-ins/script-fu/scheme-wrapper.c (tinyscheme_init): load it
here, from the same place where script-fu.init was found.
* plug-ins/script-fu/script-fu-interface.c: made the code more
robust against invalid adjustment types.
2006-10-19 Sven Neumann <sven@gimp.org> 2006-10-19 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-interface.[ch] * plug-ins/script-fu/script-fu-interface.[ch]

View File

@ -333,6 +333,21 @@ tinyscheme_init (const gchar *path,
{ {
scheme_load_file (&sc, fin); scheme_load_file (&sc, fin);
fclose (fin); fclose (fin);
/* To improve compatibility with older Script-Fu scripts,
* load script-fu-compat.init from the same directory.
*/
filename = g_build_filename (list->data,
"script-fu-compat.init", NULL);
fin = g_fopen (filename, "rb");
g_free (filename);
if (fin)
{
scheme_load_file (&sc, fin);
fclose (fin);
}
break; break;
} }
} }

View File

@ -408,6 +408,11 @@ script_fu_interface (SFScript *script,
gtk_entry_set_activates_default (GIMP_SCALE_ENTRY_SPINBUTTON (script->arg_values[i].sfa_adjustment.adj), TRUE); gtk_entry_set_activates_default (GIMP_SCALE_ENTRY_SPINBUTTON (script->arg_values[i].sfa_adjustment.adj), TRUE);
break; break;
default:
g_warning ("unexpected adjustment type: %d",
script->arg_defaults[i].sfa_adjustment.type);
/* fallthrough */
case SF_SPINNER: case SF_SPINNER:
left_align = TRUE; left_align = TRUE;
widget = widget =

View File

@ -582,7 +582,3 @@
(else (error "cond-expand : unknown operator" (car condition))))))) (else (error "cond-expand : unknown operator" (car condition)))))))
(gc-verbose #f) (gc-verbose #f)
; The following improves compatibility with older Script-Fu scripts.
(load (string-append gimp-data-directory DIR-SEPARATOR "scripts"
DIR-SEPARATOR "script-fu-compat.init"))