[Xfce4-commits] <midori:master> Check download-mime-type which may not be set
Christian Dywan
noreply at xfce.org
Sun May 20 22:04:01 CEST 2012
Updating branch refs/heads/master
to 9ee6612f625a5f4e8375abb122327f93bc148258 (commit)
from be0dc79448655c41fb23a08bc285a06264d5ee5c (commit)
commit 9ee6612f625a5f4e8375abb122327f93bc148258
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun May 20 21:59:35 2012 +0200
Check download-mime-type which may not be set
Not all downloads go through MIME type policy.
midori/midori-view.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/midori/midori-view.c b/midori/midori-view.c
index eec4588..757707c 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -2941,8 +2941,11 @@ webkit_web_view_download_requested_cb (GtkWidget* web_view,
dialog = gtk_message_dialog_new (
NULL, 0, GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE,
_("Open or download file"));
- mime_type = g_object_get_data(G_OBJECT (view), "download-mime-type");
- content_type = g_content_type_from_mime_type (mime_type);
+ mime_type = g_object_get_data (G_OBJECT (view), "download-mime-type");
+ if (mime_type != NULL)
+ content_type = g_content_type_from_mime_type (mime_type);
+ else
+ content_type = NULL;
if (!content_type)
content_type = g_content_type_guess (
webkit_download_get_suggested_filename (download), NULL, 0, NULL);
More information about the Xfce4-commits
mailing list