~lemonboy/pantheon-files/update-free-space

« back to all changes in this revision

Viewing changes to src/View/Sidebar.vala

  • Committer: LemonBoy
  • Date: 2015-11-04 13:03:59 UTC
  • Revision ID: thatlemon@gmail.com-20151104130359-lhqurzac58fxy29v
Update the size-related fields for networked filesystems.

Show diffs side-by-side

added added

removed removed

Lines of Context:
559
559
                var mount = volume.get_mount ();
560
560
                if (mount != null) {
561
561
                    var root = mount.get_default_location ();
562
 
                    add_place (Marlin.PlaceType.MOUNTED_VOLUME,
563
 
                               iter,
564
 
                               mount.get_name (),
565
 
                               mount.get_icon (),
566
 
                               root.get_uri (),
567
 
                               null,
568
 
                               volume,
569
 
                               mount,
570
 
                               0,
571
 
                               root.get_parse_name ());
 
562
                    var it = add_place (Marlin.PlaceType.MOUNTED_VOLUME,
 
563
                                        iter,
 
564
                                        mount.get_name (),
 
565
                                        mount.get_icon (),
 
566
                                        root.get_uri (),
 
567
                                        null,
 
568
                                        volume,
 
569
                                        mount,
 
570
                                        0,
 
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
578
                } else {
573
579
                /* see comment above in why we add an icon for an unmounted mountable volume */
574
580
                    var name = volume.get_name ();