diff options
author | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-01 13:51:23 +0800 |
---|---|---|
committer | Danielle Madeley <danielle.madeley@collabora.co.uk> | 2011-08-01 13:51:23 +0800 |
commit | 0f84b8fa5a7f061cb5f82ed489e22f15ae2bc7cc (patch) | |
tree | 44788910e1cb61ff798dae08741ea2eee9b26ce0 /libempathy-gtk/empathy-log-window.c | |
parent | 7565c39bfa0f118fb513c0af86a5ba0ef7976277 (diff) | |
download | gsoc2013-empathy-0f84b8fa5a7f061cb5f82ed489e22f15ae2bc7cc.tar gsoc2013-empathy-0f84b8fa5a7f061cb5f82ed489e22f15ae2bc7cc.tar.gz gsoc2013-empathy-0f84b8fa5a7f061cb5f82ed489e22f15ae2bc7cc.tar.bz2 gsoc2013-empathy-0f84b8fa5a7f061cb5f82ed489e22f15ae2bc7cc.tar.lz gsoc2013-empathy-0f84b8fa5a7f061cb5f82ed489e22f15ae2bc7cc.tar.xz gsoc2013-empathy-0f84b8fa5a7f061cb5f82ed489e22f15ae2bc7cc.tar.zst gsoc2013-empathy-0f84b8fa5a7f061cb5f82ed489e22f15ae2bc7cc.zip |
Handle links via external browser
Diffstat (limited to 'libempathy-gtk/empathy-log-window.c')
-rw-r--r-- | libempathy-gtk/empathy-log-window.c | 19 |
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); |