diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2012-05-09 02:34:06 +0800 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2012-06-20 03:15:47 +0800 |
commit | 51e62b6cd9c8f4f0101660a8ff9b4e43aaae3411 (patch) | |
tree | b32bbde14ea0046c8aa74b7dfca0d268ba8159a6 | |
parent | 0485d051951c4d26e335d6415bf2b9eaebd9a797 (diff) | |
download | gsoc2013-epiphany-51e62b6cd9c8f4f0101660a8ff9b4e43aaae3411.tar gsoc2013-epiphany-51e62b6cd9c8f4f0101660a8ff9b4e43aaae3411.tar.gz gsoc2013-epiphany-51e62b6cd9c8f4f0101660a8ff9b4e43aaae3411.tar.bz2 gsoc2013-epiphany-51e62b6cd9c8f4f0101660a8ff9b4e43aaae3411.tar.lz gsoc2013-epiphany-51e62b6cd9c8f4f0101660a8ff9b4e43aaae3411.tar.xz gsoc2013-epiphany-51e62b6cd9c8f4f0101660a8ff9b4e43aaae3411.tar.zst gsoc2013-epiphany-51e62b6cd9c8f4f0101660a8ff9b4e43aaae3411.zip |
ephy-window: add _ephy_window_set_navigation_flags()
We'll share this code later.
https://bugzilla.gnome.org/show_bug.cgi?id=678405
-rw-r--r-- | src/ephy-window.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 337df3dcb..683dee512 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1548,22 +1548,26 @@ sync_tab_icon (EphyWebView *view, } static void +_ephy_window_set_navigation_flags (EphyWindow *window, + EphyWebViewNavigationFlags flags) +{ + GtkAction *action; + + action = gtk_action_group_get_action (window->priv->toolbar_action_group, "NavigationBack"); + gtk_action_set_sensitive (action, flags & EPHY_WEB_VIEW_NAV_BACK); + action = gtk_action_group_get_action (window->priv->toolbar_action_group, "NavigationForward"); + gtk_action_set_sensitive (action, flags & EPHY_WEB_VIEW_NAV_FORWARD); +} + +static void sync_tab_navigation (EphyWebView *view, GParamSpec *pspec, EphyWindow *window) { - EphyWebViewNavigationFlags flags; - GtkAction *action; - EphyWindowPrivate *priv = window->priv; - if (window->priv->closing) return; - flags = ephy_web_view_get_navigation_flags (view); - - action = gtk_action_group_get_action (priv->toolbar_action_group, "NavigationBack"); - gtk_action_set_sensitive (action, flags & EPHY_WEB_VIEW_NAV_BACK); - action = gtk_action_group_get_action (priv->toolbar_action_group, "NavigationForward"); - gtk_action_set_sensitive (action, flags & EPHY_WEB_VIEW_NAV_FORWARD); + _ephy_window_set_navigation_flags (window, + ephy_web_view_get_navigation_flags (view)); } static void |