Commit f1c3e79a authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/plug-in/Makefile.am app/plug-in/plug-in-types.h new object which keeps

2006-04-29  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-types.h
	* app/plug-in/gimppluginmanager.[ch]: new object which keeps all
	plug-in related stuff that was kept in the Gimp instance. Has
	"menu-branch-added" and "last-plug-in-changed" signals.

	* app/plug-in/plug-ins.[ch]: removed, all its functions are in
	GimpPlugInManager now.

	* app/core/gimpmarshal.list: new marshaller for the new object.

	* app/core/gimp.[ch]: removed all plug-in related stuff and keep a
	GimpPlugInManager around.

	* app/plug-in/plug-in-data.[ch]
	* app/plug-in/plug-in-file.[ch]
	* app/plug-in/plug-in-help-domain.[ch]
	* app/plug-in/plug-in-locale-domain.[ch]
	* app/plug-in/plug-in-menu-branch.[ch]
	* app/plug-in/plug-ins-query.[ch]: removed...

	* app/plug-in/gimppluginmanager-data.[ch]
	* app/plug-in/gimppluginmanager-file.[ch]
	* app/plug-in/gimppluginmanager-help-domain.[ch]
	* app/plug-in/gimppluginmanager-locale-domain.[ch]
	* app/plug-in/gimppluginmanager-menu-branch.[ch]
	* app/plug-in/gimppluginmanager-query.[ch]: ...and added as
	methods of GimpPlugInManager.

	* app/plug-in/plug-in-debug.[ch]
	* app/plug-in/plug-in-shm.[ch]: removed...

	* app/plug-in/gimpplugindebug.[ch]
	* app/plug-in/gimppluginshm.[ch]: ...and added as properly
	namespeced structs with constructors and destructors.

	* app/core/Makefile.am
	* app/core/gimpenvirontable.[ch]
	* app/core/gimpinterpreterdb.[ch]: removed...

	* app/plug-in/gimpenvirontable.[ch]
	* app/plug-in/gimpinterpreterdb.[ch]: ...and added here unchanged.

	* app/core/gimp-gui.[ch]
	* app/gui/gui-vtable.c: remove gimp_menus_create_branch() and all
	related stuff.

	* app/actions/plug-in-actions.[ch]: connect to the
	plug-in-manager's "menu-path-added" signal and create menu branch
	actions accordingly.

	* app/plug-in/plug-in-context.c
	* app/plug-in/plug-in-message.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-run.[ch]
	* app/plug-in/plug-in.[ch]
	* app/app_procs.c
	* app/actions/file-commands.c
	* app/actions/plug-in-commands.c
	* app/core/gimpimage.c
	* app/dialogs/file-open-location-dialog.c
	* app/dialogs/file-save-dialog.c
	* app/file/file-open.c
	* app/gui/gui.c
	* app/menus/plug-in-menus.c
	* app/pdb/gimppluginprocedure.c
	* app/pdb/gimptemporaryprocedure.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimpfiledialog.c
	* app/widgets/gimpfileprocview.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpthumbbox.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/context.pdb
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/help.pdb
	* tools/pdbgen/pdb/message.pdb
	* tools/pdbgen/pdb/plug_in.pdb
	* tools/pdbgen/pdb/procedural_db.pdb
	* tools/pdbgen/pdb/progress.pdb
	* tools/pdbgen/pdb/undo.pdb: follow above refactoring.

	* app/pdb/context_cmds.c
	* app/pdb/drawable_cmds.c
	* app/pdb/fileops_cmds.c
	* app/pdb/help_cmds.c
	* app/pdb/message_cmds.c
	* app/pdb/plug_in_cmds.c
	* app/pdb/procedural_db_cmds.c
	* app/pdb/progress_cmds.c
	* app/pdb/undo_cmds.c: regenerated.
