]> spindle.queued.net Git - midori/commitdiff
Unset save file dialog when it is destroyed
authorChristian Dywan <christian@twotoasts.de>
Sat, 24 Apr 2010 22:57:21 +0000 (00:57 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 24 Apr 2010 22:57:21 +0000 (00:57 +0200)
If the window manager closes the dialogue rather than one of the
buttons, it is destroyed implicitly.

midori/midori-browser.c

index e280c263d7a68047eabd8d680af8a5cf921c7ea3..85b7d8f8c6384fd25ce606dd3c9757509eb5bfd3 100644 (file)
@@ -1538,6 +1538,8 @@ midori_view_download_requested_cb (GtkWidget*      view,
                 folder = katze_object_get_string (browser->settings, "download-folder");
                 gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), folder);
                 g_free (folder);
+                g_signal_connect (dialog, "destroy",
+                                  G_CALLBACK (gtk_widget_destroyed), &dialog);
                 g_signal_connect (dialog, "response",
                     G_CALLBACK (midori_view_download_save_as_response_cb), browser);
             }