in case of an error, output the SIOD error message to stderr.
2006-06-08 Sven Neumann <sven@gimp.org> * plug-ins/script-fu/script-fu-console.c (script_fu_eval_run): in case of an error, output the SIOD error message to stderr. * plug-ins/script-fu/siod-wrapper.c: minor cleanup.
This commit is contained in:

committed by
Sven Neumann

parent
0e42a8161f
commit
07e246c6ba
@ -1,3 +1,10 @@
|
|||||||
|
2006-06-08 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* plug-ins/script-fu/script-fu-console.c (script_fu_eval_run):
|
||||||
|
in case of an error, output the SIOD error message to stderr.
|
||||||
|
|
||||||
|
* plug-ins/script-fu/siod-wrapper.c: minor cleanup.
|
||||||
|
|
||||||
2006-06-08 Sven Neumann <sven@gimp.org>
|
2006-06-08 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* plug-ins/script-fu/script-fu-scripts.c
|
* plug-ins/script-fu/script-fu-scripts.c
|
||||||
|
@ -94,10 +94,10 @@ siod_print_welcome (void)
|
|||||||
gint
|
gint
|
||||||
siod_interpret_string (const gchar *expr)
|
siod_interpret_string (const gchar *expr)
|
||||||
{
|
{
|
||||||
return repl_c_string ((char *)expr, 0, 0, 1);
|
return repl_c_string ((char *) expr, 0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const gchar *
|
||||||
siod_get_error_msg (void)
|
siod_get_error_msg (void)
|
||||||
{
|
{
|
||||||
return siod_err_msg;
|
return siod_err_msg;
|
||||||
|
@ -465,7 +465,7 @@ script_fu_cc_key_function (GtkWidget *widget,
|
|||||||
|
|
||||||
gtk_entry_set_text (GTK_ENTRY (console->cc), "");
|
gtk_entry_set_text (GTK_ENTRY (console->cc), "");
|
||||||
|
|
||||||
siod_interpret_string ((char *) list->data);
|
siod_interpret_string ((const gchar *) list->data);
|
||||||
gimp_displays_flush ();
|
gimp_displays_flush ();
|
||||||
|
|
||||||
console->history = g_list_append (console->history, NULL);
|
console->history = g_list_append (console->history, NULL);
|
||||||
@ -567,7 +567,7 @@ script_fu_eval_run (const gchar *name,
|
|||||||
{
|
{
|
||||||
static GimpParam values[1];
|
static GimpParam values[1];
|
||||||
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
|
||||||
GimpRunMode run_mode;
|
GimpRunMode run_mode;
|
||||||
|
|
||||||
run_mode = params[0].data.d_int32;
|
run_mode = params[0].data.d_int32;
|
||||||
|
|
||||||
@ -575,14 +575,21 @@ script_fu_eval_run (const gchar *name,
|
|||||||
{
|
{
|
||||||
case GIMP_RUN_NONINTERACTIVE:
|
case GIMP_RUN_NONINTERACTIVE:
|
||||||
if (siod_interpret_string (params[1].data.d_string) != 0)
|
if (siod_interpret_string (params[1].data.d_string) != 0)
|
||||||
status = GIMP_PDB_EXECUTION_ERROR;
|
{
|
||||||
|
const gchar *msg = siod_get_error_msg ();
|
||||||
|
|
||||||
|
if (msg)
|
||||||
|
g_printerr (msg);
|
||||||
|
|
||||||
|
status = GIMP_PDB_EXECUTION_ERROR;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_RUN_INTERACTIVE:
|
case GIMP_RUN_INTERACTIVE:
|
||||||
case GIMP_RUN_WITH_LAST_VALS:
|
case GIMP_RUN_WITH_LAST_VALS:
|
||||||
status = GIMP_PDB_CALLING_ERROR;
|
status = GIMP_PDB_CALLING_ERROR;
|
||||||
g_message (_("Script-Fu evaluate mode allows only "
|
g_message (_("Script-Fu evaluation mode only allows "
|
||||||
"noninteractive invocation"));
|
"non-interactive invocation"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -94,10 +94,10 @@ siod_print_welcome (void)
|
|||||||
gint
|
gint
|
||||||
siod_interpret_string (const gchar *expr)
|
siod_interpret_string (const gchar *expr)
|
||||||
{
|
{
|
||||||
return repl_c_string ((char *)expr, 0, 0, 1);
|
return repl_c_string ((char *) expr, 0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const gchar *
|
||||||
siod_get_error_msg (void)
|
siod_get_error_msg (void)
|
||||||
{
|
{
|
||||||
return siod_err_msg;
|
return siod_err_msg;
|
||||||
|
Reference in New Issue
Block a user