File nautilus-consistent-home-folder-name.diff of Package nautilus
2005-10-04 Federico Mena Quintero <federico@ximian.com>
* src/nautilus-pathbar.c (get_dir_name): Don't special-case the
name for $HOME; just let it be the actual display name of the
folder on disk.
* src/nautilus-places-sidebar.c (update_places): Likewise, to make
this consistent.
================================================================================
--- nautilus-2.12.1/src/nautilus-pathbar.c
+++ nautilus-2.12.1/src/nautilus-pathbar.c
@@ -1139,18 +1139,10 @@
static const char *
get_dir_name (ButtonData *button_data)
{
- if (button_data->type == HOME_BUTTON) {
- if (!desktop_is_home) {
- return _("Home");
- } else {
- return _("Desktop");
- }
+ if (button_data->type == DESKTOP_BUTTON || (button_data->type == HOME_BUTTON && desktop_is_home)) {
+ return _("Desktop");
} else {
- if (button_data->type == DESKTOP_BUTTON) {
- return _("Desktop");
- } else {
- return button_data->dir_name;
- }
+ return button_data->dir_name;
}
}
--- nautilus-2.12.1/src/nautilus-places-sidebar.c
+++ nautilus-2.12.1/src/nautilus-places-sidebar.c
@@ -147,9 +147,13 @@
desktop_path = nautilus_get_desktop_directory ();
if (strcmp (g_get_home_dir(), desktop_path) != 0) {
+ char *display_name;
+
mount_uri = gnome_vfs_get_uri_from_local_path (g_get_home_dir ());
+ display_name = g_filename_display_basename (g_get_home_dir ());
last_iter = add_place (sidebar->store, PLACES_BUILT_IN,
- _("Home"), "gnome-fs-home", mount_uri);
+ display_name, "gnome-fs-home", mount_uri);
+ g_free (display_name);
if (strcmp (location, mount_uri) == 0) {
gtk_tree_selection_select_iter (selection, &last_iter);
}