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

link the app in a different order as some init functions are called from

2001-10-19  Michael Natterer  <mitch@gimp.org>

	* app/Makefile.am: link the app in a different order as some init
	functions are called from core/gimp.c instead of app_procs.c now.

	* app/app_procs.[ch]: made app_init_update_status() private and
	pass it as callback to various init functions.

	* app/plug_in.[ch]: plug_in_init() take "gimp" and "status_callback"
	parameters.

	* app/undo.c: use "gimage->gimp" instead of "the_gimp", don't
	include "app_procs.h".

	* app/core/core-types.h: added "GimpInitStatusFunc" typedef.

	* app/core/gimp.[ch]: gimp_initialize() and gimp_restore() now
	take a "status_callback" as parameter. Don't include "app_procs.h".

	* app/core/gimpmodules.c: putting the modules in a strong
	container was a bad idea because it may be impossible to finalize
	a GimpModuleInfo object belonging to a stalled module.

	* app/gui/color-area.c: use G_N_ELEMENTS().

	* app/gui/session.c: don't call app_init_update_status() and don't
	include "app_procs.h" because this happens after the splash is
	hidden.

	* tools/pdbgen/app.pl
	* app/pdb/internal_procs.[ch]: pass a "status_callback" to
	internal_procs_init(), don't include "app_procs.h".

	* plug-ins/Makefile.am: build gfig, gimpressionist and imagemap
	again.

	* plug-ins/MapObject/mapobject_preview.c
	* plug-ins/MapObject/mapobject_ui.c: s/gdk_image_unref/g_object_unref/

	* plug-ins/gfig/gfig.c
	* plug-ins/gimpressionist/brush.c
	* plug-ins/gimpressionist/gimpressionist.c
	* plug-ins/gimpressionist/ppmtool.[ch]
	* plug-ins/gimpressionist/presets.c
	* plug-ins/imagemap/imap_browse.[ch]
	* plug-ins/imagemap/imap_csim.y
	* plug-ins/imagemap/imap_edit_area_info.c
	* plug-ins/imagemap/imap_file.c
	* plug-ins/imagemap/imap_main.c
	* plug-ins/imagemap/imap_menu.c
	* plug-ins/imagemap/imap_polygon.c
	* plug-ins/imagemap/imap_popup.c
	* plug-ins/imagemap/imap_preferences.c
	* plug-ins/imagemap/imap_taglist.c
	* plug-ins/imagemap/imap_tools.c: ported to current GLib/Gtk+.

	* plug-ins/gap/gap_arr_dialog.c
	* plug-ins/gap/gap_decode_xanim.c
	* plug-ins/gap/gap_filter_foreach.c
	* plug-ins/gap/gap_filter_main.c
	* plug-ins/gap/gap_frontends_main.c
	* plug-ins/gap/gap_lib.c
	* plug-ins/gap/gap_main.c
	* plug-ins/gap/gap_mod_layer.c
	* plug-ins/gap/gap_mov_dialog.c
	* plug-ins/gap/gap_navigator_dialog.c
	* plug-ins/gap/resize.c: half-way fixed this one too but I'm not
	willing to fix tons of duplicated and deprecated app/ code...
