Merge lp:~jeremywootten/pantheon-files/fix-network-mount-sidebar-item-path into lp:~elementary-apps/pantheon-files/trunk

Proposed by Jeremy Wootten
Status: Merged
Approved by: Corentin Noël
Approved revision: 2514
Merged at revision: 2545
Proposed branch: lp:~jeremywootten/pantheon-files/fix-network-mount-sidebar-item-path
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 48 lines (+5/-5)
1 file modified
src/View/Sidebar.vala (+5/-5)
To merge this branch: bzr merge lp:~jeremywootten/pantheon-files/fix-network-mount-sidebar-item-path
Reviewer Review Type Date Requested Status
Kirill Romanov (community) test Approve
elementary UX ux Pending
Review via email: mp+318491@code.launchpad.net

Commit message

Use root location instead of default location as target for mounted device and network mount sidebar items

Description of the change

This branch uses the root location instead of the default location for the target of sidebar items for both mounted devices and network locations. The default location is sometimes the root location and sometimes the users home directory on the mount, which could cause confusion.

Different filemanagers behave differently in this respect; Thunar uses the root location but Nautilus uses the default location. So input from the UX team is required to decide what is the desired behaviour in elementaryos.

To post a comment you must log in.
Revision history for this message
Kirill Romanov (djaler1) wrote :

It works

review: Approve (test)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/View/Sidebar.vala'
2--- src/View/Sidebar.vala 2016-12-31 19:42:09 +0000
3+++ src/View/Sidebar.vala 2017-02-28 15:17:59 +0000
4@@ -602,7 +602,7 @@
5
6 var mount = volume.get_mount ();
7 if (mount != null) {
8- root = mount.get_default_location ();
9+ root = mount.get_root ();
10 last_iter = add_place (Marlin.PlaceType.MOUNTED_VOLUME,
11 iter,
12 mount.get_name (),
13@@ -641,7 +641,7 @@
14 if (volume != null)
15 continue;
16
17- root = mount.get_default_location ();
18+ root = mount.get_root ();
19 if (root.is_native ()) {
20 string scheme = root.get_uri_scheme ();
21 if (scheme == "archive" ) {
22@@ -678,7 +678,7 @@
23 /* Add network mounts */
24 network_mounts.reverse ();
25 foreach (Mount mount in network_mounts) {
26- root = mount.get_default_location ();
27+ root = mount.get_root ();
28 /* get_smb_share_from_uri will return the uri unaltered if does not have
29 * the smb scheme so we need not test. This is required because the mount
30 * does not return the true root location of the share but the location used
31@@ -749,7 +749,7 @@
32 var mount = volume.get_mount ();
33 if (mount != null) {
34 /* show mounted volume in sidebar */
35- var root = mount.get_default_location ();
36+ var root = mount.get_root ();
37 last_iter = add_place (Marlin.PlaceType.MOUNTED_VOLUME,
38 iter,
39 mount.get_name (),
40@@ -1312,7 +1312,7 @@
41 volume.mount.end (res);
42 Mount mount = volume.get_mount ();
43 if (mount != null) {
44- var location = mount.get_default_location ();
45+ var location = mount.get_root ();
46 if (flags == Marlin.OpenFlag.NEW_WINDOW) {
47 var app = Marlin.Application.get ();
48 app.create_window (location);

Subscribers

People subscribed via source and target branches

to all changes: