diff options
author | Manuel Kaufmann <humitos@gmail.com> | 2012-10-31 01:28:57 (GMT) |
---|---|---|
committer | Manuel QuiƱones <manuq@laptop.org> | 2012-11-01 00:55:47 (GMT) |
commit | ce026b9692c23cecd28af4dceac305ccff6f14f7 (patch) | |
tree | 9697a32b77631c78e080a513be9abe59057e4bdb /browser.py | |
parent | b258beebefdab3a17788b9bc3a5be2beece8ef01 (diff) |
Don't show error page when plugin will handle - SL #3934
Allow a plugin to handle the request without showing
the error page.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
Acked-by: Manuel QuiƱones <manuq@laptop.org>
Diffstat (limited to 'browser.py')
-rw-r--r-- | browser.py | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -653,9 +653,12 @@ class Browser(WebKit.WebView): """Show Sugar's error page""" # Don't show error page if the load was interrupted by policy - # change. For example, if a file was requested for download - if web_error.code == WebKit.PolicyError.\ - FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE: + # change or the request is going to be handled by a + # plugin. For example, if a file was requested for download or + # an .ogg file is going to be played. + if web_error.code in (WebKit.PolicyError.\ + FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE, + WebKit.PluginError.WILL_HANDLE_LOAD): return True data = { |