From: Paweł Forysiuk Date: Sat, 30 Jun 2012 10:11:10 +0000 (+0200) Subject: Fix "view source" always being disabled on win32 X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=262ded52222620891b2b37fa9ffcdc95b79edefd;p=midori Fix "view source" always being disabled on win32 --- 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);