[Xfce4-commits] <midori:master> Get MIME type for description from content type

Christian Dywan noreply at xfce.org
Sun May 20 22:04:02 CEST 2012


Updating branch refs/heads/master
         to 650efa2aea289c436819a57c3c10a04eaff1c0b6 (commit)
       from 9ee6612f625a5f4e8375abb122327f93bc148258 (commit)

commit 650efa2aea289c436819a57c3c10a04eaff1c0b6
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun May 20 22:02:22 2012 +0200

    Get MIME type for description from content type
    
    GIO needs content type. Users expect MIME.

 midori/midori-view.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 757707c..4db44ba 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -2951,6 +2951,7 @@ webkit_web_view_download_requested_cb (GtkWidget*      web_view,
             webkit_download_get_suggested_filename (download), NULL, 0, NULL);
     if (!content_type)
         content_type = g_content_type_from_mime_type ("application/octet-stream");
+    mime_type = g_content_type_get_mime_type (content_type);
     description = g_content_type_get_description (content_type);
     #if GTK_CHECK_VERSION (2, 14, 0)
     icon = g_content_type_get_icon (content_type);
@@ -2974,6 +2975,7 @@ webkit_web_view_download_requested_cb (GtkWidget*      web_view,
         g_string_append_printf (details, _("File Type: %s ('%s')"), description, mime_type);
     g_string_append_c (details, '\n');
     g_free (description);
+    g_free (mime_type);
 
     /* Link Fingerprint */
     /* We look at the original URI because redirection would lose the fragment */


More information about the Xfce4-commits mailing list