]> spindle.queued.net Git - midori/commitdiff
Destroy and set parent of Preferences from Diagnostic dialog
authorChristian Dywan <christian@twotoasts.de>
Sun, 11 Jan 2009 19:51:18 +0000 (20:51 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sun, 11 Jan 2009 19:51:18 +0000 (20:51 +0100)
midori/main.c

index 2d0c7b08707e04674f33080f28c26f8345df6cbe..c1d728f90c0e423ade801d82cb592ded34be218c 100644 (file)
@@ -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