added a GimpContext parameter and use it to start plug-ins.

2004-06-30  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-ins.[ch] (plug_ins_init): added a GimpContext
	parameter and use it to start plug-ins.

	* app/core/gimp.c (gimp_real_restore): pass the user context.
	Restores script-fu's access to the global FG, FG, brush, ...
This commit is contained in:
Michael Natterer 2004-06-30 16:55:43 +00:00 committed by Michael Natterer
parent bec9f9a670
commit b13087adb9
6 changed files with 33 additions and 29 deletions

View File

@ -1,3 +1,11 @@
2004-06-30 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-ins.[ch] (plug_ins_init): added a GimpContext
parameter and use it to start plug-ins.
* app/core/gimp.c (gimp_real_restore): pass the user context.
Restores script-fu's access to the global FG, FG, brush, ...
2004-06-30 Sven Neumann <sven@gimp.org>
* app/core/core-enums.c

View File

@ -652,7 +652,7 @@ gimp_real_restore (Gimp *gimp,
if (gimp->be_verbose)
g_print ("INIT: gimp_real_restore\n");
plug_ins_init (gimp, status_callback);
plug_ins_init (gimp, gimp_get_user_context (gimp), status_callback);
}
static gboolean

View File

@ -82,24 +82,23 @@ static PlugInProcDef * plug_ins_proc_def_insert (Gimp *gimp,
void
plug_ins_init (Gimp *gimp,
GimpContext *context,
GimpInitStatusFunc status_callback)
{
GimpContext *context;
gchar *filename;
gchar *basename;
gchar *path;
GSList *list;
GList *extensions = NULL;
gdouble n_plugins;
gdouble n_extensions;
gdouble nth;
GError *error = NULL;
gchar *filename;
gchar *basename;
gchar *path;
GSList *list;
GList *extensions = NULL;
gdouble n_plugins;
gdouble n_extensions;
gdouble nth;
GError *error = NULL;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (GIMP_IS_CONTEXT (context));
g_return_if_fail (status_callback != NULL);
context = gimp_context_new (gimp, "temp", NULL);
plug_in_init (gimp);
/* search for binaries in the plug-in directory path */
@ -361,8 +360,6 @@ plug_ins_init (Gimp *gimp,
g_slist_free (gimp->plug_in_defs);
gimp->plug_in_defs = NULL;
g_object_unref (context);
}
void

View File

@ -21,6 +21,7 @@
void plug_ins_init (Gimp *gimp,
GimpContext *context,
GimpInitStatusFunc status_callback);
void plug_ins_exit (Gimp *gimp);

View File

@ -82,24 +82,23 @@ static PlugInProcDef * plug_ins_proc_def_insert (Gimp *gimp,
void
plug_ins_init (Gimp *gimp,
GimpContext *context,
GimpInitStatusFunc status_callback)
{
GimpContext *context;
gchar *filename;
gchar *basename;
gchar *path;
GSList *list;
GList *extensions = NULL;
gdouble n_plugins;
gdouble n_extensions;
gdouble nth;
GError *error = NULL;
gchar *filename;
gchar *basename;
gchar *path;
GSList *list;
GList *extensions = NULL;
gdouble n_plugins;
gdouble n_extensions;
gdouble nth;
GError *error = NULL;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (GIMP_IS_CONTEXT (context));
g_return_if_fail (status_callback != NULL);
context = gimp_context_new (gimp, "temp", NULL);
plug_in_init (gimp);
/* search for binaries in the plug-in directory path */
@ -361,8 +360,6 @@ plug_ins_init (Gimp *gimp,
g_slist_free (gimp->plug_in_defs);
gimp->plug_in_defs = NULL;
g_object_unref (context);
}
void

View File

@ -21,6 +21,7 @@
void plug_ins_init (Gimp *gimp,
GimpContext *context,
GimpInitStatusFunc status_callback);
void plug_ins_exit (Gimp *gimp);