[nautilus/wip/csoriano/improve_list_view: 10/10] nautilus-list-view: use containing folder name as location



commit bef076dd157b27079d8122e836a1d3fd35ae8dee
Author: Carlos Soriano <csoriano gnome org>
Date:   Fri Feb 13 16:17:58 2015 +0100

    nautilus-list-view: use containing folder name as location
    
    Design request. Having a full location is too much in most of the cases.
    So show only the direct containing folder.

 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 0c49596..f8974f5 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 a09f2f9..a881537 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]