[nautilus] window: fold nautilus_window_allow_up() into its only caller



commit 93923f66225434e42ef6bb8588e7d3fbdb3409a4
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Jan 6 14:27:05 2012 +0100

    window: fold nautilus_window_allow_up() into its only caller

 src/nautilus-window-manage-views.c |   11 ++++++++++-
 src/nautilus-window.c              |   17 -----------------
 src/nautilus-window.h              |    3 ---
 3 files changed, 10 insertions(+), 21 deletions(-)
---
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index 4179161..b2d78ac 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -261,6 +261,8 @@ handle_go_elsewhere (NautilusWindowSlot *slot,
 void
 nautilus_window_update_up_button (NautilusWindow *window)
 {
+	GtkAction *action;
+	GtkActionGroup *action_group;
 	NautilusWindowSlot *slot;
 	gboolean allowed;
 	GFile *parent;
@@ -276,7 +278,14 @@ nautilus_window_update_up_button (NautilusWindow *window)
 		}
 	}
 
-	nautilus_window_allow_up (window, allowed);
+	action_group = nautilus_window_get_main_action_group (window);
+
+	action = gtk_action_group_get_action (action_group,
+					      NAUTILUS_ACTION_UP);
+	gtk_action_set_sensitive (action, allowed);
+	action = gtk_action_group_get_action (action_group,
+					      NAUTILUS_ACTION_UP_ACCEL);
+	gtk_action_set_sensitive (action, allowed);
 }
 
 static void
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 3fcc631..8d54e61 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -239,23 +239,6 @@ nautilus_window_new_tab (NautilusWindow *window)
 	}
 }
 
-void
-nautilus_window_allow_up (NautilusWindow *window, 
-			  gboolean allow)
-{
-	GtkAction *action;
-	GtkActionGroup *action_group;
-
-	action_group = nautilus_window_get_main_action_group (window);
-
-	action = gtk_action_group_get_action (action_group,
-					      NAUTILUS_ACTION_UP);
-	gtk_action_set_sensitive (action, allow);
-	action = gtk_action_group_get_action (action_group,
-					      NAUTILUS_ACTION_UP_ACCEL);
-	gtk_action_set_sensitive (action, allow);
-}
-
 static void
 update_cursor (NautilusWindow *window)
 {
diff --git a/src/nautilus-window.h b/src/nautilus-window.h
index 500232f..3fdff54 100644
--- a/src/nautilus-window.h
+++ b/src/nautilus-window.h
@@ -138,9 +138,6 @@ NautilusWindowSlot * nautilus_window_get_active_slot       (NautilusWindow *wind
 void                 nautilus_window_push_status           (NautilusWindow *window,
                                                             const char *text);
 
-void     nautilus_window_allow_up             (NautilusWindow *window, 
-                                               gboolean        allow);
-
 void     nautilus_window_hide_sidebar         (NautilusWindow *window);
 void     nautilus_window_show_sidebar         (NautilusWindow *window);
 void     nautilus_window_back_or_forward      (NautilusWindow *window,



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