app: make sure to always show error messages returned by plug-ins

gimp_plug_in_handle_proc_return(): if there is no plug-in main loop
running (the plugin was running asynchronously from a menu), show the
plug-in's error message here, because nobody else will show it
otherwise.
This commit is contained in:
Michael Natterer 2010-09-07 16:21:40 +02:00
parent 23aaf69779
commit bdc2d4520b
1 changed files with 17 additions and 7 deletions

View File

@ -608,8 +608,6 @@ gimp_plug_in_handle_proc_return (GimpPlugIn *plug_in,
g_return_if_fail (proc_return != NULL);
if (proc_frame->main_loop)
{
proc_frame->return_vals =
plug_in_params_to_args (proc_frame->procedure->values,
proc_frame->procedure->num_values,
@ -617,8 +615,20 @@ gimp_plug_in_handle_proc_return (GimpPlugIn *plug_in,
proc_return->nparams,
TRUE, TRUE);
if (proc_frame->main_loop)
{
g_main_loop_quit (proc_frame->main_loop);
}
else
{
/* the plug-in is run asynchronously, so display its error
* messages here because nobody else will do it
*/
gimp_plug_in_procedure_handle_return_values (GIMP_PLUG_IN_PROCEDURE (proc_frame->procedure),
plug_in->manager->gimp,
proc_frame->progress,
proc_frame->return_vals);
}
gimp_plug_in_close (plug_in, FALSE);
}