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

« back to all changes in this revision

Viewing changes to app/plug-in/gimppluginprocframe.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:
3
3
 *
4
4
 * gimppluginprocframe.c
5
5
 *
6
 
 * This program is free software; you can redistribute it and/or modify
 
6
 * This program is free software: you can redistribute it and/or modify
7
7
 * it under the terms of the GNU General Public License as published by
8
 
 * the Free Software Foundation; either version 2 of the License, or
 
8
 * the Free Software Foundation; either version 3 of the License, or
9
9
 * (at your option) any later version.
10
10
 *
11
11
 * This program is distributed in the hope that it will be useful,
14
14
 * GNU General Public License for more details.
15
15
 *
16
16
 * You should have received a copy of the GNU General Public License
17
 
 * along with this program; if not, write to the Free Software
18
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
17
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
18
 */
20
19
 
21
20
#include "config.h"
26
25
 
27
26
#include "plug-in-types.h"
28
27
 
29
 
#include "core/gimpcontext.h"
30
28
#include "core/gimpprogress.h"
31
29
 
 
30
#include "pdb/gimppdbcontext.h"
32
31
#include "pdb/gimppdberror.h"
33
32
 
34
33
#include "gimpplugin.h"
48
47
{
49
48
  GimpPlugInProcFrame *proc_frame;
50
49
 
51
 
  g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
 
50
  g_return_val_if_fail (GIMP_IS_PDB_CONTEXT (context), NULL);
52
51
  g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
53
52
  g_return_val_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (procedure), NULL);
54
53
 
68
67
                              GimpPlugInProcedure *procedure)
69
68
{
70
69
  g_return_if_fail (proc_frame != NULL);
71
 
  g_return_if_fail (GIMP_IS_CONTEXT (context));
 
70
  g_return_if_fail (GIMP_IS_PDB_CONTEXT (context));
72
71
  g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
73
72
  g_return_if_fail (procedure == NULL ||
74
73
                    GIMP_IS_PLUG_IN_PROCEDURE (procedure));
107
106
 
108
107
  if (proc_frame->context_stack)
109
108
    {
110
 
      g_list_foreach (proc_frame->context_stack, (GFunc) g_object_unref, NULL);
111
 
      g_list_free (proc_frame->context_stack);
 
109
      g_list_free_full (proc_frame->context_stack,
 
110
                        (GDestroyNotify) g_object_unref);
112
111
      proc_frame->context_stack = NULL;
113
112
    }
114
113
 
205
204
      GimpProcedure *procedure = proc_frame->procedure;
206
205
      GError        *error;
207
206
 
208
 
      error = g_error_new (GIMP_PDB_ERROR, GIMP_PDB_INVALID_RETURN_VALUE,
 
207
      error = g_error_new (GIMP_PDB_ERROR, GIMP_PDB_ERROR_INVALID_RETURN_VALUE,
209
208
                           _("Procedure '%s' returned no return values"),
210
 
                           gimp_object_get_name (GIMP_OBJECT (procedure)));
 
209
                           gimp_object_get_name (procedure));
211
210
 
212
211
      return_vals = gimp_procedure_get_return_values (procedure, FALSE,
213
212
                                                      error);