From 262ded52222620891b2b37fa9ffcdc95b79edefd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Forysiuk?= Date: Sat, 30 Jun 2012 12:11:10 +0200 Subject: [PATCH] Fix "view source" always being disabled on win32 --- midori/midori-view.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/midori/midori-view.c b/midori/midori-view.c index a1c3edc1..d733bdb5 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);