Pathbar string fixes



Two tiny fixes:
(1) From bug 310413 [1]:
"Pathbar calls homedir 'Desktop' when desktop == home"
(2) From bug 310274 [2]:
"If you open the trash folder, it displays with the right icon, but the
name is (null)"

Proposed patch attached.

[1] http://bugzilla.gnome.org/show_bug.cgi?id=310413
[2] http://bugzilla.gnome.org/show_bug.cgi?id=310274

-- 
Christian Neumair <chris gnome-de org>
Index: src/nautilus-pathbar.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-pathbar.c,v
retrieving revision 1.2
diff -u -p -r1.2 nautilus-pathbar.c
--- src/nautilus-pathbar.c	9 Jul 2005 21:28:27 -0000	1.2
+++ src/nautilus-pathbar.c	14 Jul 2005 21:31:22 -0000
@@ -1123,18 +1123,13 @@ button_data_free (ButtonData *button_dat
 static const char *
 get_dir_name (ButtonData *button_data)
 {
-        if (button_data->type == HOME_BUTTON) {
-		if (!desktop_is_home) {
-                	return _("Home");
-		} else {
-			return _("Desktop");
-		}
-	} else {
-        	if (button_data->type == DESKTOP_BUTTON) {
-                	return _("Desktop");
-		} else {
-	                return button_data->dir_name;
-		}
+	switch (button_data->type) {
+	case HOME_BUTTON:
+		return _("Home");
+	case DESKTOP_BUTTON:
+		return _("Desktop");
+	default:
+		return button_data->dir_name;
 	}
 }
 
@@ -1501,22 +1496,6 @@ get_parent_directory (const char *file_p
 }
 
 
-static char *
-get_display_name_for_folder (const char *file_path)
-{
-	GnomeVFSURI *vfs_uri;
-	char *name;
-
-	vfs_uri = gnome_vfs_uri_new (file_path);
- 	if (vfs_uri == NULL) {
-		return NULL;
-	}
-	name = nautilus_get_uri_shortname_for_display (vfs_uri);
-	gnome_vfs_uri_unref (vfs_uri);	
-	return name;
-}
-
-
 static gboolean
 nautilus_path_bar_update_path (NautilusPathBar *path_bar, const char *file_path)
 {
@@ -1544,7 +1523,7 @@ nautilus_path_bar_update_path (NautilusP
         while (path != NULL) {
 
                 parent_path = get_parent_directory (path);
-                name = get_display_name_for_folder (path);	
+                name = nautilus_compute_title_for_uri (path);
 		last_directory = !parent_path;
                 button_data = make_directory_button (path_bar, name, path, first_directory, last_directory, FALSE);
                 g_free (path);

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



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