]> spindle.queued.net Git - midori/commitdiff
Fix "view source" always being disabled on win32
authorPaweł Forysiuk <tuxator@o2.pl>
Sat, 30 Jun 2012 10:11:10 +0000 (12:11 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 1 Jul 2012 19:26:06 +0000 (21:26 +0200)
midori/midori-view.c

index a1c3edc1f17a049871e76c009c7faefdd66bb707..d733bdb5e00c11a5585040b38ad5503efcadfe4c 100644 (file)
@@ -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);