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:

committed by
Kevin Cozens

parent
a5ed305f62
commit
0cb80bdcd8
@ -887,12 +887,9 @@ script_fu_script_proc (const gchar *name,
|
||||
|
||||
if (status == GIMP_PDB_SUCCESS)
|
||||
{
|
||||
GimpRunMode run_mode;
|
||||
GimpRunMode run_mode = params[0].data.d_int32;
|
||||
|
||||
run_mode = params[0].data.d_int32;
|
||||
|
||||
if (script->num_args == 0)
|
||||
run_mode = GIMP_RUN_NONINTERACTIVE;
|
||||
set_run_mode_constant (run_mode);
|
||||
|
||||
switch (run_mode)
|
||||
{
|
||||
@ -901,7 +898,8 @@ script_fu_script_proc (const gchar *name,
|
||||
gint min_args = 0;
|
||||
|
||||
/* First, try to collect the standard script arguments... */
|
||||
min_args = script_fu_collect_standard_args (script, nparams, params);
|
||||
min_args = script_fu_collect_standard_args (script,
|
||||
nparams, params);
|
||||
|
||||
/* ...then acquire the rest of arguments (if any) with a dialog */
|
||||
if (script->num_args > min_args)
|
||||
|
Reference in New Issue
Block a user