~ubuntu-branches/ubuntu/vivid/gimp/vivid

« back to all changes in this revision

Viewing changes to app/batch.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach
  • Date: 2012-05-08 18:50:03 UTC
  • mto: (1.1.26) (0.5.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 71.
  • Revision ID: package-import@ubuntu.com-20120508185003-tltkvbaysf8d2426
ImportĀ upstreamĀ versionĀ 2.8.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* GIMP - The GNU Image Manipulation Program
2
2
 * Copyright (C) 1995 Spencer Kimball and Peter Mattis
3
3
 *
4
 
 * This program is free software; you can redistribute it and/or modify
 
4
 * This program is free software: you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License as published by
6
 
 * the Free Software Foundation; either version 2 of the License, or
 
6
 * the Free Software Foundation; either version 3 of the License, or
7
7
 * (at your option) any later version.
8
8
 *
9
9
 * This program is distributed in the hope that it will be useful,
12
12
 * GNU General Public License for more details.
13
13
 *
14
14
 * You should have received a copy of the GNU General Public License
15
 
 * along with this program; if not, write to the Free Software
16
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
15
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
16
 */
18
17
 
19
18
#include "config.h"
41
40
#define BATCH_DEFAULT_EVAL_PROC   "plug-in-script-fu-eval"
42
41
 
43
42
 
44
 
static gboolean  batch_exit_after_callback (Gimp          *gimp);
45
 
static void      batch_run_cmd             (Gimp          *gimp,
46
 
                                            const gchar   *proc_name,
47
 
                                            GimpProcedure *procedure,
48
 
                                            GimpRunMode    run_mode,
49
 
                                            const gchar   *cmd);
 
43
static void  batch_exit_after_callback (Gimp          *gimp) G_GNUC_NORETURN;
 
44
 
 
45
static void  batch_run_cmd             (Gimp          *gimp,
 
46
                                        const gchar   *proc_name,
 
47
                                        GimpProcedure *procedure,
 
48
                                        GimpRunMode    run_mode,
 
49
                                        const gchar   *cmd);
50
50
 
51
51
 
52
52
void
123
123
 * message "batch command experienced an execution error" would appear
124
124
 * and gimp would hang forever.
125
125
 */
126
 
static gboolean
 
126
static void
127
127
batch_exit_after_callback (Gimp *gimp)
128
128
{
129
129
  if (gimp->be_verbose)
135
135
  tile_swap_exit ();
136
136
 
137
137
  exit (EXIT_SUCCESS);
138
 
 
139
 
  return TRUE;
140
138
}
141
139
 
142
140
static void
170
168
    case GIMP_PDB_EXECUTION_ERROR:
171
169
      if (error)
172
170
        {
173
 
          g_printerr ("batch command experienced an execution error: %s\n",
174
 
                      error->message);
 
171
          g_printerr ("batch command experienced an execution error:\n"
 
172
                      "%s\n", error->message);
175
173
        }
176
174
      else
177
175
        {
182
180
    case GIMP_PDB_CALLING_ERROR:
183
181
      if (error)
184
182
        {
185
 
          g_printerr ("batch command experienced a calling error: %s\n",
186
 
                      error->message);
 
183
          g_printerr ("batch command experienced a calling error:\n"
 
184
                      "%s\n", error->message);
187
185
        }
188
186
      else
189
187
        {