[devhelp/navigation-fix: 1/2] window: update tree and back/forward buttons when loading pages
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp/navigation-fix: 1/2] window: update tree and back/forward buttons when loading pages
- Date: Fri, 1 Feb 2013 16:00:28 +0000 (UTC)
commit 1670871b432c3da7201b3eb748ea857158797027
Author: Aleksander Morgado <aleksander lanedo com>
Date: Fri Feb 1 16:48:02 2013 +0100
window: update tree and back/forward buttons when loading pages
We really seem to need this when using the Back/Forward buttons.
src/dh-window.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/src/dh-window.c b/src/dh-window.c
index 2f28cf7..c69cd24 100644
--- a/src/dh-window.c
+++ b/src/dh-window.c
@@ -864,6 +864,26 @@ window_web_view_navigation_policy_decision_requested (WebKitWebView
}
#ifdef HAVE_WEBKIT2
+static void
+window_web_view_load_changed_cb (WebKitWebView *web_view,
+ WebKitLoadEvent load_event,
+ DhWindow *window)
+{
+ const gchar *uri;
+ DhWindowPriv *priv;
+
+ priv = window->priv;
+
+ if (load_event != WEBKIT_LOAD_COMMITTED)
+ return;
+
+ uri = webkit_web_view_get_uri (web_view);
+ dh_sidebar_select_uri (DH_SIDEBAR (priv->sidebar), uri);
+ window_check_history (window, web_view);
+}
+#endif
+
+#ifdef HAVE_WEBKIT2
static gboolean
window_web_view_load_failed_cb (WebKitWebView *web_view,
WebKitLoadEvent load_event,
@@ -1256,6 +1276,9 @@ window_open_new_tab (DhWindow *window,
window);
#endif
#ifdef HAVE_WEBKIT2
+ g_signal_connect (view, "load-changed",
+ G_CALLBACK (window_web_view_load_changed_cb),
+ window);
g_signal_connect (view, "load-failed",
G_CALLBACK (window_web_view_load_failed_cb),
window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]