Patch for #317962 - pathbar should not show [home][Home]
- From: Federico Mena Quintero <federico ximian com>
- To: nautilus-list gnome org
- Subject: Patch for #317962 - pathbar should not show [home][Home]
- Date: Wed, 30 Nov 2005 12:12:51 -0600
Hi,
A while ago I committed a patch to GTK+ so that the file chooser won't
show [/][home][Home] in the path bar. I had a similar patch for
Nautilus, so that its path bar and places item will show just the name
of the user's home directory.
The patch is in bug #317962. Is it OK to commit? I think it would be
good to show the same names everywhere.
Federico
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/src/nautilus-pathbar.c~ 2005-09-30 13:24:51.000000000 -0500
+++ nautilus/src/nautilus-pathbar.c 2005-10-04 15:24:50.000000000 -0500
@@ -1139,18 +1139,10 @@ 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");
- }
+ 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/src/nautilus-places-sidebar.c~ 2005-07-13 04:21:03.000000000 -0500
+++ nautilus/src/nautilus-places-sidebar.c 2005-10-04 15:35:26.000000000 -0500
@@ -147,9 +147,13 @@ update_places (NautilusPlacesSidebar *si
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);
}
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]