[nautilus/gnome-3-6] window: make sure search button state is consistent with query editor



commit 3198d71d297bf2dfcf2201e391f8ea3afa2b5dc7
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Oct 23 15:53:46 2012 -0400

    window: make sure search button state is consistent with query editor
    
    In addition to checking whether the directory is a search, check for the
    query editor visibility. This ensures the toggle button state is
    consistent when switching tabs with the query editor visible in one of
    those.

 src/nautilus-window.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index b09bd5e..2f676b2 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -698,7 +698,8 @@ nautilus_window_sync_search_widgets (NautilusWindow *window)
 		search_directory = NAUTILUS_SEARCH_DIRECTORY (directory);
 	}
 
-	if (search_directory != NULL || slot->load_with_search) {
+	if (search_directory != NULL || slot->load_with_search ||
+	    gtk_widget_get_visible (GTK_WIDGET (slot->query_editor))) {
 		slot->load_with_search = FALSE;
 		toggle_toolbar_search_button (window, TRUE);
 	} else {



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