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



commit ecfa49609baa95c18a06c5e0720f4ed08b0f0e19
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.
    
    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 4c61825..5b8b9d2 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]