diff options
author | Razvan Chitu <razvan.ch95@gmail.com> | 2016-04-04 11:46:19 +0300 |
---|---|---|
committer | Carlos Soriano <csoriano@gnome.org> | 2016-04-28 11:27:46 +0200 |
commit | 5c6f284514569617e01d0dae4aef41eb0395e15f (patch) | |
tree | e8aeed8525c02c4a41c5d6aaa2f858c6a8ef404a | |
parent | 580854879d195183f832aec52155e27d659acb6a (diff) | |
download | nautilus-5c6f284514569617e01d0dae4aef41eb0395e15f.tar.gz |
file-utilities: compute mount location title based on mount name
The label of a mounted location is displayed differently in the pathbar and in
an open tab, due to different means of obtaining the location title. In order to
fix this, use the mount name when computing the mount title for an open tab.
https://bugzilla.gnome.org/show_bug.cgi?id=764573
-rw-r--r-- | libnautilus-private/nautilus-file-utilities.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libnautilus-private/nautilus-file-utilities.c b/libnautilus-private/nautilus-file-utilities.c index e8def7f32..529233c29 100644 --- a/libnautilus-private/nautilus-file-utilities.c +++ b/libnautilus-private/nautilus-file-utilities.c @@ -257,6 +257,7 @@ char * nautilus_compute_title_for_location (GFile *location) { NautilusFile *file; + GMount *mount; char *title; /* TODO-gio: This doesn't really work all that great if the @@ -265,6 +266,14 @@ nautilus_compute_title_for_location (GFile *location) if (nautilus_is_home_directory (location)) { return g_strdup (_("Home")); } + + if ((mount = nautilus_get_mounted_mount_for_root (location)) != NULL) { + title = g_mount_get_name(mount); + + g_object_unref(mount); + + return title; + } title = NULL; if (location) { |