From 88474b45fb983b72d971f86d913efe9e9cba1583 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 11 Jan 2009 20:51:18 +0100 Subject: [PATCH] Destroy and set parent of Preferences from Diagnostic dialog --- midori/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/midori/main.c b/midori/main.c index 2d0c7b08..c1d728f9 100644 --- a/midori/main.c +++ b/midori/main.c @@ -1645,8 +1645,10 @@ static void button_modify_preferences_clicked_cb (GtkWidget* button, MidoriWebSettings* settings) { - GtkWidget* dialog = midori_preferences_new (NULL, settings); - gtk_dialog_run (GTK_DIALOG (dialog)); + GtkWidget* dialog = midori_preferences_new ( + GTK_WINDOW (gtk_widget_get_toplevel (button)), settings); + if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_DELETE_EVENT) + gtk_widget_destroy (dialog); } static void -- 2.39.5