From 3905c6947bf334ea9889e679fb02af53dad5ec0e Mon Sep 17 00:00:00 2001 From: Manish Singh Date: Sun, 22 Feb 1998 10:06:01 +0000 Subject: [PATCH] refcount fixups... -Yosh --- libgimp/gimpprocbrowserdialog.c | 6 ++++-- libgimp/gimpprocview.c | 6 ++++-- plug-ins/animationplay/animationplay.c | 5 +++-- plug-ins/common/animationplay.c | 5 +++-- plug-ins/dbbrowser/dbbrowser_utils.c | 6 ++++-- plug-ins/dbbrowser/gimpprocbrowser.c | 6 ++++-- plug-ins/dbbrowser/gimpprocview.c | 6 ++++-- 7 files changed, 26 insertions(+), 14 deletions(-) diff --git a/libgimp/gimpprocbrowserdialog.c b/libgimp/gimpprocbrowserdialog.c index b28044c935..a6047adaf4 100644 --- a/libgimp/gimpprocbrowserdialog.c +++ b/libgimp/gimpprocbrowserdialog.c @@ -483,10 +483,12 @@ dialog_close_callback (GtkWidget *widget, /* we are called by another application : just kill the dialog box */ gtk_widget_hide(dbbrowser->dlg); gtk_widget_destroy(dbbrowser->dlg); - } else + } else { /* we are in the plug_in : kill the gtk application */ + gtk_widget_destroy(dbbrowser->dlg); gtk_main_quit (); -} + } +} static void dialog_apply_callback (GtkWidget *widget, diff --git a/libgimp/gimpprocview.c b/libgimp/gimpprocview.c index b28044c935..a6047adaf4 100644 --- a/libgimp/gimpprocview.c +++ b/libgimp/gimpprocview.c @@ -483,10 +483,12 @@ dialog_close_callback (GtkWidget *widget, /* we are called by another application : just kill the dialog box */ gtk_widget_hide(dbbrowser->dlg); gtk_widget_destroy(dbbrowser->dlg); - } else + } else { /* we are in the plug_in : kill the gtk application */ + gtk_widget_destroy(dbbrowser->dlg); gtk_main_quit (); -} + } +} static void dialog_apply_callback (GtkWidget *widget, diff --git a/plug-ins/animationplay/animationplay.c b/plug-ins/animationplay/animationplay.c index f4b79c635d..4cfdb86e66 100644 --- a/plug-ins/animationplay/animationplay.c +++ b/plug-ins/animationplay/animationplay.c @@ -297,7 +297,7 @@ build_dialog(GImageType basetype, gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); gtk_signal_connect (GTK_OBJECT (dlg), "destroy", (GtkSignalFunc) window_close_callback, - NULL); + dlg); /* Action area - 'close' button only. */ @@ -306,7 +306,7 @@ build_dialog(GImageType basetype, GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", (GtkSignalFunc) window_close_callback, - NULL); + dlg); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0); gtk_widget_grab_default (button); @@ -883,6 +883,7 @@ static void window_close_callback (GtkWidget *widget, gpointer data) { + gtk_widget_destroy(GTK_WIDGET(data)); gtk_main_quit(); } diff --git a/plug-ins/common/animationplay.c b/plug-ins/common/animationplay.c index f4b79c635d..4cfdb86e66 100644 --- a/plug-ins/common/animationplay.c +++ b/plug-ins/common/animationplay.c @@ -297,7 +297,7 @@ build_dialog(GImageType basetype, gtk_window_position (GTK_WINDOW (dlg), GTK_WIN_POS_MOUSE); gtk_signal_connect (GTK_OBJECT (dlg), "destroy", (GtkSignalFunc) window_close_callback, - NULL); + dlg); /* Action area - 'close' button only. */ @@ -306,7 +306,7 @@ build_dialog(GImageType basetype, GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); gtk_signal_connect_object (GTK_OBJECT (button), "clicked", (GtkSignalFunc) window_close_callback, - NULL); + dlg); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->action_area), button, TRUE, TRUE, 0); gtk_widget_grab_default (button); @@ -883,6 +883,7 @@ static void window_close_callback (GtkWidget *widget, gpointer data) { + gtk_widget_destroy(GTK_WIDGET(data)); gtk_main_quit(); } diff --git a/plug-ins/dbbrowser/dbbrowser_utils.c b/plug-ins/dbbrowser/dbbrowser_utils.c index b28044c935..a6047adaf4 100644 --- a/plug-ins/dbbrowser/dbbrowser_utils.c +++ b/plug-ins/dbbrowser/dbbrowser_utils.c @@ -483,10 +483,12 @@ dialog_close_callback (GtkWidget *widget, /* we are called by another application : just kill the dialog box */ gtk_widget_hide(dbbrowser->dlg); gtk_widget_destroy(dbbrowser->dlg); - } else + } else { /* we are in the plug_in : kill the gtk application */ + gtk_widget_destroy(dbbrowser->dlg); gtk_main_quit (); -} + } +} static void dialog_apply_callback (GtkWidget *widget, diff --git a/plug-ins/dbbrowser/gimpprocbrowser.c b/plug-ins/dbbrowser/gimpprocbrowser.c index b28044c935..a6047adaf4 100644 --- a/plug-ins/dbbrowser/gimpprocbrowser.c +++ b/plug-ins/dbbrowser/gimpprocbrowser.c @@ -483,10 +483,12 @@ dialog_close_callback (GtkWidget *widget, /* we are called by another application : just kill the dialog box */ gtk_widget_hide(dbbrowser->dlg); gtk_widget_destroy(dbbrowser->dlg); - } else + } else { /* we are in the plug_in : kill the gtk application */ + gtk_widget_destroy(dbbrowser->dlg); gtk_main_quit (); -} + } +} static void dialog_apply_callback (GtkWidget *widget, diff --git a/plug-ins/dbbrowser/gimpprocview.c b/plug-ins/dbbrowser/gimpprocview.c index b28044c935..a6047adaf4 100644 --- a/plug-ins/dbbrowser/gimpprocview.c +++ b/plug-ins/dbbrowser/gimpprocview.c @@ -483,10 +483,12 @@ dialog_close_callback (GtkWidget *widget, /* we are called by another application : just kill the dialog box */ gtk_widget_hide(dbbrowser->dlg); gtk_widget_destroy(dbbrowser->dlg); - } else + } else { /* we are in the plug_in : kill the gtk application */ + gtk_widget_destroy(dbbrowser->dlg); gtk_main_quit (); -} + } +} static void dialog_apply_callback (GtkWidget *widget,