parent f3282808
2006-04-29 Michael Natterer <mitch@gimp.org>
* app/plug-in/Makefile.am
* app/plug-in/plug-in-types.h
* app/plug-in/gimppluginmanager.[ch]: new object which keeps all
plug-in related stuff that was kept in the Gimp instance. Has
"menu-branch-added" and "last-plug-in-changed" signals.
* app/plug-in/plug-ins.[ch]: removed, all its functions are in
GimpPlugInManager now.
* app/core/gimpmarshal.list: new marshaller for the new object.
* app/core/gimp.[ch]: removed all plug-in related stuff and keep a
GimpPlugInManager around.
* app/plug-in/plug-in-data.[ch]
* app/plug-in/plug-in-file.[ch]
* app/plug-in/plug-in-help-domain.[ch]
* app/plug-in/plug-in-locale-domain.[ch]
* app/plug-in/plug-in-menu-branch.[ch]
* app/plug-in/plug-ins-query.[ch]: removed...
* app/plug-in/gimppluginmanager-data.[ch]
* app/plug-in/gimppluginmanager-file.[ch]
* app/plug-in/gimppluginmanager-help-domain.[ch]
* app/plug-in/gimppluginmanager-locale-domain.[ch]
* app/plug-in/gimppluginmanager-menu-branch.[ch]
* app/plug-in/gimppluginmanager-query.[ch]: ...and added as
methods of GimpPlugInManager.
* app/plug-in/plug-in-debug.[ch]
* app/plug-in/plug-in-shm.[ch]: removed...
* app/plug-in/gimpplugindebug.[ch]
* app/plug-in/gimppluginshm.[ch]: ...and added as properly
namespeced structs with constructors and destructors.
* app/core/Makefile.am
* app/core/gimpenvirontable.[ch]
* app/core/gimpinterpreterdb.[ch]: removed...
* app/plug-in/gimpenvirontable.[ch]
* app/plug-in/gimpinterpreterdb.[ch]: ...and added here unchanged.
* app/core/gimp-gui.[ch]
* app/gui/gui-vtable.c: remove gimp_menus_create_branch() and all
related stuff.
* app/actions/plug-in-actions.[ch]: connect to the
plug-in-manager's "menu-path-added" signal and create menu branch
actions accordingly.
* app/plug-in/plug-in-context.c
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-progress.c
* app/plug-in/plug-in-run.[ch]
* app/plug-in/plug-in.[ch]
* app/app_procs.c
* app/actions/file-commands.c
* app/actions/plug-in-commands.c
* app/core/gimpimage.c
* app/dialogs/file-open-location-dialog.c
* app/dialogs/file-save-dialog.c
* app/file/file-open.c
* app/gui/gui.c
* app/menus/plug-in-menus.c
* app/pdb/gimppluginprocedure.c
* app/pdb/gimptemporaryprocedure.c
* app/widgets/gimpdnd-xds.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimpfileprocview.c
* app/widgets/gimphelp.c
* app/widgets/gimpthumbbox.c
* app/xcf/xcf.c
* tools/pdbgen/pdb/context.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/help.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/plug_in.pdb
* tools/pdbgen/pdb/procedural_db.pdb
* tools/pdbgen/pdb/progress.pdb
* tools/pdbgen/pdb/undo.pdb: follow above refactoring.
* app/pdb/context_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/fileops_cmds.c
* app/pdb/help_cmds.c
* app/pdb/message_cmds.c
* app/pdb/plug_in_cmds.c
* app/pdb/procedural_db_cmds.c
* app/pdb/progress_cmds.c
* app/pdb/undo_cmds.c: regenerated.
2006-04-28 Sven Neumann <sven@gimp.org>
* app/dialogs/user-install-dialog.c: code and user interface cleanup.
......
......@@ -34,6 +34,8 @@
#include "core/gimpprogress.h"
#include "core/gimptemplate.h"
#include "plug-in/gimppluginmanager.h"
#include "file/file-open.h"
#include "file/file-save.h"
#include "file/file-utils.h"
......@@ -204,7 +206,8 @@ file_save_cmd_callback (GtkAction *action,
save_proc = gimp_image_get_save_proc (image);
if (uri && ! save_proc)
save_proc = file_utils_find_proc (image->gimp->save_procs, uri);
save_proc = file_utils_find_proc (image->gimp->plug_in_manager->save_procs,
uri);
if (! (uri && save_proc))
{
......
......@@ -35,9 +35,10 @@
#include "pdb/gimppluginprocedure.h"
#include "plug-in/plug-in-help-domain.h"
#include "plug-in/plug-in-locale-domain.h"
#include "plug-in/plug-in-menu-branch.h"
#include "plug-in/gimppluginmanager.h"
#include "plug-in/gimppluginmanager-help-domain.h"
#include "plug-in/gimppluginmanager-locale-domain.h"
#include "plug-in/gimppluginmanager-menu-branch.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimphelp-ids.h"
......@@ -51,6 +52,11 @@
/* local function prototypes */
static void plug_in_actions_menu_branch_added (GimpPlugInManager *manager,
const gchar *progname,
const gchar *menu_path,
const gchar *menu_label,
GimpActionGroup *group);
static void plug_in_actions_register_procedure (GimpPDB *pdb,
GimpProcedure *procedure,
GimpActionGroup *group);
......@@ -63,7 +69,7 @@ static void plug_in_actions_menu_path_added (GimpPlugInProcedure *proc,
static void plug_in_actions_add_proc (GimpActionGroup *group,
GimpPlugInProcedure *proc);
static void plug_in_actions_last_changed (Gimp *gimp,
static void plug_in_actions_last_changed (GimpPlugInManager *manager,
GimpActionGroup *group);
static gboolean plug_in_actions_check_translation (const gchar *original,
const gchar *translated);
......@@ -137,19 +143,25 @@ plug_in_actions_setup (GimpActionGroup *group)
G_N_ELEMENTS (plug_in_repeat_actions),
G_CALLBACK (plug_in_repeat_cmd_callback));
for (list = group->gimp->plug_in_menu_branches;
for (list = group->gimp->plug_in_manager->menu_branches;
list;
list = g_slist_next (list))
{
PlugInMenuBranch *branch = list->data;
GimpPlugInMenuBranch *branch = list->data;
plug_in_actions_add_branch (group,
branch->prog_name,
branch->menu_path,
branch->menu_label);
plug_in_actions_menu_branch_added (group->gimp->plug_in_manager,
branch->prog_name,
branch->menu_path,
branch->menu_label,
group);
}
for (list = group->gimp->plug_in_procedures;
g_signal_connect_object (group->gimp->plug_in_manager,
"menu-branch-added",
G_CALLBACK (plug_in_actions_menu_branch_added),
group, 0);
for (list = group->gimp->plug_in_manager->plug_in_procedures;
list;
list = g_slist_next (list))
{
......@@ -209,21 +221,25 @@ plug_in_actions_setup (GimpActionGroup *group)
g_free (entries);
g_signal_connect_object (group->gimp, "last-plug-ins-changed",
g_signal_connect_object (group->gimp->plug_in_manager,
"last-plug-ins-changed",
G_CALLBACK (plug_in_actions_last_changed),
group, 0);
plug_in_actions_last_changed (group->gimp, group);
plug_in_actions_last_changed (group->gimp->plug_in_manager, group);
}
void
plug_in_actions_update (GimpActionGroup *group,
gpointer data)
{
GimpImage *image = action_data_get_image (data);
GimpImageType type = -1;
GSList *list;
gint i;
GimpImage *image = action_data_get_image (data);
GimpPlugInManager *manager;
GimpImageType type = -1;
GSList *list;
gint i;
manager = group->gimp->plug_in_manager;
if (image)
{
......@@ -233,9 +249,7 @@ plug_in_actions_update (GimpActionGroup *group,
type = gimp_drawable_type (drawable);
}
for (list = group->gimp->plug_in_procedures;
list;
list = g_slist_next (list))
for (list = manager->plug_in_procedures; list; list = g_slist_next (list))
{
GimpPlugInProcedure *proc = list->data;
......@@ -254,8 +268,8 @@ plug_in_actions_update (GimpActionGroup *group,
}
}
if (group->gimp->last_plug_ins &&
gimp_plug_in_procedure_get_sensitive (group->gimp->last_plug_ins->data,
if (manager->last_plug_ins &&
gimp_plug_in_procedure_get_sensitive (manager->last_plug_ins->data,
type))
{
gimp_action_group_set_action_sensitive (group, "plug-in-repeat", TRUE);
......@@ -267,7 +281,7 @@ plug_in_actions_update (GimpActionGroup *group,
gimp_action_group_set_action_sensitive (group, "plug-in-reshow", FALSE);
}
for (list = group->gimp->last_plug_ins, i = 0; list; list = list->next, i++)
for (list = manager->last_plug_ins, i = 0; list; list = list->next, i++)
{
GimpPlugInProcedure *proc = list->data;
gchar *name = g_strdup_printf ("plug-in-recent-%02d",
......@@ -282,11 +296,15 @@ plug_in_actions_update (GimpActionGroup *group,
}
}
void
plug_in_actions_add_branch (GimpActionGroup *group,
const gchar *progname,
const gchar *menu_path,
const gchar *menu_label)
/* private functions */
static void
plug_in_actions_menu_branch_added (GimpPlugInManager *manager,
const gchar *progname,
const gchar *menu_path,
const gchar *menu_label,
GimpActionGroup *group)
{
const gchar *locale_domain;
const gchar *path_translated;
......@@ -294,11 +312,9 @@ plug_in_actions_add_branch (GimpActionGroup *group,
gchar *full;
gchar *full_translated;
g_return_if_fail (GIMP_IS_ACTION_GROUP (group));
g_return_if_fail (menu_path != NULL);
g_return_if_fail (menu_label != NULL);
locale_domain = plug_in_locale_domain (group->gimp, progname, NULL);
locale_domain =
gimp_plug_in_manager_get_locale_domain (group->gimp->plug_in_manager,
progname, NULL);
path_translated = dgettext (locale_domain, menu_path);
label_translated = dgettext (locale_domain, menu_label);
......@@ -315,9 +331,6 @@ plug_in_actions_add_branch (GimpActionGroup *group,
g_free (full);
}
/* private functions */
static void
plug_in_actions_register_procedure (GimpPDB *pdb,
GimpProcedure *procedure,
......@@ -390,7 +403,8 @@ plug_in_actions_menu_path_added (GimpPlugInProcedure *plug_in_proc,
progname = gimp_plug_in_procedure_get_progname (plug_in_proc);
locale_domain = plug_in_locale_domain (group->gimp, progname, NULL);
locale_domain = gimp_plug_in_manager_get_locale_domain (group->gimp->plug_in_manager,
progname, NULL);
path_translated = dgettext (locale_domain, menu_path);
......@@ -413,13 +427,12 @@ plug_in_actions_add_proc (GimpActionGroup *group,
gchar *path_original = NULL;
gchar *path_translated = NULL;
g_return_if_fail (GIMP_IS_ACTION_GROUP (group));
g_return_if_fail (GIMP_IS_PLUG_IN_PROCEDURE (proc));
progname = gimp_plug_in_procedure_get_progname (proc);
locale_domain = plug_in_locale_domain (group->gimp, progname, NULL);
help_domain = plug_in_help_domain (group->gimp, progname, NULL);
locale_domain = gimp_plug_in_manager_get_locale_domain (group->gimp->plug_in_manager,
progname, NULL);
help_domain = gimp_plug_in_manager_get_help_domain (group->gimp->plug_in_manager,
progname, NULL);
if (proc->menu_label)
{
......@@ -494,23 +507,24 @@ plug_in_actions_add_proc (GimpActionGroup *group,
}
static void
plug_in_actions_last_changed (Gimp *gimp,
GimpActionGroup *group)
plug_in_actions_last_changed (GimpPlugInManager *manager,
GimpActionGroup *group)
{
GSList *list;
const gchar *progname;
const gchar *domain;
gint i;
if (gimp->last_plug_ins)
if (manager->last_plug_ins)
{
GimpPlugInProcedure *proc = gimp->last_plug_ins->data;
GimpPlugInProcedure *proc = manager->last_plug_ins->data;
gchar *label;
gchar *repeat;
gchar *reshow;
progname = gimp_plug_in_procedure_get_progname (proc);
domain = plug_in_locale_domain (gimp, progname, NULL);
domain = gimp_plug_in_manager_get_locale_domain (manager,
progname, NULL);
label = gimp_plug_in_procedure_get_label (proc, domain);
......@@ -533,7 +547,7 @@ plug_in_actions_last_changed (Gimp *gimp,
_("Re-Show Last"));
}
for (list = gimp->last_plug_ins, i = 0; list; list = list->next, i++)
for (list = manager->last_plug_ins, i = 0; list; list = list->next, i++)
{
GtkAction *action;
GimpPlugInProcedure *proc = list->data;
......@@ -545,7 +559,8 @@ plug_in_actions_last_changed (Gimp *gimp,
g_free (name);
progname = gimp_plug_in_procedure_get_progname (proc);
domain = plug_in_locale_domain (gimp, progname, NULL);
domain = gimp_plug_in_manager_get_locale_domain (manager,
progname, NULL);
label = gimp_plug_in_procedure_get_label (proc, domain);
......@@ -558,7 +573,7 @@ plug_in_actions_last_changed (Gimp *gimp,
g_free (label);
}
for (; i < gimp->config->plug_in_history_size; i++)
for (; i < manager->gimp->config->plug_in_history_size; i++)
{
GtkAction *action;
gchar *name = g_strdup_printf ("plug-in-recent-%02d", i + 1);
......@@ -572,7 +587,7 @@ plug_in_actions_last_changed (Gimp *gimp,
}
/* update sensitivity of the actions */
plug_in_actions_update (group, gimp);
plug_in_actions_update (group, manager->gimp);
}
static gboolean
......
......@@ -20,14 +20,9 @@
#define __PLUG_IN_ACTIONS_H__
void plug_in_actions_setup (GimpActionGroup *group);
void plug_in_actions_update (GimpActionGroup *group,
gpointer data);
void plug_in_actions_add_branch (GimpActionGroup *group,
const gchar *progname,
const gchar *menu_path,
const gchar *menu_label);
void plug_in_actions_setup (GimpActionGroup *group);
void plug_in_actions_update (GimpActionGroup *group,
gpointer data);
#endif /* __PLUG_IN_ACTIONS_H__ */
......@@ -34,7 +34,8 @@
#include "core/gimpparamspecs.h"
#include "core/gimpprogress.h"
#include "plug-in/plug-in-data.h"
#include "plug-in/gimppluginmanager.h"
#include "plug-in/gimppluginmanager-data.h"
#include "pdb/gimpprocedure.h"
......@@ -134,7 +135,7 @@ plug_in_run_cmd_callback (GtkAction *action,
GIMP_IS_PARAM_SPEC_IMAGE_ID (procedure->args[1]) &&
GIMP_IS_PARAM_SPEC_DRAWABLE_ID (procedure->args[2]))
{
gimp_set_last_plug_in (gimp, proc);
gimp_plug_in_manager_set_last_plug_in (gimp->plug_in_manager, proc);
}
error:
......@@ -161,7 +162,7 @@ plug_in_repeat_cmd_callback (GtkAction *action,
if (strcmp (gtk_action_get_name (action), "plug-in-repeat") == 0)
interactive = FALSE;
procedure = g_slist_nth_data (gimp->last_plug_ins, value);
procedure = g_slist_nth_data (gimp->plug_in_manager->last_plug_ins, value);
if (procedure)
{
......@@ -229,5 +230,5 @@ plug_in_reset_all_response (GtkWidget *dialog,
gtk_widget_destroy (dialog);
if (response_id == GTK_RESPONSE_OK)
plug_in_data_free (gimp);
gimp_plug_in_manager_data_free (gimp->plug_in_manager);
}
......@@ -42,6 +42,8 @@
#include "core/gimp.h"
#include "plug-in/gimppluginmanager.h"
#include "file/file-open.h"
#include "file/file-utils.h"
......@@ -306,7 +308,7 @@ app_run (const gchar *full_prog_name,
}
else
{
uri = file_utils_filename_to_uri (gimp->load_procs,
uri = file_utils_filename_to_uri (gimp->plug_in_manager->load_procs,
filenames[i], &error);
}
......
......@@ -107,8 +107,6 @@ libappcore_a_sources = \
gimpdrawable-stroke.h \
gimpdrawable-transform.c \
gimpdrawable-transform.h \
gimpenvirontable.h \
gimpenvirontable.c \
gimpgradient.c \
gimpgradient.h \
gimpgradient-load.c \
......@@ -167,8 +165,6 @@ libappcore_a_sources = \
gimpimagefile.h \
gimpimagemap.c \
gimpimagemap.h \
gimpinterpreterdb.c \
gimpinterpreterdb.h \
gimpitem.c \
gimpitem.h \
gimpitem-align.c \
......
......@@ -56,7 +56,6 @@ gimp_gui_init (Gimp *gimp)
gimp->gui.display_create = NULL;
gimp->gui.display_delete = NULL;
gimp->gui.displays_reconnect = NULL;
gimp->gui.menus_create_branch = NULL;
gimp->gui.progress_new = NULL;
gimp->gui.progress_free = NULL;
gimp->gui.pdb_dialog_set = NULL;
......@@ -293,20 +292,6 @@ gimp_reconnect_displays (Gimp *gimp,
gimp->gui.displays_reconnect (gimp, old_image, new_image);
}
void
gimp_menus_create_branch (Gimp *gimp,
const gchar *progname,
const gchar *menu_path,
const gchar *menu_label)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (menu_path != NULL);
g_return_if_fail (menu_label != NULL);
if (gimp->gui.menus_create_branch)
gimp->gui.menus_create_branch (gimp, progname, menu_path, menu_label);
}
GimpProgress *
gimp_new_progress (Gimp *gimp,
GimpObject *display)
......
......@@ -55,11 +55,6 @@ struct _GimpGui
GimpImage *old_image,
GimpImage *new_image);
void (* menus_create_branch) (Gimp *gimp,
const gchar *progname,
const gchar *menu_path,
const gchar *menu_label);
GimpProgress * (* progress_new) (Gimp *gimp,
GimpObject *display);
void (* progress_free) (Gimp *gimp,
......@@ -116,11 +111,6 @@ void gimp_help (Gimp *gimp,
const gchar *help_domain,
const gchar *help_id);
void gimp_menus_create_branch (Gimp *gimp,
const gchar *progname,
const gchar *menu_path,
const gchar *menu_label);
GimpProgress * gimp_new_progress (Gimp *gimp,
GimpObject *display);
void gimp_free_progress (Gimp *gimp,
......
......@@ -31,7 +31,7 @@
#include "pdb/gimp-pdb.h"
#include "plug-in/plug-ins.h"
#include "plug-in/gimppluginmanager.h"
#include "paint/gimp-paint.h"
......@@ -56,12 +56,10 @@
#include "gimpcontext.h"
#include "gimpdatafactory.h"
#include "gimpdocumentlist.h"
#include "gimpenvirontable.h"
#include "gimpgradient.h"
#include "gimpgradient-load.h"
#include "gimpimage.h"
#include "gimpimagefile.h"
#include "gimpinterpreterdb.h"
#include "gimplist.h"
#include "gimpmarshal.h"
#include "gimppalette.h"
......@@ -79,7 +77,6 @@ enum
RESTORE,
EXIT,
BUFFER_CHANGED,
LAST_PLUG_INS_CHANGED,
LAST_SIGNAL
};
......@@ -157,15 +154,6 @@ gimp_class_init (GimpClass *klass)
gimp_marshal_VOID__VOID,
G_TYPE_NONE, 0);
gimp_signals[LAST_PLUG_INS_CHANGED] =
g_signal_new ("last-plug-ins-changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GimpClass, last_plug_ins_changed),
NULL, NULL,
gimp_marshal_VOID__VOID,
G_TYPE_NONE, 0);
object_class->dispose = gimp_dispose;
object_class->finalize = gimp_finalize;
......@@ -202,11 +190,7 @@ gimp_init (Gimp *gimp)
gimp_modules_init (gimp);
gimp->interpreter_db = gimp_interpreter_db_new ();
gimp->environ_table = gimp_environ_table_new ();
gimp->plug_in_debug = NULL;
gimp->plug_in_data_list = NULL;
gimp->plug_in_manager = gimp_plug_in_manager_new (gimp);
gimp->images = gimp_list_new_weak (GIMP_TYPE_IMAGE, FALSE);
gimp_object_set_static_name (GIMP_OBJECT (gimp->images), "images");
......@@ -237,9 +221,6 @@ gimp_init (Gimp *gimp)
gimp_pdb_initialize (gimp);
gimp->load_procs = NULL;
gimp->save_procs = NULL;
xcf_init (gimp);
gimp->tool_info_list = gimp_list_new (GIMP_TYPE_TOOL_INFO, FALSE);
......@@ -293,12 +274,6 @@ gimp_finalize (GObject *object)
gimp_contexts_exit (gimp);
if (gimp->last_plug_ins)
{
g_slist_free (gimp->last_plug_ins);
gimp->last_plug_ins = NULL;
}
if (gimp->image_new_last_template)
{
g_object_unref (gimp->image_new_last_template);
......@@ -329,18 +304,6 @@ gimp_finalize (GObject *object)
gimp_pdb_exit (gimp);
if (gimp->load_procs)
{
g_slist_free (gimp->load_procs);
gimp->load_procs = NULL;
}
if (gimp->save_procs)
{
g_slist_free (gimp->save_procs);
gimp->save_procs = NULL;
}
if (gimp->brush_factory)
{
g_object_unref (gimp->brush_factory);
......@@ -407,16 +370,10 @@ gimp_finalize (GObject *object)
gimp->images = NULL;
}
if (gimp->environ_table)
if (gimp->plug_in_manager)
{
g_object_unref (gimp->environ_table);
gimp->environ_table = NULL;
}
if (gimp->interpreter_db)
{
g_object_unref (gimp->interpreter_db);
gimp->interpreter_db = NULL;
g_object_unref (gimp->plug_in_manager);
gimp->plug_in_manager = NULL;
}
if (gimp->module_db)
......@@ -463,19 +420,7 @@ gimp_get_memsize (GimpObject *object,
gui_size);
memsize += gimp_g_object_get_memsize (G_OBJECT (gimp->module_db));
memsize += gimp_g_slist_get_memsize (gimp->plug_in_menu_branches,
0 /* FIXME */);
memsize += gimp_g_slist_get_memsize (gimp->plug_in_locale_domains,
0 /* FIXME */);
memsize += gimp_g_slist_get_memsize (gimp->plug_in_help_domains,
0 /* FIXME */);
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->interpreter_db),
gui_size);
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->environ_table),
gui_size);
memsize += gimp_g_list_get_memsize (gimp->plug_in_data_list,
0 /* FIXME */);
memsize += gimp_g_object_get_memsize (G_OBJECT (gimp->plug_in_manager));
memsize += gimp_g_hash_table_get_memsize (gimp->image_table);
memsize += gimp_g_hash_table_get_memsize (gimp->item_table);
......@@ -501,9 +446,6 @@ gimp_get_memsize (GimpObject *object,
memsize += gimp_object_get_memsize (GIMP_OBJECT (gimp->pdb), gui_size);
memsize += gimp_g_slist_get_memsize (gimp->load_procs, 0 /* FIXME */);
memsize += gimp_g_slist_get_memsize (gimp->save_procs, 0 /* FIXME */);
memsize += (gimp_object_get_memsize (GIMP_OBJECT (gimp->tool_info_list),
gui_size) +
gimp_object_get_memsize (GIMP_OBJECT (gimp->standard_tool_info),
......@@ -530,8 +472,6 @@ static void
gimp_real_initialize (Gimp *gimp,
GimpInitStatusFunc status_callback)
{
gchar *path;
static const GimpDataFactoryLoaderEntry brush_loader_entries[] =
{
{ gimp_brush_load, GIMP_BRUSH_FILE_EXTENSION, FALSE },
......@@ -628,17 +568,7 @@ gimp_real_initialize (Gimp *gimp,
status_callback (NULL,_("Internal Procedures"), 0.2);
gimp_pdb_init_procs (gimp);
status_callback (NULL, _("Plug-In Interpreters"), 0.8);
path = gimp_config_path_expand (gimp->config->interpreter_path, TRUE, NULL);
gimp_interpreter_db_load (gimp->interpreter_db, path);
g_free (path);
status_callback (NULL, _("Plug-In Environment"), 0.9);
path = gimp_config_path_expand (gimp->config->environ_path, TRUE, NULL);
gimp_environ_table_load (gimp->environ_table, path);
g_free (path);
gimp_plug_in_manager_initialize (gimp->plug_in_manager, status_callback);
status_callback (NULL, "", 1.0);
}
......@@ -650,7 +580,10 @@ gimp_real_restore (Gimp *gimp,
if (gimp->be_verbose)
g_print ("INIT: gimp_real_restore\n");
plug_ins_init (gimp, gimp_get_user_context (gimp), status_callback);
gimp_plug_in_manager_restore (gimp->plug_in_manager,
gimp_get_user_context (gimp), status_callback);
status_callback ("", "", 1.0);
}
static gboolean
......@@ -660,7 +593,7 @@ gimp_real_exit (Gimp *gimp,