diff options
author | Alp Toker <atoker@src.gnome.org> | 2007-12-18 07:40:13 +0800 |
---|---|---|
committer | Alp Toker <atoker@src.gnome.org> | 2007-12-18 07:40:13 +0800 |
commit | 09f44a93f017dd0d703d967a4fec043fa4d9986e (patch) | |
tree | 0ea7162cf7b9f714ca4954317ef8b38cd8b11808 /embed | |
parent | 9b1d0da2bce4dbf9996f82c6647d079e9b4c15a0 (diff) | |
download | gsoc2013-epiphany-09f44a93f017dd0d703d967a4fec043fa4d9986e.tar.gz gsoc2013-epiphany-09f44a93f017dd0d703d967a4fec043fa4d9986e.tar.zst gsoc2013-epiphany-09f44a93f017dd0d703d967a4fec043fa4d9986e.zip |
Track WebKit upstream API changes r28817, r28818
This makes current location and page title updates work more consistently.
svn path=/trunk/; revision=7782
Diffstat (limited to 'embed')
-rw-r--r-- | embed/webkit/webkit-embed.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/embed/webkit/webkit-embed.c b/embed/webkit/webkit-embed.c index 65539387c..25c985abd 100644 --- a/embed/webkit/webkit-embed.c +++ b/embed/webkit/webkit-embed.c @@ -92,15 +92,13 @@ impl_close (EphyEmbed *embed) } static void -webkit_embed_title_changed_cb (WebKitWebFrame *web_frame, - gchar *title, - gchar *location, +webkit_embed_title_changed_cb (WebKitWebView *web_view, + WebKitWebFrame *web_frame, + const gchar *title, EphyEmbed *embed) { ephy_base_embed_set_title (EPHY_BASE_EMBED (embed), title); - ephy_base_embed_location_changed (EPHY_BASE_EMBED (embed), - location); } static void @@ -133,6 +131,16 @@ update_load_state (WebKitEmbed *embed, WebKitWebView *web_view) } static void +webkit_embed_load_committed_cb (WebKitWebView *web_view, + WebKitWebFrame *web_frame, + EphyEmbed *embed) +{ + const gchar* uri = webkit_web_frame_get_uri(web_frame); + ephy_base_embed_location_changed (EPHY_BASE_EMBED (embed), + uri); +} + +static void webkit_embed_load_started_cb (WebKitWebView *web_view, WebKitWebFrame *web_frame, EphyEmbed *embed) @@ -210,6 +218,8 @@ webkit_embed_init (WebKitEmbed *embed) gtk_container_add (GTK_CONTAINER (embed), sw); + g_signal_connect (G_OBJECT (web_view), "load-committed", + G_CALLBACK (webkit_embed_load_committed_cb), embed); g_signal_connect (G_OBJECT (web_view), "load-started", G_CALLBACK (webkit_embed_load_started_cb), embed); g_signal_connect (G_OBJECT (web_view), "load_finished", @@ -336,7 +346,7 @@ impl_get_location (EphyEmbed *embed, gboolean toplevel) { WebKitWebFrame *web_frame = webkit_web_view_get_main_frame (WEBKIT_EMBED (embed)->priv->web_view); - return g_strdup (webkit_web_frame_get_location (web_frame)); + return g_strdup (webkit_web_frame_get_uri (web_frame)); } static void |