From: Christian Dywan Date: Tue, 29 Jun 2010 05:36:45 +0000 (+0200) Subject: Always toggle source mode except for source code views X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3336938418dee10e3cd83e53e6dc72875253ebce;p=midori Always toggle source mode except for source code views --- diff --git a/midori/midori-view.c b/midori/midori-view.c index a22daf14..58c65520 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -2661,7 +2661,10 @@ webkit_web_view_mime_type_decision_cb (GtkWidget* web_view, if (webkit_web_view_can_show_mime_type (WEBKIT_WEB_VIEW (web_view), mime_type)) { #if WEBKIT_CHECK_VERSION (1, 1, 14) - gboolean view_source = webkit_web_view_get_view_source_mode (WEBKIT_WEB_VIEW (web_view)); + gboolean view_source = FALSE; + /* Dedicated source code views are always pseudo-blank pages */ + if (midori_view_is_blank (view)) + view_source = webkit_web_view_get_view_source_mode (WEBKIT_WEB_VIEW (web_view)); /* Render raw XML, including news feeds, as source */ if (!view_source && (!strcmp (mime_type, "application/xml")