[nautilus/gnome-2-32: 133/283] Don't use 'File Browser' in the window title for browser mode (#614848).



commit 1e236b80907566f5d5db0f693631c31ce915fb89
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Jun 8 11:50:15 2010 +0200

    Don't use 'File Browser' in the window title for browser mode (#614848).
    
    We still use it if spatial mode is the default though.
    Thanks to Marcus Carlson for the initial patch.

 src/nautilus-navigation-window.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-navigation-window.c b/src/nautilus-navigation-window.c
index 269d88b..35ad221 100644
--- a/src/nautilus-navigation-window.c
+++ b/src/nautilus-navigation-window.c
@@ -727,12 +727,19 @@ real_sync_title (NautilusWindow *window,
 			 sync_title, (window, slot));
 
 	if (slot == window->details->active_pane->active_slot) {
-		full_title = g_strdup_printf (_("%s - File Browser"), slot->title);
+		/* if spatial mode is default, we keep "File Browser" in the window title
+		 * to recognize browser windows. Otherwise, we default to the directory name.
+		 */
+		if (!eel_preferences_get_boolean (NAUTILUS_PREFERENCES_ALWAYS_USE_BROWSER)) {
+			full_title = g_strdup_printf (_("%s - File Browser"), slot->title);
+			window_title = eel_str_middle_truncate (full_title, MAX_TITLE_LENGTH);
+			g_free (full_title);
+		} else {
+			window_title = eel_str_middle_truncate (slot->title, MAX_TITLE_LENGTH);
+		}
 
-		window_title = eel_str_middle_truncate (full_title, MAX_TITLE_LENGTH);
 		gtk_window_set_title (GTK_WINDOW (window), window_title);
 		g_free (window_title);
-		g_free (full_title);
 	}
 
 	pane = NAUTILUS_NAVIGATION_WINDOW_PANE (slot->pane);



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