[nautilus] navigation-window: don't use search_bar_is_showing()



commit 36e9be912735ce02929aaace8fb618e31bb91b59
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Feb 9 18:22:48 2011 -0500

    navigation-window: don't use search_bar_is_showing()
    
    NautilusToolbar is smart enough to take care of visibility alone.

 src/nautilus-navigation-window.c |   19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)
---
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index 68ce9db..bc3b626 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -432,27 +432,20 @@ nautilus_navigation_window_show_search (NautilusNavigationWindow *window)
 {
 	NautilusNavigationWindowPane *pane;
 
-	pane = NAUTILUS_NAVIGATION_WINDOW_PANE (NAUTILUS_WINDOW (window)->details->active_pane);
-	if (!nautilus_navigation_window_pane_search_bar_showing (pane)) {
-		remember_focus_widget (window);
+	remember_focus_widget (window);
 
-		nautilus_navigation_window_pane_show_location_bar_temporarily (pane);
-		nautilus_navigation_window_pane_set_bar_mode (pane, NAUTILUS_BAR_SEARCH);
-		pane->temporary_search_bar = TRUE;
-		nautilus_search_bar_clear (NAUTILUS_SEARCH_BAR (pane->search_bar));
-	}
+	pane = NAUTILUS_NAVIGATION_WINDOW_PANE (NAUTILUS_WINDOW (window)->details->active_pane);
 
-	nautilus_search_bar_grab_focus (NAUTILUS_SEARCH_BAR (pane->search_bar));
+	nautilus_navigation_window_pane_ensure_search_bar (pane);
 }
 
 void
 nautilus_navigation_window_hide_search (NautilusNavigationWindow *window)
 {
 	NautilusNavigationWindowPane *pane = NAUTILUS_NAVIGATION_WINDOW_PANE (NAUTILUS_WINDOW (window)->details->active_pane);
-	if (nautilus_navigation_window_pane_search_bar_showing (pane)) {
-		if (nautilus_navigation_window_pane_hide_temporary_bars (pane)) {
-			nautilus_navigation_window_restore_focus_widget (window);
-		}
+
+	if (nautilus_navigation_window_pane_hide_temporary_bars (pane)) {
+		nautilus_navigation_window_restore_focus_widget (window);
 	}
 }
 



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