[nautilus] window: make sure search button state is consistent with query editor



commit 515c00b72641df1b435fe17779f769958b400987
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 c73a529..5f43c72 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -716,7 +716,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]