From c7ee74610e7f78ef2e5e1ccad05a3f8839a2deab Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sat, 13 Mar 2010 15:07:02 +0100 Subject: [PATCH] Normally reload error pages with WebKitGTK+ 1.1.14 For older versions we used a workaround for reloading special pages like error pages. This is not needed with recent versions of WebKitGTK+. --- midori/midori-view.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/midori/midori-view.c b/midori/midori-view.c index b6883bcb..28f770f7 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -4398,7 +4398,9 @@ midori_view_reload (MidoriView* view, g_return_if_fail (MIDORI_IS_VIEW (view)); -#if WEBKIT_CHECK_VERSION (1, 1, 6) +#if WEBKIT_CHECK_VERSION (1, 1, 14) + title = NULL; +#elif WEBKIT_CHECK_VERSION (1, 1, 6) /* WebKit 1.1.6 doesn't handle "alternate content" flawlessly, so reloading via Javascript works but not via API calls. */ title = g_strdup_printf (_("Error - %s"), view->uri); @@ -4407,7 +4409,7 @@ midori_view_reload (MidoriView* view, again, not the error page which isn't even a proper page */ title = g_strdup_printf (_("Error - %s"), view->uri); #endif - if (view->title && strstr (title, view->title)) + if (view->title && title && strstr (title, view->title)) webkit_web_view_open (WEBKIT_WEB_VIEW (view->web_view), view->uri); else if (!(view->uri && *view->uri && strncmp (view->uri, "about:", 6))) { -- 2.39.5