[nautilus] nautilus-list-view: use parent folder name as location
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] nautilus-list-view: use parent folder name as location
- Date: Tue, 17 Feb 2015 10:31:25 +0000 (UTC)
commit afd4a859fac9d951758360cae6211c1d4da1cf04
Author: Carlos Soriano <csoriano gnome org>
Date: Fri Feb 13 16:17:58 2015 +0100
nautilus-list-view: use parent folder name as location
Design request. Having a full location is too much in most of the cases
and makes all the columns too much wide.
So show only the parent folder name.
https://bugzilla.gnome.org/show_bug.cgi?id=744237
libnautilus-private/nautilus-file.c | 2 +-
src/nautilus-list-view.c | 8 +-------
2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/libnautilus-private/nautilus-file.c b/libnautilus-private/nautilus-file.c
index 5163c7e..74b0e6b 100644
--- a/libnautilus-private/nautilus-file.c
+++ b/libnautilus-private/nautilus-file.c
@@ -4645,7 +4645,7 @@ nautilus_file_get_trash_original_file_parent_as_string (NautilusFile *file)
parent = nautilus_file_get_parent (orig_file);
location = nautilus_file_get_location (parent);
- filename = g_file_get_parse_name (location);
+ filename = g_file_get_basename (location);
g_object_unref (location);
nautilus_file_unref (parent);
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 0f2a7ad..15f46ae 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -1828,13 +1828,7 @@ location_cell_data_func (GtkTreeViewColumn *column,
*/
where = g_strdup ("");
} else if (g_file_has_prefix (dir_location, base_location)) {
- gchar *relative_path;
-
- relative_path = g_file_get_relative_path (base_location,
- dir_location);
- where = g_filename_display_name (relative_path);
-
- g_free (relative_path);
+ where = g_file_get_basename (dir_location);
}
if (where != NULL) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]