[nautilus] window-pane: make sure we set another pane as active when closing



commit e18dddb0f6ff0a91e25929b667687b87c8d20ee5
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Feb 16 11:21:15 2011 -0500

    window-pane: make sure we set another pane as active when closing

 src/nautilus-window-pane.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-window-pane.c b/src/nautilus-window-pane.c
index ab7d3cc..d372335 100644
--- a/src/nautilus-window-pane.c
+++ b/src/nautilus-window-pane.c
@@ -158,17 +158,21 @@ nautilus_window_pane_sync_search_widgets (NautilusWindowPane *pane)
 }
 
 void
-nautilus_window_pane_slot_close (NautilusWindowPane *pane, NautilusWindowSlot *slot)
+nautilus_window_pane_slot_close (NautilusWindowPane *pane,
+				 NautilusWindowSlot *slot)
 {
 	NautilusWindowSlot *next_slot;
 
 	if (pane->window) {
 		NautilusWindow *window;
+
 		window = pane->window;
+
 		if (pane->active_slot == slot) {
 			next_slot = get_first_inactive_slot (NAUTILUS_WINDOW_PANE (pane));
 			nautilus_window_set_active_slot (window, next_slot);
 		}
+
 		nautilus_window_close_slot (slot);
 
 		/* If that was the last slot in the active pane, close the pane or even the whole window. */
@@ -181,6 +185,8 @@ nautilus_window_pane_slot_close (NautilusWindowPane *pane, NautilusWindowSlot *s
 			 * no next pane, close the window. */
 			if(next_pane) {
 				nautilus_window_close_pane (pane);
+				nautilus_window_set_active_pane (window, next_pane);
+
 				if (NAUTILUS_IS_NAVIGATION_WINDOW (window)) {
 					nautilus_navigation_window_update_show_hide_menu_items (NAUTILUS_NAVIGATION_WINDOW (window));
 				}



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