Merge lp:~lemonboy/pantheon-files/update-free-space into lp:~elementary-apps/pantheon-files/trunk

Proposed by The Lemon Man
Status: Merged
Approved by: Jeremy Wootten
Approved revision: 1967
Merged at revision: 1988
Proposed branch: lp:~lemonboy/pantheon-files/update-free-space
Merge into: lp:~elementary-apps/pantheon-files/trunk
Diff against target: 48 lines (+19/-12)
1 file modified
src/View/Sidebar.vala (+19/-12)
To merge this branch: bzr merge lp:~lemonboy/pantheon-files/update-free-space
Reviewer Review Type Date Requested Status
Jeremy Wootten Approve
Review via email: mp+276658@code.launchpad.net

Commit message

Update the size-related fields for networked filesystems.

To post a comment you must log in.
Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

The indicator does not update until the Sidebar is refreshed and this does not happen unless e.g. the bookmarks are moved, renamed, deleted. However, the freespace indicator does display correctly for NFS at the time of mounting. It should be clarified whether this is sufficient to meet the requirements of the bounty; the bug report is not specific on this matter. I would say the freespace indicators should update whenever the freespace changes for any of the mounted volumes (not just NFS).

1967. By The Lemon Man

Update the sidebar on uri change.

Revision history for this message
Jeremy Wootten (jeremywootten) wrote :

The free space now updates on reload (F5). This has to be done manually for local mounts if the free space changes due to pasting or deleting files since this does not trigger a reload for local devices (FileMonitor signals are used to update the view).
While it would be nice to have the freespace indicators automatically update, it can be added in another branch. I will approve this branch.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/View/Sidebar.vala'
--- src/View/Sidebar.vala 2015-11-14 13:21:54 +0000
+++ src/View/Sidebar.vala 2015-11-15 20:44:29 +0000
@@ -559,16 +559,22 @@
559 var mount = volume.get_mount ();559 var mount = volume.get_mount ();
560 if (mount != null) {560 if (mount != null) {
561 var root = mount.get_default_location ();561 var root = mount.get_default_location ();
562 add_place (Marlin.PlaceType.MOUNTED_VOLUME,562 var it = add_place (Marlin.PlaceType.MOUNTED_VOLUME,
563 iter,563 iter,
564 mount.get_name (),564 mount.get_name (),
565 mount.get_icon (),565 mount.get_icon (),
566 root.get_uri (),566 root.get_uri (),
567 null,567 null,
568 volume,568 volume,
569 mount,569 mount,
570 0,570 0,
571 root.get_parse_name ());571 root.get_parse_name ());
572
573 uint64 fs_capacity, fs_free;
574 get_filesystem_space (root, out fs_capacity, out fs_free);
575 store.@set (it,
576 Column.FREE_SPACE, fs_free,
577 Column.DISK_SIZE, fs_capacity);
572 } else {578 } else {
573 /* see comment above in why we add an icon for an unmounted mountable volume */579 /* see comment above in why we add an icon for an unmounted mountable volume */
574 var name = volume.get_name ();580 var name = volume.get_name ();
@@ -2007,8 +2013,9 @@
2007 }2013 }
20082014
2009 private void loading_uri_callback (string location) {2015 private void loading_uri_callback (string location) {
2010 set_matching_selection (location);2016 set_matching_selection (location);
2011 slot_location = location;2017 slot_location = location;
2018 update_places();
2012 }2019 }
20132020
2014 private void trash_state_changed_cb (Marlin.TrashMonitor trash_monitor, bool state) {2021 private void trash_state_changed_cb (Marlin.TrashMonitor trash_monitor, bool state) {

Subscribers

People subscribed via source and target branches

to all changes: