aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-log-window.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index ef6450f36..f81ea4cfe 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -482,6 +482,21 @@ store_events_rows_reordered (GtkTreeModel *model,
g_strfreev (new_order_strv);
}
+static gboolean
+events_webview_handle_navigation (WebKitWebView *webview,
+ WebKitWebFrame *frame,
+ WebKitNetworkRequest *request,
+ WebKitWebNavigationAction *navigation_action,
+ WebKitWebPolicyDecision *policy_decision,
+ EmpathyLogWindow *window)
+{
+ empathy_url_show (GTK_WIDGET (webview),
+ webkit_network_request_get_uri (request));
+
+ webkit_web_policy_decision_ignore (policy_decision);
+ return TRUE;
+}
+
static GObject *
empathy_log_window_constructor (GType type,
guint n_props,
@@ -703,6 +718,10 @@ empathy_log_window_init (EmpathyLogWindow *self)
g_file_get_uri (gfile));
g_object_unref (gfile);
+ /* handle all navigation externally */
+ g_signal_connect (self->priv->webview, "navigation-policy-decision-requested",
+ G_CALLBACK (events_webview_handle_navigation), self);
+
gtk_notebook_append_page (GTK_NOTEBOOK (self->priv->notebook),
sw, gtk_label_new ("webview"));
gtk_widget_show_all (sw);