[devhelp] window: ignore cancellation errors in webkit
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] window: ignore cancellation errors in webkit
- Date: Tue, 5 Feb 2013 19:18:39 +0000 (UTC)
commit c934ca46cac06c4fc693a0c97fd373dfc282f327
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue Feb 5 20:17:04 2013 +0100
window: ignore cancellation errors in webkit
Fix seems to work ok with both WebKit1 and WebKit2
https://bugzilla.gnome.org/show_bug.cgi?id=640567
src/dh-window.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/dh-window.c b/src/dh-window.c
index 8ab869a..b4281b9 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -917,7 +917,7 @@ static gboolean
window_web_view_load_error_cb (WebKitWebView *web_view,
WebKitWebFrame *frame,
gchar *uri,
- gpointer *web_error,
+ GError *web_error,
DhWindow *window)
#endif
{
@@ -927,6 +927,10 @@ window_web_view_load_error_cb (WebKitWebView *web_view,
GList *children;
gchar *markup;
+ /* Ignore cancellation errors; which happen when typing fast in the search entry */
+ if (g_error_matches (web_error, WEBKIT_NETWORK_ERROR, WEBKIT_NETWORK_ERROR_CANCELLED))
+ return TRUE;
+
info_bar = window_get_active_info_bar (window);
markup = g_strdup_printf ("<b>%s</b>",
_("Error opening the requested link."));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]