Create SF-RUN-MODE constant for use in Script-Fu. Fixes bug #479893.

2007-09-27  Kevin Cozens  <kcozens@cvs.gnome.org>

	Create SF-RUN-MODE constant for use in Script-Fu. Fixes bug #479893.

	* plug-ins/script-fu/scheme-wrapper.c
	* plug-ins/script-fu/scheme-wrapper.h: Added set_run_mode_constant()
	which creates a new constant called SF-RUN-MODE. This constant can
	be used by Script-Fu scripts when calling a plug-in that needs to
	know the current run mode.

	* plug-ins/script-fu/script-fu-scripts.c
	* plug-ins/script-fu/script-fu-console.c
	* plug-ins/script-fu/script-fu.c
	* plug-ins/script-fu/script-fu-server.c: Added calls to create the
	new SF-RUN-MODE constant.

	* plug-ins/script-fu/scripts/difference-clouds.scm: Pass SF-RUN-MODE
	to the solid noise plug-in instead of always using RUN-INTERACTIVE.

svn path=/trunk/; revision=23674
This commit is contained in:
Kevin Cozens
2007-09-27 19:54:28 +00:00
committed by Kevin Cozens
parent a5ed305f62
commit 0cb80bdcd8
8 changed files with 45 additions and 8 deletions

View File

@ -195,6 +195,9 @@ script_fu_run (const gchar *name,
tinyscheme_init (path, FALSE);
}
if (param != NULL)
set_run_mode_constant ((GimpRunMode)param[0].data.d_int32);
/* Load all of the available scripts */
script_fu_find_scripts (path);