From 09f44a93f017dd0d703d967a4fec043fa4d9986e Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Mon, 17 Dec 2007 23:40:13 +0000 Subject: Track WebKit upstream API changes r28817, r28818 This makes current location and page title updates work more consistently. svn path=/trunk/; revision=7782 --- embed/webkit/webkit-embed.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'embed') 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 @@ -132,6 +130,16 @@ update_load_state (WebKitEmbed *embed, WebKitWebView *web_view) (EphyEmbedNetState)estate); } +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, @@ -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 -- cgit