[epiphany/overview: 15/24] ephy-window: add _ephy_window_set_navigation_flags()



commit 1df12c61a8cfcb70e8400562a0876bea670549f7
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Tue May 8 21:34:06 2012 +0300

    ephy-window: add _ephy_window_set_navigation_flags()
    
    We'll share this code later.

 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 f989ef2..5a7b79a 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1514,22 +1514,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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]