free the dialog's private data struct using a weak reference, not in a

2004-12-18  Sven Neumann  <sven@gimp.org>

	* app/dialogs/resize-dialog.c: free the dialog's private data
	struct using a weak reference, not in a "destroy" handler.  Should
	fix bug #161472.

	* app/dialogs/print-size-dialog.c
	* app/dialogs/scale-dialog.c: same change here.
This commit is contained in:
Sven Neumann 2004-12-18 11:58:39 +00:00 committed by Sven Neumann
parent 014d616d44
commit 0ac7b4b1fc
4 changed files with 12 additions and 9 deletions

View File

@ -1,3 +1,12 @@
2004-12-18 Sven Neumann <sven@gimp.org>
* app/dialogs/resize-dialog.c: free the dialog's private data
struct using a weak reference, not in a "destroy" handler. Should
fix bug #161472.
* app/dialogs/print-size-dialog.c
* app/dialogs/scale-dialog.c: same change here.
2004-12-18 Sven Neumann <sven@gimp.org>
* app/dialogs/quit-dialog.c: marked a message for translation that

View File

@ -113,9 +113,7 @@ print_size_dialog_new (GimpImage *image,
private = g_new0 (PrintSizeDialog, 1);
g_signal_connect_swapped (dialog, "destroy",
G_CALLBACK (g_free),
private);
g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_free, private);
g_signal_connect (dialog, "response",
G_CALLBACK (print_size_dialog_response),

View File

@ -145,9 +145,7 @@ resize_dialog_new (GimpViewable *viewable,
private = g_new0 (ResizeDialog, 1);
g_signal_connect_swapped (dialog, "destroy",
G_CALLBACK (g_free),
private);
g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_free, private);
private->viewable = viewable;
private->old_width = width;

View File

@ -126,9 +126,7 @@ scale_dialog_new (GimpViewable *viewable,
private = g_new0 (ScaleDialog, 1);
g_signal_connect_swapped (dialog, "destroy",
G_CALLBACK (g_free),
private);
g_object_weak_ref (G_OBJECT (dialog), (GWeakNotify) g_free, private);
private->viewable = viewable;
private->interpolation = interpolation;