[Xfce4-commits] <midori:master> Don't consider 'Plugin will handle load' an error

Christian Dywan noreply at xfce.org
Thu Apr 7 21:00:01 CEST 2011


Updating branch refs/heads/master
         to 3d4f288ba0b3049d4617d8f4329b12cc9e4f5e44 (commit)
       from ee7dd822a075fd4900c2a71bb38098bdc56ab7a2 (commit)

commit 3d4f288ba0b3049d4617d8f4329b12cc9e4f5e44
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Apr 7 20:59:08 2011 +0200

    Don't consider 'Plugin will handle load' an error

 midori/midori-view.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/midori/midori-view.c b/midori/midori-view.c
index 49eb95c..11373c5 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -1450,9 +1450,20 @@ webkit_web_view_load_error_cb (WebKitWebView*  web_view,
                                GError*         error,
                                MidoriView*     view)
 {
-    gchar* title = g_strdup_printf (_("Error - %s"), uri);
-    gchar* message = g_strdup_printf (_("The page '%s' couldn't be loaded."), uri);
-    gboolean result = midori_view_display_error (view, uri, title,
+    gchar* title;
+    gchar* message;
+    gboolean result;
+
+    switch (error->code)
+    {
+    case WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD:
+        /* A plugin will take over. That's expected, it's not fatal. */
+        return FALSE;
+    }
+
+    title = g_strdup_printf (_("Error - %s"), uri);
+    message = g_strdup_printf (_("The page '%s' couldn't be loaded."), uri);
+    result = midori_view_display_error (view, uri, title,
         message, error->message, _("Try again"), web_frame);
     g_free (message);
     g_free (title);



More information about the Xfce4-commits mailing list