Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/browser.py
diff options
context:
space:
mode:
authorManuel 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)
commitce026b9692c23cecd28af4dceac305ccff6f14f7 (patch)
tree9697a32b77631c78e080a513be9abe59057e4bdb /browser.py
parentb258beebefdab3a17788b9bc3a5be2beece8ef01 (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.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/browser.py b/browser.py
index efcd5c7..39a304d 100644
--- a/browser.py
+++ b/browser.py
@@ -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 = {