[epiphany] ephy-window: show an error if we fail to open a non-web URI with gtk_show_uri
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-window: show an error if we fail to open a non-web URI with gtk_show_uri
- Date: Thu, 23 Feb 2012 11:07:31 +0000 (UTC)
commit 6ecb6fda974f5fd47b52f1264b2735a60a67ba24
Author: Xan Lopez <xan igalia com>
Date: Thu Feb 23 12:07:05 2012 +0100
ephy-window: show an error if we fail to open a non-web URI with gtk_show_uri
Better than silently doing nothing.
src/ephy-window.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 9923425..bde8ce2 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -2105,8 +2105,6 @@ policy_decision_required_cb (WebKitWebView *web_view,
GError *error = NULL;
GdkScreen *screen;
- webkit_web_policy_decision_ignore (decision);
-
screen = gtk_widget_get_screen (GTK_WIDGET (web_view));
gtk_show_uri (screen, uri, GDK_CURRENT_TIME, &error);
@@ -2114,8 +2112,12 @@ policy_decision_required_cb (WebKitWebView *web_view,
{
LOG ("failed to handle non web scheme: %s", error->message);
g_error_free (error);
+
+ return FALSE;
}
+ webkit_web_policy_decision_ignore (decision);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]