Commit a351ce91 authored by Michael Natterer's avatar Michael Natterer 😴

Remove the entire old plug-in interface

parent 7257cc8a
Pipeline #111330 passed with stages
in 15 minutes and 44 seconds
......@@ -425,7 +425,6 @@ gimp_pdb_print_entry (gpointer key,
GOutputStream *output = pdb_dump->output;
const gchar *proc_name;
GList *list;
GEnumClass *arg_class;
GEnumClass *proc_class;
GString *buf;
GString *string;
......@@ -441,7 +440,6 @@ gimp_pdb_print_entry (gpointer key,
else
list = value;
arg_class = g_type_class_ref (GIMP_TYPE_PDB_ARG_TYPE);
proc_class = g_type_class_ref (GIMP_TYPE_PDB_PROC_TYPE);
buf = g_string_new (NULL);
......@@ -586,7 +584,6 @@ gimp_pdb_print_entry (gpointer key,
g_string_free (string, TRUE);
g_string_free (buf, TRUE);
g_type_class_unref (arg_class);
g_type_class_unref (proc_class);
}
......
......@@ -110,13 +110,8 @@ libgimp_private_sources = \
gimp-private.h \
gimp-shm.c \
gimp-shm.h \
gimpgpcompat.c \
gimpgpcompat.h \
gimpgpparams.c \
gimpgpparams.h \
gimplegacy.c \
gimplegacy.h \
gimplegacy-private.h \
gimppdb-private.h \
gimppdbprocedure.c \
gimppdbprocedure.h \
......@@ -154,7 +149,6 @@ libgimpui_@GIMP_API_VERSION@_la_SOURCES = \
gimpinclude_HEADERS = \
$(libgimp_introspectable_headers) \
gimplegacy.h \
gimpprocedure-params.h \
$(libgimpui_introspectable_headers)
......
......@@ -24,11 +24,7 @@
G_BEGIN_DECLS
gint _gimp_main_internal (GType plug_in_type,
const GimpPlugInInfo *info,
gint argc,
gchar *argv[]);
void _gimp_config (GPConfig *config);
void _gimp_config (GPConfig *config);
G_END_DECLS
......
......@@ -99,9 +99,7 @@
#include "gimp-debug.h"
#include "gimp-private.h"
#include "gimp-shm.h"
#include "gimpgpcompat.h"
#include "gimpgpparams.h"
#include "gimplegacy-private.h"
#include "gimppdb-private.h"
#include "gimpplugin-private.h"
#include "gimpunitcache.h"
......@@ -176,15 +174,6 @@ gint
gimp_main (GType plug_in_type,
gint argc,
gchar *argv[])
{
return _gimp_main_internal (plug_in_type, NULL, argc, argv);
}
gint
_gimp_main_internal (GType plug_in_type,
const GimpPlugInInfo *info,
gint argc,
gchar *argv[])
{
enum
{
......@@ -220,8 +209,9 @@ _gimp_main_internal (GType plug_in_type,
}
/* On Windows, set DLL search path to $INSTALLDIR/bin so that GEGL
file operations can find their respective file library DLLs (such
as jasper, etc.) without needing to set external PATH. */
* file operations can find their respective file library DLLs (such
* as jasper, etc.) without needing to set external PATH.
*/
{
const gchar *install_dir;
gchar *bin_dir;
......@@ -260,8 +250,9 @@ _gimp_main_internal (GType plug_in_type,
gchar *dir;
/* This has to be the non-roaming directory (i.e., the local
directory) as backtraces correspond to the binaries on this
system. */
* directory) as backtraces correspond to the binaries on this
* system.
*/
dir = g_build_filename (g_get_user_data_dir (),
GIMPDIR, GIMP_USER_VERSION, "CrashLog",
NULL);
......@@ -313,7 +304,6 @@ _gimp_main_internal (GType plug_in_type,
* by buggy NT C runtime, or something. I don't know why this happens
* on NT (including w2k), but not on w95/98.
*/
for (i = 1; i < argc; i++)
{
k = strlen (argv[i]);
......@@ -351,8 +341,7 @@ _gimp_main_internal (GType plug_in_type,
#endif /* G_OS_WIN32 */
g_assert ((plug_in_type != G_TYPE_NONE && info == NULL) ||
(plug_in_type == G_TYPE_NONE && info != NULL));
g_assert (plug_in_type != G_TYPE_NONE);
if ((argc != N_ARGS) || (strcmp (argv[ARG_GIMP], "-gimp") != 0))
{
......@@ -559,31 +548,19 @@ _gimp_main_internal (GType plug_in_type,
NULL);
}
if (plug_in_type != G_TYPE_NONE)
{
PLUG_IN = g_object_new (plug_in_type,
"read-channel", read_channel,
"write-channel", write_channel,
NULL);
PLUG_IN = g_object_new (plug_in_type,
"read-channel", read_channel,
"write-channel", write_channel,
NULL);
g_assert (GIMP_IS_PLUG_IN (PLUG_IN));
}
else
{
_gimp_legacy_initialize (info,
read_channel,
write_channel);
}
g_assert (GIMP_IS_PLUG_IN (PLUG_IN));
if (strcmp (argv[ARG_MODE], "-query") == 0)
{
if (_gimp_debug_flags () & GIMP_DEBUG_QUERY)
_gimp_debug_stop ();
if (PLUG_IN)
_gimp_plug_in_query (PLUG_IN);
else
_gimp_legacy_query ();
_gimp_plug_in_query (PLUG_IN);
gimp_close ();
......@@ -595,10 +572,7 @@ _gimp_main_internal (GType plug_in_type,
if (_gimp_debug_flags () & GIMP_DEBUG_INIT)
_gimp_debug_stop ();
if (PLUG_IN)
_gimp_plug_in_init (PLUG_IN);
else
_gimp_legacy_init ();
_gimp_plug_in_init (PLUG_IN);
gimp_close ();
......@@ -610,10 +584,7 @@ _gimp_main_internal (GType plug_in_type,
else if (_gimp_debug_flags () & GIMP_DEBUG_PID)
g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Here I am!");
if (PLUG_IN)
_gimp_plug_in_run (PLUG_IN);
else
_gimp_legacy_run ();
_gimp_plug_in_run (PLUG_IN);
gimp_close ();
......@@ -650,10 +621,7 @@ GimpPDB *
gimp_get_pdb (void)
{
if (! PDB)
{
if (PLUG_IN)
PDB = _gimp_pdb_new (PLUG_IN);
}
PDB = _gimp_pdb_new (PLUG_IN);
return PDB;
}
......@@ -948,10 +916,7 @@ gimp_close (void)
if (_gimp_debug_flags () & GIMP_DEBUG_QUIT)
_gimp_debug_stop ();
if (PLUG_IN)
_gimp_plug_in_quit (PLUG_IN);
else
_gimp_legacy_quit ();
_gimp_plug_in_quit (PLUG_IN);
}
static void
......
......@@ -486,7 +486,6 @@ EXPORTS
gimp_image_undo_thaw
gimp_image_unset_active_channel
gimp_image_width
gimp_install_procedure
gimp_item_attach_parasite
gimp_item_delete
gimp_item_detach_parasite
......@@ -594,7 +593,6 @@ EXPORTS
gimp_load_procedure_set_handles_raw
gimp_load_procedure_set_thumbnail_loader
gimp_main
gimp_main_legacy
gimp_message
gimp_message_get_handler
gimp_message_set_handler
......@@ -678,7 +676,6 @@ EXPORTS
gimp_plug_in_set_help_domain
gimp_plug_in_set_pdb_error_handler
gimp_plug_in_set_translation_domain
gimp_plugin_menu_register
gimp_procedure_add_argument
gimp_procedure_add_argument_from_property
gimp_procedure_add_menu_path
......@@ -727,7 +724,6 @@ EXPORTS
gimp_progress_uninstall
gimp_progress_update
gimp_quit
gimp_run_procedure_array
gimp_save_procedure_get_type
gimp_save_procedure_new
gimp_selection_all
......
......@@ -49,7 +49,6 @@
#include <libgimp/gimplayer.h>
#include <libgimp/gimplayermask.h>
#include <libgimp/gimploadprocedure.h>
#include <libgimp/gimplegacy.h>
#include <libgimp/gimppaletteselect.h>
#include <libgimp/gimpparamspecs.h>
#include <libgimp/gimppatternselect.h>
......
......@@ -52,7 +52,6 @@
gchar *
gimp_version (void)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gchar *version = NULL;
......@@ -60,13 +59,9 @@ gimp_version (void)
args = gimp_value_array_new_from_types (NULL,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-version",
args);
else
return_vals = gimp_run_procedure_array ("gimp-version",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-version",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
......@@ -91,7 +86,6 @@ gimp_version (void)
gint
gimp_getpid (void)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gint pid = 0;
......@@ -99,13 +93,9 @@ gimp_getpid (void)
args = gimp_value_array_new_from_types (NULL,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-getpid",
args);
else
return_vals = gimp_run_procedure_array ("gimp-getpid",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-getpid",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
......@@ -131,7 +121,6 @@ gimp_getpid (void)
gboolean
gimp_attach_parasite (const GimpParasite *parasite)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
......@@ -140,13 +129,9 @@ gimp_attach_parasite (const GimpParasite *parasite)
GIMP_TYPE_PARASITE, parasite,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-attach-parasite",
args);
else
return_vals = gimp_run_procedure_array ("gimp-attach-parasite",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-attach-parasite",
args);
gimp_value_array_unref (args);
success = g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS;
......@@ -172,7 +157,6 @@ gimp_attach_parasite (const GimpParasite *parasite)
gboolean
gimp_detach_parasite (const gchar *name)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
......@@ -181,13 +165,9 @@ gimp_detach_parasite (const gchar *name)
G_TYPE_STRING, name,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-detach-parasite",
args);
else
return_vals = gimp_run_procedure_array ("gimp-detach-parasite",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-detach-parasite",
args);
gimp_value_array_unref (args);
success = g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS;
......@@ -212,7 +192,6 @@ gimp_detach_parasite (const gchar *name)
GimpParasite *
gimp_get_parasite (const gchar *name)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
GimpParasite *parasite = NULL;
......@@ -221,13 +200,9 @@ gimp_get_parasite (const gchar *name)
G_TYPE_STRING, name,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-get-parasite",
args);
else
return_vals = gimp_run_procedure_array ("gimp-get-parasite",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-get-parasite",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
......@@ -255,7 +230,6 @@ gimp_get_parasite (const gchar *name)
gchar **
gimp_get_parasite_list (gint *num_parasites)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gchar **parasites = NULL;
......@@ -263,13 +237,9 @@ gimp_get_parasite_list (gint *num_parasites)
args = gimp_value_array_new_from_types (NULL,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-get-parasite-list",
args);
else
return_vals = gimp_run_procedure_array ("gimp-get-parasite-list",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-get-parasite-list",
args);
gimp_value_array_unref (args);
*num_parasites = 0;
......@@ -300,7 +270,6 @@ gimp_get_parasite_list (gint *num_parasites)
gchar *
gimp_temp_name (const gchar *extension)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gchar *name = NULL;
......@@ -309,13 +278,9 @@ gimp_temp_name (const gchar *extension)
G_TYPE_STRING, extension,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-temp-name",
args);
else
return_vals = gimp_run_procedure_array ("gimp-temp-name",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-temp-name",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
......
This diff is collapsed.
......@@ -47,7 +47,6 @@
gboolean
gimp_brushes_refresh (void)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
......@@ -55,13 +54,9 @@ gimp_brushes_refresh (void)
args = gimp_value_array_new_from_types (NULL,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-brushes-refresh",
args);
else
return_vals = gimp_run_procedure_array ("gimp-brushes-refresh",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-brushes-refresh",
args);
gimp_value_array_unref (args);
success = g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS;
......@@ -90,7 +85,6 @@ gchar **
gimp_brushes_get_list (const gchar *filter,
gint *num_brushes)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gchar **brush_list = NULL;
......@@ -99,13 +93,9 @@ gimp_brushes_get_list (const gchar *filter,
G_TYPE_STRING, filter,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-brushes-get-list",
args);
else
return_vals = gimp_run_procedure_array ("gimp-brushes-get-list",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-brushes-get-list",
args);
gimp_value_array_unref (args);
*num_brushes = 0;
......
......@@ -57,7 +57,6 @@ gimp_brushes_popup (const gchar *brush_callback,
gint spacing,
GimpLayerMode paint_mode)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
......@@ -71,13 +70,9 @@ gimp_brushes_popup (const gchar *brush_callback,
GIMP_TYPE_LAYER_MODE, paint_mode,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-brushes-popup",
args);
else
return_vals = gimp_run_procedure_array ("gimp-brushes-popup",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-brushes-popup",
args);
gimp_value_array_unref (args);
success = g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS;
......@@ -100,7 +95,6 @@ gimp_brushes_popup (const gchar *brush_callback,
gboolean
gimp_brushes_close_popup (const gchar *brush_callback)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
......@@ -109,13 +103,9 @@ gimp_brushes_close_popup (const gchar *brush_callback)
G_TYPE_STRING, brush_callback,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-brushes-close-popup",
args);
else
return_vals = gimp_run_procedure_array ("gimp-brushes-close-popup",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-brushes-close-popup",
args);
gimp_value_array_unref (args);
success = g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS;
......@@ -146,7 +136,6 @@ gimp_brushes_set_popup (const gchar *brush_callback,
gint spacing,
GimpLayerMode paint_mode)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
......@@ -159,13 +148,9 @@ gimp_brushes_set_popup (const gchar *brush_callback,
GIMP_TYPE_LAYER_MODE, paint_mode,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-brushes-set-popup",
args);
else
return_vals = gimp_run_procedure_array ("gimp-brushes-set-popup",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-brushes-set-popup",
args);
gimp_value_array_unref (args);
success = g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS;
......
......@@ -54,7 +54,6 @@ gchar **
gimp_buffers_get_list (const gchar *filter,
gint *num_buffers)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gchar **buffer_list = NULL;
......@@ -63,13 +62,9 @@ gimp_buffers_get_list (const gchar *filter,
G_TYPE_STRING, filter,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-buffers-get-list",
args);
else
return_vals = gimp_run_procedure_array ("gimp-buffers-get-list",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-buffers-get-list",
args);
gimp_value_array_unref (args);
*num_buffers = 0;
......@@ -103,7 +98,6 @@ gchar *
gimp_buffer_rename (const gchar *buffer_name,
const gchar *new_name)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gchar *real_name = NULL;
......@@ -113,13 +107,9 @@ gimp_buffer_rename (const gchar *buffer_name,
G_TYPE_STRING, new_name,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-buffer-rename",
args);
else
return_vals = gimp_run_procedure_array ("gimp-buffer-rename",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-buffer-rename",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
......@@ -145,7 +135,6 @@ gimp_buffer_rename (const gchar *buffer_name,
gboolean
gimp_buffer_delete (const gchar *buffer_name)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gboolean success = TRUE;
......@@ -154,13 +143,9 @@ gimp_buffer_delete (const gchar *buffer_name)
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-buffer-delete",
args);
else
return_vals = gimp_run_procedure_array ("gimp-buffer-delete",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-buffer-delete",
args);
gimp_value_array_unref (args);
success = g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS;
......@@ -185,7 +170,6 @@ gimp_buffer_delete (const gchar *buffer_name)
gint
gimp_buffer_get_width (const gchar *buffer_name)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gint width = 0;
......@@ -194,13 +178,9 @@ gimp_buffer_get_width (const gchar *buffer_name)
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-buffer-get-width",
args);
else
return_vals = gimp_run_procedure_array ("gimp-buffer-get-width",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-buffer-get-width",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
......@@ -226,7 +206,6 @@ gimp_buffer_get_width (const gchar *buffer_name)
gint
gimp_buffer_get_height (const gchar *buffer_name)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gint height = 0;
......@@ -235,13 +214,9 @@ gimp_buffer_get_height (const gchar *buffer_name)
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-buffer-get-height",
args);
else
return_vals = gimp_run_procedure_array ("gimp-buffer-get-height",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-buffer-get-height",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
......@@ -267,7 +242,6 @@ gimp_buffer_get_height (const gchar *buffer_name)
gint
gimp_buffer_get_bytes (const gchar *buffer_name)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
gint bytes = 0;
......@@ -276,13 +250,9 @@ gimp_buffer_get_bytes (const gchar *buffer_name)
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-buffer-get-bytes",
args);
else
return_vals = gimp_run_procedure_array ("gimp-buffer-get-bytes",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-buffer-get-bytes",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
......@@ -308,7 +278,6 @@ gimp_buffer_get_bytes (const gchar *buffer_name)
GimpImageBaseType
gimp_buffer_get_image_type (const gchar *buffer_name)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
GimpImageBaseType image_type = 0;
......@@ -317,13 +286,9 @@ gimp_buffer_get_image_type (const gchar *buffer_name)
G_TYPE_STRING, buffer_name,
G_TYPE_NONE);
if (pdb)
return_vals = gimp_pdb_run_procedure_array (pdb,
"gimp-buffer-get-image-type",
args);
else
return_vals = gimp_run_procedure_array ("gimp-buffer-get-image-type",
args);
return_vals = gimp_pdb_run_procedure_array (gimp_get_pdb (),
"gimp-buffer-get-image-type",
args);
gimp_value_array_unref (args);
if (g_value_get_enum (gimp_value_array_index (return_vals, 0)) == GIMP_PDB_SUCCESS)
......
......@@ -63,7 +63,6 @@ _gimp_channel_new (GimpImage *image,
gdouble opacity,
const GimpRGB *color)
{
GimpPDB *pdb = gimp_get_pdb ();
GimpValueArray *args;
GimpValueArray *return_vals;
GimpChannel *channel = NULL;
......@@ -77,13 +76,9 @@ _gimp_channel_new (GimpImage *image,
GIMP_TYPE_RGB, color,