From: Christian Dywan Date: Sun, 11 Jan 2009 19:51:18 +0000 (+0100) Subject: Destroy and set parent of Preferences from Diagnostic dialog X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88474b45fb983b72d971f86d913efe9e9cba1583;p=midori Destroy and set parent of Preferences from Diagnostic dialog --- 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