[nautilus/wip/oholy/pathbar-default-locaton: 252/253] file-utilities: Do not use default location instead of root
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [nautilus/wip/oholy/pathbar-default-locaton: 252/253] file-utilities: Do not use default location instead of root
- Date: Fri,  7 Aug 2020 13:18:54 +0000 (UTC)
commit 07a2b839f46f40e94c5cea11eaa28bd9cad9f965
Author: Ondrej Holy <oholy redhat com>
Date:   Thu Dec 19 17:01:17 2019 +0100
    file-utilities: Do not use default location instead of root
    
    The default location (i.e. g_mount_get_default_location) should be
    used when opening mounted, but we should not use it instead of the root
    button in the path bar. Because it is currently impossible to navigate
    to parent folders if default location is set. Let's change
    nautilus_get_mounted_mount_for_root logic and return mount only for
    root path so we can see the real root in the path bar.
    
    https://gitlab.gnome.org/GNOME/nautilus/issues/1319
 src/nautilus-file-utilities.c | 10 ----------
 1 file changed, 10 deletions(-)
---
diff --git a/src/nautilus-file-utilities.c b/src/nautilus-file-utilities.c
index e6a4b2e58..e89476368 100644
--- a/src/nautilus-file-utilities.c
+++ b/src/nautilus-file-utilities.c
@@ -533,7 +533,6 @@ nautilus_get_mounted_mount_for_root (GFile *location)
     GMount *mount;
     GMount *result = NULL;
     GFile *root = NULL;
-    GFile *default_location = NULL;
 
     volume_monitor = g_volume_monitor_get ();
     mounts = g_volume_monitor_get_mounts (volume_monitor);
@@ -553,18 +552,9 @@ nautilus_get_mounted_mount_for_root (GFile *location)
             result = g_object_ref (mount);
             break;
         }
-
-        default_location = g_mount_get_default_location (mount);
-        if (!g_file_equal (default_location, root) &&
-            g_file_equal (location, default_location))
-        {
-            result = g_object_ref (mount);
-            break;
-        }
     }
 
     g_clear_object (&root);
-    g_clear_object (&default_location);
     g_list_free_full (mounts, g_object_unref);
 
     return result;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]