[Xfce4-commits] <midori:master> Fix "view source" always being disabled on win32

Christian Dywan noreply at xfce.org
Sun Jul 1 21:28:01 CEST 2012


Updating branch refs/heads/master
         to 262ded52222620891b2b37fa9ffcdc95b79edefd (commit)
       from 103664a8f0b1c8a4c2bc72d3313ea1c8f779b2d7 (commit)

commit 262ded52222620891b2b37fa9ffcdc95b79edefd
Author: Paweł Forysiuk <tuxator at o2.pl>
Date:   Sat Jun 30 12:11:10 2012 +0200

    Fix "view source" always being disabled on win32

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

diff --git a/midori/midori-view.c b/midori/midori-view.c
index a1c3edc..d733bdb 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -5247,7 +5247,12 @@ midori_view_can_view_source (MidoriView* view)
         return FALSE;
 
     content_type = g_content_type_from_mime_type (view->mime_type);
+#ifdef _WIN32
+    /* On Win32 text/plain maps to ".txt" but is_a expects "text" */
+    text_type = g_strdup ("text");
+#else
     text_type = g_content_type_from_mime_type ("text/plain");
+#endif
     is_text = g_content_type_is_a (content_type, text_type);
     g_free (content_type);
     g_free (text_type);


More information about the Xfce4-commits mailing list