GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit ed2116ac authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/plug-in/plug-in-progress.c app/plug-in/plug-in-run.c don't keep a

2004-08-17  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-run.c
	* app/plug-in/plug-in.c: don't keep a strong reference to the
	GimpProgress object, instead use a weak reference and deal with
	the progress being destroyed while the plug-in is running.
	Fixes bug #150194.
parent 6543cfde
2004-08-17 Sven Neumann <sven@gimp.org>
* app/plug-in/plug-in-progress.c
* app/plug-in/plug-in-run.c
* app/plug-in/plug-in.c: don't keep a strong reference to the
GimpProgress object, instead use a weak reference and deal with
the progress being destroyed while the plug-in is running.
Fixes bug #150194.
2004-08-16 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcolorframe.c (gimp_color_frame_update): fixed
......
......@@ -54,7 +54,12 @@ plug_in_progress_start (PlugIn *plug_in,
plug_in->progress = gimp_new_progress (plug_in->gimp, display_ID);
if (plug_in->progress)
plug_in->progress_created = TRUE;
{
plug_in->progress_created = TRUE;
g_object_add_weak_pointer (G_OBJECT (plug_in->progress),
(gpointer *) &plug_in->progress);
}
}
if (plug_in->progress)
......
......@@ -318,7 +318,8 @@ plug_in_unref (PlugIn *plug_in)
plug_in_progress_end (plug_in);
if (plug_in->progress)
g_object_unref (plug_in->progress);
g_object_remove_weak_pointer (G_OBJECT (plug_in->progress),
(gpointer *) &plug_in->progress);
g_object_unref (plug_in->context);
......@@ -615,7 +616,8 @@ plug_in_close (PlugIn *plug_in,
if (plug_in->progress)
{
g_object_unref (plug_in->progress);
g_object_remove_weak_pointer (G_OBJECT (plug_in->progress),
(gpointer *) &plug_in->progress);
plug_in->progress = NULL;
}
......
......@@ -101,7 +101,12 @@ plug_in_run (Gimp *gimp,
}
if (progress)
plug_in->progress = g_object_ref (progress);
{
plug_in->progress = progress;
g_object_add_weak_pointer (G_OBJECT (plug_in->progress),
(gpointer *) &plug_in->progress);
}
config.version = GIMP_PROTOCOL_VERSION;
config.tile_width = TILE_WIDTH;
......
......@@ -101,7 +101,12 @@ plug_in_run (Gimp *gimp,
}
if (progress)
plug_in->progress = g_object_ref (progress);
{
plug_in->progress = progress;
g_object_add_weak_pointer (G_OBJECT (plug_in->progress),
(gpointer *) &plug_in->progress);
}
config.version = GIMP_PROTOCOL_VERSION;
config.tile_width = TILE_WIDTH;
......
......@@ -54,7 +54,12 @@ plug_in_progress_start (PlugIn *plug_in,
plug_in->progress = gimp_new_progress (plug_in->gimp, display_ID);
if (plug_in->progress)
plug_in->progress_created = TRUE;
{
plug_in->progress_created = TRUE;
g_object_add_weak_pointer (G_OBJECT (plug_in->progress),
(gpointer *) &plug_in->progress);
}
}
if (plug_in->progress)
......
......@@ -101,7 +101,12 @@ plug_in_run (Gimp *gimp,
}
if (progress)
plug_in->progress = g_object_ref (progress);
{
plug_in->progress = progress;
g_object_add_weak_pointer (G_OBJECT (plug_in->progress),
(gpointer *) &plug_in->progress);
}
config.version = GIMP_PROTOCOL_VERSION;
config.tile_width = TILE_WIDTH;
......
......@@ -318,7 +318,8 @@ plug_in_unref (PlugIn *plug_in)
plug_in_progress_end (plug_in);
if (plug_in->progress)
g_object_unref (plug_in->progress);
g_object_remove_weak_pointer (G_OBJECT (plug_in->progress),
(gpointer *) &plug_in->progress);
g_object_unref (plug_in->context);
......@@ -615,7 +616,8 @@ plug_in_close (PlugIn *plug_in,
if (plug_in->progress)
{
g_object_unref (plug_in->progress);
g_object_remove_weak_pointer (G_OBJECT (plug_in->progress),
(gpointer *) &plug_in->progress);
plug_in->progress = NULL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment