mirror of https://github.com/GNOME/gimp.git
synced cleanup procedure with app_exit_after_callback() and documented its
2008-02-18 Sven Neumann <sven@gimp.org> * app/batch.c (batch_exit_after_callback): synced cleanup procedure with app_exit_after_callback() and documented its purpose. svn path=/trunk/; revision=24909
This commit is contained in:
parent
a5a12b89f6
commit
dac1d13c6e
|
@ -1,3 +1,8 @@
|
|||
2008-02-18 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/batch.c (batch_exit_after_callback): synced cleanup
|
||||
procedure with app_exit_after_callback() and documented its purpose.
|
||||
|
||||
2008-02-18 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimpgegltool.c (gimp_gegl_tool_config_get_property):
|
||||
|
|
25
app/batch.c
25
app/batch.c
|
@ -21,11 +21,11 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gegl.h>
|
||||
|
||||
#include "core/core-types.h"
|
||||
|
||||
#include "base/base.h"
|
||||
#include "base/tile-swap.h"
|
||||
|
||||
#include "core/gimp.h"
|
||||
#include "core/gimpparamspecs.h"
|
||||
|
@ -41,8 +41,7 @@
|
|||
#define BATCH_DEFAULT_EVAL_PROC "plug-in-script-fu-eval"
|
||||
|
||||
|
||||
static gboolean batch_exit_after_callback (Gimp *gimp,
|
||||
gboolean kill_it);
|
||||
static gboolean batch_exit_after_callback (Gimp *gimp);
|
||||
static void batch_run_cmd (Gimp *gimp,
|
||||
const gchar *proc_name,
|
||||
GimpProcedure *procedure,
|
||||
|
@ -118,15 +117,23 @@ batch_run (Gimp *gimp,
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* The purpose of this handler is to exit GIMP cleanly when the batch
|
||||
* procedure calls the gimp-exit procedure. Without this callback, the
|
||||
* message "batch command experienced an execution error" would appear
|
||||
* and gimp would hang forever.
|
||||
*/
|
||||
static gboolean
|
||||
batch_exit_after_callback (Gimp *gimp,
|
||||
gboolean kill_it)
|
||||
batch_exit_after_callback (Gimp *gimp)
|
||||
{
|
||||
if (gimp->be_verbose)
|
||||
g_print ("EXIT: %s\n", G_STRLOC);
|
||||
g_print ("EXIT: batch_exit_after_callback\n");
|
||||
|
||||
gegl_exit ();
|
||||
|
||||
/* make sure that the swap files are removed before we quit */
|
||||
tile_swap_exit ();
|
||||
|
||||
/* make sure that the swap file is removed before we quit */
|
||||
base_exit ();
|
||||
exit (EXIT_SUCCESS);
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in New Issue