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

« back to all changes in this revision

Viewing changes to app/plug-in/gimppluginmanager-call.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
 * gimppluginmanager-call.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"
35
34
#include "composite/gimp-composite.h"
36
35
 
37
36
#include "core/gimp.h"
38
 
#include "core/gimpcontext.h"
39
37
#include "core/gimpprogress.h"
40
38
 
 
39
#include "pdb/gimppdbcontext.h"
 
40
 
41
41
#include "gimpplugin.h"
42
42
#include "gimpplugin-message.h"
43
43
#include "gimpplugindef.h"
62
62
  GimpPlugIn *plug_in;
63
63
 
64
64
  g_return_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager));
65
 
  g_return_if_fail (GIMP_IS_CONTEXT (context));
 
65
  g_return_if_fail (GIMP_IS_PDB_CONTEXT (context));
66
66
  g_return_if_fail (GIMP_IS_PLUG_IN_DEF (plug_in_def));
67
67
 
68
68
  plug_in = gimp_plug_in_new (manager, context, NULL,
102
102
  GimpPlugIn *plug_in;
103
103
 
104
104
  g_return_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager));
105
 
  g_return_if_fail (GIMP_IS_CONTEXT (context));
 
105
  g_return_if_fail (GIMP_IS_PDB_CONTEXT (context));
106
106
  g_return_if_fail (GIMP_IS_PLUG_IN_DEF (plug_in_def));
107
107
 
108
108
  plug_in = gimp_plug_in_new (manager, context, NULL,
147
147
  GimpPlugIn  *plug_in;
148
148
 
149
149
  g_return_val_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager), NULL);
150
 
  g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
 
150
  g_return_val_if_fail (GIMP_IS_PDB_CONTEXT (context), NULL);
151
151
  g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
152
152
  g_return_val_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (procedure), NULL);
153
153
  g_return_val_if_fail (args != NULL, NULL);
167
167
 
168
168
      if (! gimp_plug_in_open (plug_in, GIMP_PLUG_IN_CALL_RUN, FALSE))
169
169
        {
170
 
          const gchar *name  = gimp_object_get_name (GIMP_OBJECT (plug_in));
 
170
          const gchar *name  = gimp_object_get_name (plug_in);
171
171
          GError      *error = g_error_new (GIMP_PLUG_IN_ERROR,
172
172
                                            GIMP_PLUG_IN_EXECUTION_FAILED,
173
173
                                            _("Failed to run plug-in \"%s\""),
198
198
      config.gimp_reserved_6  = 0;
199
199
      config.gimp_reserved_7  = 0;
200
200
      config.gimp_reserved_8  = 0;
201
 
      config.install_cmap     = core_config->install_cmap;
 
201
      config.install_cmap     = FALSE;
202
202
      config.show_tooltips    = gui_config->show_tooltips;
203
 
      config.min_colors       = CLAMP (core_config->min_colors, 27, 256);
 
203
      config.min_colors       = 144;
204
204
      config.gdisp_ID         = display_ID;
205
205
      config.app_name         = (gchar *) g_get_application_name ();
206
206
      config.wm_class         = (gchar *) gimp_get_program_class (manager->gimp);
217
217
          ! gp_proc_run_write (plug_in->my_write, &proc_run, plug_in) ||
218
218
          ! gimp_wire_flush (plug_in->my_write, plug_in))
219
219
        {
220
 
          const gchar *name  = gimp_object_get_name (GIMP_OBJECT (plug_in));
 
220
          const gchar *name  = gimp_object_get_name (plug_in);
221
221
          GError      *error = g_error_new (GIMP_PLUG_IN_ERROR,
222
222
                                            GIMP_PLUG_IN_EXECUTION_FAILED,
223
223
                                            _("Failed to run plug-in \"%s\""),
293
293
  GimpPlugIn  *plug_in;
294
294
 
295
295
  g_return_val_if_fail (GIMP_IS_PLUG_IN_MANAGER (manager), NULL);
296
 
  g_return_val_if_fail (GIMP_IS_CONTEXT (context), NULL);
 
296
  g_return_val_if_fail (GIMP_IS_PDB_CONTEXT (context), NULL);
297
297
  g_return_val_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress), NULL);
298
298
  g_return_val_if_fail (GIMP_IS_TEMPORARY_PROCEDURE (procedure), NULL);
299
299
  g_return_val_if_fail (args != NULL, NULL);
315
315
      if (! gp_temp_proc_run_write (plug_in->my_write, &proc_run, plug_in) ||
316
316
          ! gimp_wire_flush (plug_in->my_write, plug_in))
317
317
        {
318
 
          const gchar *name  = gimp_object_get_name (GIMP_OBJECT (plug_in));
 
318
          const gchar *name  = gimp_object_get_name (plug_in);
319
319
          GError      *error = g_error_new (GIMP_PLUG_IN_ERROR,
320
320
                                            GIMP_PLUG_IN_EXECUTION_FAILED,
321
321
                                            _("Failed to run plug-in \"%s\""),