parent faf81e0e
2001-10-19 Michael Natterer <mitch@gimp.org>
* app/Makefile.am: link the app in a different order as some init
functions are called from core/gimp.c instead of app_procs.c now.
* app/app_procs.[ch]: made app_init_update_status() private and
pass it as callback to various init functions.
* app/plug_in.[ch]: plug_in_init() take "gimp" and "status_callback"
parameters.
* app/undo.c: use "gimage->gimp" instead of "the_gimp", don't
include "app_procs.h".
* app/core/core-types.h: added "GimpInitStatusFunc" typedef.
* app/core/gimp.[ch]: gimp_initialize() and gimp_restore() now
take a "status_callback" as parameter. Don't include "app_procs.h".
* app/core/gimpmodules.c: putting the modules in a strong
container was a bad idea because it may be impossible to finalize
a GimpModuleInfo object belonging to a stalled module.
* app/gui/color-area.c: use G_N_ELEMENTS().
* app/gui/session.c: don't call app_init_update_status() and don't
include "app_procs.h" because this happens after the splash is
hidden.
* tools/pdbgen/app.pl
* app/pdb/internal_procs.[ch]: pass a "status_callback" to
internal_procs_init(), don't include "app_procs.h".
* plug-ins/Makefile.am: build gfig, gimpressionist and imagemap
again.
* plug-ins/MapObject/mapobject_preview.c
* plug-ins/MapObject/mapobject_ui.c: s/gdk_image_unref/g_object_unref/
* plug-ins/gfig/gfig.c
* plug-ins/gimpressionist/brush.c
* plug-ins/gimpressionist/gimpressionist.c
* plug-ins/gimpressionist/ppmtool.[ch]
* plug-ins/gimpressionist/presets.c
* plug-ins/imagemap/imap_browse.[ch]
* plug-ins/imagemap/imap_csim.y
* plug-ins/imagemap/imap_edit_area_info.c
* plug-ins/imagemap/imap_file.c
* plug-ins/imagemap/imap_main.c
* plug-ins/imagemap/imap_menu.c
* plug-ins/imagemap/imap_polygon.c
* plug-ins/imagemap/imap_popup.c
* plug-ins/imagemap/imap_preferences.c
* plug-ins/imagemap/imap_taglist.c
* plug-ins/imagemap/imap_tools.c: ported to current GLib/Gtk+.
* plug-ins/gap/gap_arr_dialog.c
* plug-ins/gap/gap_decode_xanim.c
* plug-ins/gap/gap_filter_foreach.c
* plug-ins/gap/gap_filter_main.c
* plug-ins/gap/gap_frontends_main.c
* plug-ins/gap/gap_lib.c
* plug-ins/gap/gap_main.c
* plug-ins/gap/gap_mod_layer.c
* plug-ins/gap/gap_mov_dialog.c
* plug-ins/gap/gap_navigator_dialog.c
* plug-ins/gap/resize.c: half-way fixed this one too but I'm not
willing to fix tons of duplicated and deprecated app/ code...
2001-10-19 Sven Neumann <sven@gimp.org>
* plug-ins/FractalExplorer/FractalExplorer.c
......
......@@ -129,8 +129,8 @@ gimp_LDADD = @STRIP_BEGIN@ \
display/libappdisplay.a \
widgets/libappwidgets.a \
plug-in/libappplug-in.a \
pdb/libapppdb.a \
core/libappcore.a \
pdb/libapppdb.a \
xcf/libappxcf.a \
paint-funcs/libapppaint-funcs.a \
base/libappbase.a \
......
......@@ -299,7 +299,8 @@ plug_in_init_shm (void)
}
void
plug_in_init (void)
plug_in_init (Gimp *gimp,
GimpInitStatusFunc status_callback)
{
extern gboolean use_shm;
......@@ -311,6 +312,9 @@ plug_in_init (void)
gfloat nplugins;
gfloat nth;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (status_callback != NULL);
/* initialize the gimp protocol library and set the read and
* write handlers.
*/
......@@ -344,14 +348,14 @@ plug_in_init (void)
else
filename = gimp_personal_rc_file ("pluginrc");
app_init_update_status (_("Resource configuration"), filename, -1);
(* status_callback) (_("Resource configuration"), filename, -1);
gimprc_parse_file (filename);
/* query any plug-ins that have changed since we last wrote out
* the pluginrc file.
*/
tmp = plug_in_defs;
app_init_update_status (_("Plug-ins"), "", 0);
(* status_callback) (_("Plug-ins"), "", 0);
nplugins = g_slist_length (tmp);
nth = 0;
while (tmp)
......@@ -369,7 +373,7 @@ plug_in_init (void)
plug_in_query (plug_in_def);
}
app_init_update_status (NULL, plug_in_def->prog, nth / nplugins);
(* status_callback) (NULL, plug_in_def->prog, nth / nplugins);
nth++;
}
......@@ -419,7 +423,7 @@ plug_in_init (void)
if (be_verbose)
g_print (_("Starting extensions: "));
app_init_update_status (_("Extensions"), "", 0);
(* status_callback) (_("Extensions"), "", 0);
tmp = proc_defs;
nplugins = g_slist_length (tmp); nth = 0;
......@@ -436,8 +440,7 @@ plug_in_init (void)
if (be_verbose)
g_print ("%s ", proc_def->db_info.name);
app_init_update_status (NULL, proc_def->db_info.name,
nth / nplugins);
(* status_callback) (NULL, proc_def->db_info.name, nth / nplugins);
plug_in_run (&proc_def->db_info, NULL, 0, FALSE, TRUE, -1);
}
......
......@@ -41,8 +41,6 @@
#include "core/gimpdatafactory.h"
#include "core/gimpunit.h"
#include "pdb/internal_procs.h"
#include "display/gimpdisplay-foreach.h"
#include "tools/tool_manager.h"
......@@ -75,7 +73,7 @@ Gimp *the_gimp = NULL;
static gboolean is_app_exit_finish_done = FALSE;
void
static void
app_init_update_status (const gchar *text1,
const gchar *text2,
gdouble percentage)
......@@ -148,17 +146,10 @@ app_init (gint gimp_argc,
/* Create all members of the global Gimp instance which need an already
* parsed gimprc, e.g. the data factories
*/
gimp_initialize (the_gimp);
gimp_initialize (the_gimp, app_init_update_status);
tool_manager_init (the_gimp);
/* Initialize the procedural database
* We need to do this first because any of the init
* procedures might install or query it as needed.
*/
app_init_update_status (_("Procedural Database"), NULL, -1);
internal_procs_init (the_gimp);
/* Now we are ready to draw the splash-screen-image
* to the start-up window
*/
......@@ -169,9 +160,11 @@ app_init (gint gimp_argc,
/* Load all data files
*/
gimp_restore (the_gimp, no_data);
gimp_restore (the_gimp, app_init_update_status, no_data);
plug_in_init (); /* initialize the plug in structures */
/* Initialize the plug-in structures
*/
plug_in_init (the_gimp, app_init_update_status);
if (! no_interface)
{
......
......@@ -26,15 +26,11 @@
extern Gimp *the_gimp;
void app_init_update_status (const gchar *label1,
const gchar *label2,
gdouble percentage);
void app_init (gint gimp_argc,
gchar **gimp_argv);
void app_exit (gboolean kill_it);
void app_exit_finish (void);
gboolean app_exit_finish_done (void);
void app_init (gint gimp_argc,
gchar **gimp_argv);
void app_exit (gboolean kill_it);
void app_exit_finish (void);
gboolean app_exit_finish_done (void);
#endif /* __APP_PROCS_H__ */
......@@ -248,6 +248,9 @@ typedef struct _GimpToolOptions GimpToolOptions;
/* functions */
typedef void (* GimpInitStatusFunc) (const gchar *text1,
const gchar *text2,
gdouble percentage);
typedef void (* GimpDataFileLoaderFunc) (const gchar *filename,
gpointer loader_data);
typedef GimpData * (* GimpDataObjectLoaderFunc) (const gchar *filename);
......
......@@ -75,7 +75,7 @@ gimp_modules_init (Gimp *gimp)
g_return_if_fail (GIMP_IS_GIMP (gimp));
gimp->modules = gimp_list_new (GIMP_TYPE_MODULE_INFO,
GIMP_CONTAINER_POLICY_STRONG);
GIMP_CONTAINER_POLICY_WEAK);
gimp->write_modulerc = FALSE;
}
......@@ -153,7 +153,7 @@ gimp_modules_refresh (Gimp *gimp)
}
static void
gimp_modules_module_free_func (gpointer data,
gimp_modules_module_free_func (gpointer data,
gpointer user_data)
{
GimpModuleInfoObj *module_info = data;
......@@ -286,8 +286,6 @@ gimp_modules_module_initialize (const gchar *filename,
}
gimp_container_add (gimp->modules, GIMP_OBJECT (module_info));
g_object_unref (G_OBJECT (module_info));
}
typedef struct
......@@ -397,4 +395,6 @@ gimp_modules_module_remove_func (gpointer data,
gimp = (Gimp *) user_data;
gimp_container_remove (gimp->modules, GIMP_OBJECT (module_info));
g_object_unref (G_OBJECT (module_info));
}
......@@ -30,6 +30,7 @@
#include "base/tile-manager.h"
#include "pdb/procedural_db.h"
#include "pdb/internal_procs.h"
#include "xcf/xcf.h"
......@@ -54,8 +55,6 @@
#include "gimptoolinfo.h"
#include "gimpunit.h"
#include "app_procs.h"
#include "libgimp/gimpintl.h"
......@@ -313,7 +312,8 @@ gimp_new (gboolean be_verbose)
}
void
gimp_initialize (Gimp *gimp)
gimp_initialize (Gimp *gimp,
GimpInitStatusFunc status_callback)
{
GimpContext *context;
......@@ -343,6 +343,7 @@ gimp_initialize (Gimp *gimp)
};
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (status_callback != NULL);
gimp->brush_factory =
gimp_data_factory_new (GIMP_TYPE_BRUSH,
......@@ -395,39 +396,45 @@ gimp_initialize (Gimp *gimp)
gimp_set_current_context (gimp, context);
g_object_unref (G_OBJECT (context));
/* register all internal procedures */
(* status_callback) (_("Procedural Database"), NULL, -1);
internal_procs_init (gimp, status_callback);
}
void
gimp_restore (Gimp *gimp,
gboolean no_data)
gimp_restore (Gimp *gimp,
GimpInitStatusFunc status_callback,
gboolean no_data)
{
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (status_callback != NULL);
/* initialize the global parasite table */
app_init_update_status (_("Looking for data files"), _("Parasites"), 0.00);
(* status_callback) (_("Looking for data files"), _("Parasites"), 0.00);
gimp_parasiterc_load (gimp);
/* initialize the list of gimp brushes */
app_init_update_status (NULL, _("Brushes"), 0.18);
(* status_callback) (NULL, _("Brushes"), 0.18);
gimp_data_factory_data_init (gimp->brush_factory, no_data);
/* initialize the list of gimp patterns */
app_init_update_status (NULL, _("Patterns"), 0.36);
(* status_callback) (NULL, _("Patterns"), 0.36);
gimp_data_factory_data_init (gimp->pattern_factory, no_data);
/* initialize the list of gimp palettes */
app_init_update_status (NULL, _("Palettes"), 0.54);
(* status_callback) (NULL, _("Palettes"), 0.54);
gimp_data_factory_data_init (gimp->palette_factory, no_data);
/* initialize the list of gimp gradients */
app_init_update_status (NULL, _("Gradients"), 0.72);
(* status_callback) (NULL, _("Gradients"), 0.72);
gimp_data_factory_data_init (gimp->gradient_factory, no_data);
/* initialize the global parasite table */
app_init_update_status (NULL, _("Documents"), 0.90);
(* status_callback) (NULL, _("Documents"), 0.90);
gimp_documents_load (gimp);
app_init_update_status (NULL, NULL, 1.00);
(* status_callback) (NULL, NULL, 1.00);
gimp_modules_load (gimp);
}
......
......@@ -115,50 +115,52 @@ struct _GimpClass
GType gimp_get_type (void);
Gimp * gimp_new (gboolean be_verbose);
Gimp * gimp_new (gboolean be_verbose);
void gimp_initialize (Gimp *gimp);
void gimp_initialize (Gimp *gimp,
GimpInitStatusFunc status_callback);
void gimp_restore (Gimp *gimp,
gboolean no_data);
void gimp_shutdown (Gimp *gimp);
void gimp_restore (Gimp *gimp,
GimpInitStatusFunc status_callback,
gboolean no_data);
void gimp_shutdown (Gimp *gimp);
void gimp_set_busy (Gimp *gimp);
void gimp_set_busy_until_idle (Gimp *gimp);
void gimp_unset_busy (Gimp *gimp);
void gimp_set_busy (Gimp *gimp);
void gimp_set_busy_until_idle (Gimp *gimp);
void gimp_unset_busy (Gimp *gimp);
GimpImage * gimp_create_image (Gimp *gimp,
gint width,
gint height,
GimpImageBaseType type,
gboolean attach_comment);
GimpImage * gimp_create_image (Gimp *gimp,
gint width,
gint height,
GimpImageBaseType type,
gboolean attach_comment);
void gimp_create_display (Gimp *gimp,
GimpImage *gimage);
void gimp_create_display (Gimp *gimp,
GimpImage *gimage);
/*
void gimp_open_file (Gimp *gimp,
const gchar *filename,
gboolean with_display);
void gimp_open_file (Gimp *gimp,
const gchar *filename,
gboolean with_display);
*/
GimpContext * gimp_create_context (Gimp *gimp,
const gchar *name,
GimpContext *template);
GimpContext * gimp_create_context (Gimp *gimp,
const gchar *name,
GimpContext *template);
GimpContext * gimp_get_standard_context (Gimp *gimp);
GimpContext * gimp_get_standard_context (Gimp *gimp);
void gimp_set_default_context (Gimp *gimp,
GimpContext *context);
GimpContext * gimp_get_default_context (Gimp *gimp);
void gimp_set_default_context (Gimp *gimp,
GimpContext *context);
GimpContext * gimp_get_default_context (Gimp *gimp);
void gimp_set_user_context (Gimp *gimp,
GimpContext *context);
GimpContext * gimp_get_user_context (Gimp *gimp);
void gimp_set_user_context (Gimp *gimp,
GimpContext *context);
GimpContext * gimp_get_user_context (Gimp *gimp);
void gimp_set_current_context (Gimp *gimp,
GimpContext *context);
GimpContext * gimp_get_current_context (Gimp *gimp);
void gimp_set_current_context (Gimp *gimp,
GimpContext *context);
GimpContext * gimp_get_current_context (Gimp *gimp);
#endif /* __GIMP_H__ */
......@@ -55,7 +55,6 @@
#include "tools/gimptransformtool.h"
#include "tools/tool_manager.h"
#include "app_procs.h"
#include "floating_sel.h"
#include "path_transform.h"
#include "undo.h"
......@@ -449,7 +448,7 @@ pop_stack (GimpImage *gimage,
if (status && !in_group)
{
/* Flush any image updates and displays */
gdisp = gimp_context_get_display (gimp_get_user_context (the_gimp));
gdisp = gimp_context_get_display (gimp_get_user_context (gimage->gimp));
if (gdisp != NULL)
{
......
......@@ -75,7 +75,7 @@ gimp_modules_init (Gimp *gimp)
g_return_if_fail (GIMP_IS_GIMP (gimp));
gimp->modules = gimp_list_new (GIMP_TYPE_MODULE_INFO,
GIMP_CONTAINER_POLICY_STRONG);
GIMP_CONTAINER_POLICY_WEAK);
gimp->write_modulerc = FALSE;
}
......@@ -153,7 +153,7 @@ gimp_modules_refresh (Gimp *gimp)
}
static void
gimp_modules_module_free_func (gpointer data,
gimp_modules_module_free_func (gpointer data,
gpointer user_data)
{
GimpModuleInfoObj *module_info = data;
......@@ -286,8 +286,6 @@ gimp_modules_module_initialize (const gchar *filename,
}
gimp_container_add (gimp->modules, GIMP_OBJECT (module_info));
g_object_unref (G_OBJECT (module_info));
}
typedef struct
......@@ -397,4 +395,6 @@ gimp_modules_module_remove_func (gpointer data,
gimp = (Gimp *) user_data;
gimp_container_remove (gimp->modules, GIMP_OBJECT (module_info));
g_object_unref (G_OBJECT (module_info));
}
......@@ -96,8 +96,7 @@ static GtkTargetEntry color_area_target_table[] =
{
GIMP_TARGET_COLOR
};
static guint n_color_area_targets = (sizeof (color_area_target_table) /
sizeof (color_area_target_table[0]));
/* Local functions */
static ColorAreaTarget
......@@ -512,7 +511,8 @@ color_area_create (gint width,
/* dnd stuff */
gtk_drag_source_set (color_area,
GDK_BUTTON1_MASK | GDK_BUTTON2_MASK,
color_area_target_table, n_color_area_targets,
color_area_target_table,
G_N_ELEMENTS (color_area_target_table),
GDK_ACTION_COPY | GDK_ACTION_MOVE);
gimp_dnd_color_source_set (color_area, color_area_drag_color, NULL);
......@@ -520,7 +520,8 @@ color_area_create (gint width,
GTK_DEST_DEFAULT_HIGHLIGHT |
GTK_DEST_DEFAULT_MOTION |
GTK_DEST_DEFAULT_DROP,
color_area_target_table, n_color_area_targets,
color_area_target_table,
G_N_ELEMENTS (color_area_target_table),
GDK_ACTION_COPY);
gimp_dnd_color_dest_set (color_area, color_area_drop_color, NULL);
......
......@@ -299,7 +299,8 @@ plug_in_init_shm (void)
}
void
plug_in_init (void)
plug_in_init (Gimp *gimp,
GimpInitStatusFunc status_callback)
{
extern gboolean use_shm;
......@@ -311,6 +312,9 @@ plug_in_init (void)
gfloat nplugins;
gfloat nth;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (status_callback != NULL);
/* initialize the gimp protocol library and set the read and
* write handlers.
*/
......@@ -344,14 +348,14 @@ plug_in_init (void)
else
filename = gimp_personal_rc_file ("pluginrc");
app_init_update_status (_("Resource configuration"), filename, -1);
(* status_callback) (_("Resource configuration"), filename, -1);
gimprc_parse_file (filename);
/* query any plug-ins that have changed since we last wrote out
* the pluginrc file.
*/
tmp = plug_in_defs;
app_init_update_status (_("Plug-ins"), "", 0);
(* status_callback) (_("Plug-ins"), "", 0);
nplugins = g_slist_length (tmp);
nth = 0;
while (tmp)
......@@ -369,7 +373,7 @@ plug_in_init (void)
plug_in_query (plug_in_def);
}
app_init_update_status (NULL, plug_in_def->prog, nth / nplugins);
(* status_callback) (NULL, plug_in_def->prog, nth / nplugins);
nth++;
}
......@@ -419,7 +423,7 @@ plug_in_init (void)
if (be_verbose)
g_print (_("Starting extensions: "));
app_init_update_status (_("Extensions"), "", 0);
(* status_callback) (_("Extensions"), "", 0);
tmp = proc_defs;
nplugins = g_slist_length (tmp); nth = 0;
......@@ -436,8 +440,7 @@ plug_in_init (void)
if (be_verbose)
g_print ("%s ", proc_def->db_info.name);
app_init_update_status (NULL, proc_def->db_info.name,
nth / nplugins);
(* status_callback) (NULL, proc_def->db_info.name, nth / nplugins);
plug_in_run (&proc_def->db_info, NULL, 0, FALSE, TRUE, -1);
}
......
......@@ -299,7 +299,8 @@ plug_in_init_shm (void)
}
void
plug_in_init (void)
plug_in_init (Gimp *gimp,
GimpInitStatusFunc status_callback)
{
extern gboolean use_shm;
......@@ -311,6 +312,9 @@ plug_in_init (void)
gfloat nplugins;
gfloat nth;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (status_callback != NULL);
/* initialize the gimp protocol library and set the read and
* write handlers.
*/
......@@ -344,14 +348,14 @@ plug_in_init (void)
else
filename = gimp_personal_rc_file ("pluginrc");
app_init_update_status (_("Resource configuration"), filename, -1);
(* status_callback) (_("Resource configuration"), filename, -1);
gimprc_parse_file (filename);
/* query any plug-ins that have changed since we last wrote out
* the pluginrc file.
*/
tmp = plug_in_defs;
app_init_update_status (_("Plug-ins"), "", 0);
(* status_callback) (_("Plug-ins"), "", 0);
nplugins = g_slist_length (tmp);
nth = 0;
while (tmp)
......@@ -369,7 +373,7 @@ plug_in_init (void)
plug_in_query (plug_in_def);
}
app_init_update_status (NULL, plug_in_def->prog, nth / nplugins);
(* status_callback) (NULL, plug_in_def->prog, nth / nplugins);
nth++;
}
......@@ -419,7 +423,7 @@ plug_in_init (void)
if (be_verbose)
g_print (_("Starting extensions: "));
app_init_update_status (_("Extensions"), "", 0);
(* status_callback) (_("Extensions"), "", 0);
tmp = proc_defs;
nplugins = g_slist_length (tmp); nth = 0;
......@@ -436,8 +440,7 @@ plug_in_init (void)
if (be_verbose)
g_print ("%s ", proc_def->db_info.name);
app_init_update_status (NULL, proc_def->db_info.name,
nth / nplugins);
(* status_callback) (NULL, proc_def->db_info.name, nth / nplugins);
plug_in_run (&proc_def->db_info, NULL, 0, FALSE, TRUE, -1);
}
......
......@@ -52,7 +52,6 @@
#include "color-notebook.h"
#include "session.h"
#include "app_procs.h"
#include "appenv.h"
#include "gimprc.h"
......@@ -66,7 +65,6 @@ session_init (void)
gchar *filename;
filename = gimp_personal_rc_file ("sessionrc");
app_init_update_status (NULL, filename, -1);
if (! gimprc_parse_file (filename))
{
......
......@@ -299,7 +299,8 @@ plug_in_init_shm (void)
}
void
plug_in_init (void)
plug_in_init (Gimp *gimp,
GimpInitStatusFunc status_callback)
{
extern gboolean use_shm;
......@@ -311,6 +312,9 @@ plug_in_init (void)
gfloat nplugins;
gfloat nth;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (status_callback != NULL);
/* initialize the gimp protocol library and set the read and
* write handlers.
*/
......@@ -344,14 +348,14 @@ plug_in_init (void)
else
filename = gimp_personal_rc_file ("pluginrc");
app_init_update_status (_("Resource configuration"), filename, -1);
(* status_callback) (_("Resource configuration"), filename, -1);
gimprc_parse_file (filename);
/* query any plug-ins that have changed since we last wrote out
* the pluginrc file.
*/
tmp = plug_in_defs;
app_init_update_status (_("Plug-ins"), "", 0);
(* status_callback) (_("Plug-ins"), "", 0);
nplugins = g_slist_length (tmp);
nth = 0;
while (tmp)
......@@ -369,7 +373,7 @@ plug_in_init (void)
plug_in_query (plug_in_def);
}
app_init_update_status (NULL, plug_in_def->prog, nth / nplugins);
(* status_callback) (NULL, plug_in_def->prog, nth / nplugins);
nth++;
}
......@@ -419,7 +423,7 @@ plug_in_init (void)
if (be_verbose)
g_print (_("Starting extensions: "));
app_init_update_status (_("Extensions"), "", 0);
(* status_callback) (_("Extensions"), "", 0);
tmp = proc_defs;