From 2aa3ce4a65e157968b159554ecb554a269a3915c Mon Sep 17 00:00:00 2001 From: Gustavo Noronha Silva Date: Mon, 1 Jun 2009 23:42:42 -0300 Subject: Correctly handle the 'cancel' case in the download decision dialog Bug #583855 The code that handled responses for the download decision dialog was getting the downloader view from the embed too early. This change confines the request for the downloader view to the condition block that actually uses it. --- embed/webkit/webkit-embed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'embed') diff --git a/embed/webkit/webkit-embed.c b/embed/webkit/webkit-embed.c index f98e6037d..7794ea8b0 100644 --- a/embed/webkit/webkit-embed.c +++ b/embed/webkit/webkit-embed.c @@ -537,7 +537,7 @@ confirm_action_response_cb (GtkWidget *dialog, WebKitDownload *download) { WebKitWebView *web_view = g_object_get_data (G_OBJECT(dialog), "webkit-view"); - DownloaderView *dview = EPHY_DOWNLOADER_VIEW (ephy_embed_shell_get_downloader_view (embed_shell)); + DownloaderView *dview; gtk_widget_destroy (dialog); @@ -562,6 +562,7 @@ confirm_action_response_cb (GtkWidget *dialog, if (!define_destination_uri (download, FALSE)) { goto cleanup; } + dview = EPHY_DOWNLOADER_VIEW (ephy_embed_shell_get_downloader_view (embed_shell)); downloader_view_add_download (dview, download); } g_object_unref (download); -- cgit v1.2.3