We decide to rewrite Baobab to leverage all the latest gnome technologies and to have a cleaner codebase. For the rewrite we decide to use Vala. Vala also allows us to keep some parts of the old code without rewriting them, in particular the charts widgets will be kept.

At a later stage we would like to revisit the UI and maybe even switch to Clutter for the charts and to introduce animations.


These are the items still missing in the rewrite

  • Device selection: the old implementation has a preference dialog where it is possible to select which drives should be scanned. This is an importand feature since scanning a specific disk or avoid scan of an external disk are common operations. In the future I would like to expose this on the "first page" of Baobab itself and get rid of the prefs dialog, but this does not change the fact that we need code to enumerate and show the drives. It is not clear what API should be used... I think GIO does not expose all drives but only user mounts. GUDisks2? The old code used libgtop but we are trying to stay away from it This is now implemented using GIO, since the new gvfs can (optionally) expose all mounts in /etc/fstab.

  • Error handling: at the moment any error encountered during the scan, including permission errors, aborts the entire operation: this means that "scan filesystem" will never work unless you are root. We need to handle permission errors by just showing that recursion inside the affected dir was not possible and maybe provide a warning message area saying that some dirs could not be scanned and results may not be accurate This is now partially done, would be nice to show the errors in the appropriate entry in the treeview

  • Overall space usage: as of today the initial state when baobab is launched shows the used/free space of the filesystem, until we change the "first page" design we need to reimplment something like that since the initial state now is confusing (empty treeview and chart)
  • Allocated Space: in the scan we collect both normal file size and real allocated space (if GIO knows it), the old baobab had a menu to toggle between one or the other. We need to either reimplement the toggle or even better figure out what we want to do and simply do it with no user knob. We currently only show the allocated space.

  • Some of the code in the old treeview was not ported over (auto adjutsing size in some cases, using collate for filename comparison)... I am not sure they are still needed
  • Figure out what we want to do with "Quit" in case of multiple windows
  • Take advantage of the new gresources stuff

Apps/DiskUsageAnalyzer/ValaRewrite (last edited 2018-02-20 07:57:10 by SvitozarCherepii)