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:

committed by
Michael Natterer

parent
bec9f9a670
commit
b13087adb9
@ -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>
|
2004-06-30 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* app/core/core-enums.c
|
* app/core/core-enums.c
|
||||||
|
@ -652,7 +652,7 @@ gimp_real_restore (Gimp *gimp,
|
|||||||
if (gimp->be_verbose)
|
if (gimp->be_verbose)
|
||||||
g_print ("INIT: gimp_real_restore\n");
|
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
|
static gboolean
|
||||||
|
@ -82,9 +82,9 @@ static PlugInProcDef * plug_ins_proc_def_insert (Gimp *gimp,
|
|||||||
|
|
||||||
void
|
void
|
||||||
plug_ins_init (Gimp *gimp,
|
plug_ins_init (Gimp *gimp,
|
||||||
|
GimpContext *context,
|
||||||
GimpInitStatusFunc status_callback)
|
GimpInitStatusFunc status_callback)
|
||||||
{
|
{
|
||||||
GimpContext *context;
|
|
||||||
gchar *filename;
|
gchar *filename;
|
||||||
gchar *basename;
|
gchar *basename;
|
||||||
gchar *path;
|
gchar *path;
|
||||||
@ -96,10 +96,9 @@ plug_ins_init (Gimp *gimp,
|
|||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||||
|
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||||
g_return_if_fail (status_callback != NULL);
|
g_return_if_fail (status_callback != NULL);
|
||||||
|
|
||||||
context = gimp_context_new (gimp, "temp", NULL);
|
|
||||||
|
|
||||||
plug_in_init (gimp);
|
plug_in_init (gimp);
|
||||||
|
|
||||||
/* search for binaries in the plug-in directory path */
|
/* 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);
|
g_slist_free (gimp->plug_in_defs);
|
||||||
gimp->plug_in_defs = NULL;
|
gimp->plug_in_defs = NULL;
|
||||||
|
|
||||||
g_object_unref (context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
void plug_ins_init (Gimp *gimp,
|
void plug_ins_init (Gimp *gimp,
|
||||||
|
GimpContext *context,
|
||||||
GimpInitStatusFunc status_callback);
|
GimpInitStatusFunc status_callback);
|
||||||
void plug_ins_exit (Gimp *gimp);
|
void plug_ins_exit (Gimp *gimp);
|
||||||
|
|
||||||
|
@ -82,9 +82,9 @@ static PlugInProcDef * plug_ins_proc_def_insert (Gimp *gimp,
|
|||||||
|
|
||||||
void
|
void
|
||||||
plug_ins_init (Gimp *gimp,
|
plug_ins_init (Gimp *gimp,
|
||||||
|
GimpContext *context,
|
||||||
GimpInitStatusFunc status_callback)
|
GimpInitStatusFunc status_callback)
|
||||||
{
|
{
|
||||||
GimpContext *context;
|
|
||||||
gchar *filename;
|
gchar *filename;
|
||||||
gchar *basename;
|
gchar *basename;
|
||||||
gchar *path;
|
gchar *path;
|
||||||
@ -96,10 +96,9 @@ plug_ins_init (Gimp *gimp,
|
|||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
g_return_if_fail (GIMP_IS_GIMP (gimp));
|
||||||
|
g_return_if_fail (GIMP_IS_CONTEXT (context));
|
||||||
g_return_if_fail (status_callback != NULL);
|
g_return_if_fail (status_callback != NULL);
|
||||||
|
|
||||||
context = gimp_context_new (gimp, "temp", NULL);
|
|
||||||
|
|
||||||
plug_in_init (gimp);
|
plug_in_init (gimp);
|
||||||
|
|
||||||
/* search for binaries in the plug-in directory path */
|
/* 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);
|
g_slist_free (gimp->plug_in_defs);
|
||||||
gimp->plug_in_defs = NULL;
|
gimp->plug_in_defs = NULL;
|
||||||
|
|
||||||
g_object_unref (context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
|
|
||||||
void plug_ins_init (Gimp *gimp,
|
void plug_ins_init (Gimp *gimp,
|
||||||
|
GimpContext *context,
|
||||||
GimpInitStatusFunc status_callback);
|
GimpInitStatusFunc status_callback);
|
||||||
void plug_ins_exit (Gimp *gimp);
|
void plug_ins_exit (Gimp *gimp);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user