[Xfce4-commits] <midori:master> Use an unknown content type if GIO fails to determine the type

Christian Dywan noreply at xfce.org
Fri Nov 20 01:42:02 CET 2009


Updating branch refs/heads/master
         to 3e5937fe334b8597e1271b388f7a559fe2a4c799 (commit)
       from 2d514bfb6cb3fba7850cb22f6c0278c147505b48 (commit)

commit 3e5937fe334b8597e1271b388f7a559fe2a4c799
Author: Christian Dywan <christian at twotoasts.de>
Date:   Fri Nov 20 01:34:16 2009 +0100

    Use an unknown content type if GIO fails to determine the type

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

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 1fd8416..9a9f705 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -2163,6 +2163,12 @@ webkit_web_view_mime_type_decision_cb (GtkWidget*               web_view,
     #else
     content_type = g_strdup (mime_type);
     #endif
+    if (!content_type)
+    #ifdef G_OS_WIN32
+        content_type = g_content_type_get_mime_type ("*");
+    #else
+        content_type = g_strdup ("application/octet-stream");
+    #endif
     description = g_content_type_get_description (content_type);
     #if GTK_CHECK_VERSION (2, 14, 0)
     icon = g_content_type_get_icon (content_type);



More information about the Xfce4-commits mailing list