diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2012-06-22 15:28:31 +0800 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2012-06-25 19:16:54 +0800 |
commit | d87fd5e750f7c5eafd7512ba0e9e15363a00be6f (patch) | |
tree | 0ed25249b2135dbd73dd4158827e3790c7b3b2da /embed | |
parent | 80a2f896948ce6debf1b215127cce14b16786f8f (diff) | |
download | gsoc2013-epiphany-d87fd5e750f7c5eafd7512ba0e9e15363a00be6f.tar gsoc2013-epiphany-d87fd5e750f7c5eafd7512ba0e9e15363a00be6f.tar.gz gsoc2013-epiphany-d87fd5e750f7c5eafd7512ba0e9e15363a00be6f.tar.bz2 gsoc2013-epiphany-d87fd5e750f7c5eafd7512ba0e9e15363a00be6f.tar.lz gsoc2013-epiphany-d87fd5e750f7c5eafd7512ba0e9e15363a00be6f.tar.xz gsoc2013-epiphany-d87fd5e750f7c5eafd7512ba0e9e15363a00be6f.tar.zst gsoc2013-epiphany-d87fd5e750f7c5eafd7512ba0e9e15363a00be6f.zip |
Port hovering over link to WebKit2
https://bugzilla.gnome.org/show_bug.cgi?id=678599
Diffstat (limited to 'embed')
-rw-r--r-- | embed/ephy-embed.c | 5 | ||||
-rw-r--r-- | embed/ephy-web-view.c | 18 |
2 files changed, 16 insertions, 7 deletions
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c index 6cff6c0ee..8c0fa5363 100644 --- a/embed/ephy-embed.c +++ b/embed/ephy-embed.c @@ -848,14 +848,9 @@ ephy_embed_constructed (GObject *object) NULL); #endif -#ifdef HAVE_WEBKIT2 - /* TODO: status message? */ -#else priv->status_handler_id = g_signal_connect (web_view, "notify::status-message", G_CALLBACK (status_message_notify_cb), embed); -#endif - #ifdef HAVE_WEBKIT2 /* Window properties */ window_properties = webkit_web_view_get_window_properties (web_view); diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c index acf97518f..d62c5df61 100644 --- a/embed/ephy-web-view.c +++ b/embed/ephy-web-view.c @@ -1204,7 +1204,19 @@ uri_changed_cb (WebKitWebView *web_view, } #ifdef HAVE_WEBKIT2 -/* TODO: Mouse target changed */ +static void +mouse_target_changed_cb (EphyWebView *web_view, + WebKitHitTestResult *hit_test_result, + guint modifiers, + gpointer data) +{ + const char *message = NULL; + + if (webkit_hit_test_result_context_is_link (hit_test_result)) + message = webkit_hit_test_result_get_link_uri (hit_test_result); + + ephy_web_view_set_link_message (web_view, message); +} #else static void hovering_over_link_cb (EphyWebView *web_view, @@ -2700,7 +2712,9 @@ ephy_web_view_init (EphyWebView *web_view) NULL); #ifdef HAVE_WEBKIT2 - /* TODO: Mouse target changed */ + g_signal_connect (web_view, "mouse-target-changed", + G_CALLBACK (mouse_target_changed_cb), + NULL); #else g_signal_connect (web_view, "hovering-over-link", G_CALLBACK (hovering_over_link_cb), |