Some thoughts on Nautilus
During the last weeks, the code on Gtk+ side is more or less settled, so I started working on Nautilus.
The current situation is desperating.
Nautilus code is old and, after almost 20 years of hundreds of contributors throwing their coins in, things are in a poor state. Many different formatting styles, code tightly coupled, many old hacks still lying around… it’s very easy to get confused here.
So, before start trying to fit the new Places View code inside this spaghetti, we agreed on making a reasonable cleanup. You can already check some improvements on master, but there’s much work left to do.
Let’s take a look at Nautilus before:
And how it looks like now:
Spotted any difference? Hopefully not. This entire work is not related to UI, instead it is a major reorganization of the code. By the end of this cleanup phase, end users won’t notice any difference.
The main struggle here it to make the directory viewers (grid & list view, for instance) completely isolated, i.e. no widgets besides the views themselves are aware of the current directory. This may seem unintuitive at first, but this abstraction is needed in order to fit the new Places View, as it doesn’t represent a real location.
What changed up to now:
- Moved management of empty states (empty folder & no search results) to the file viewers
- Moved the floating bar to the viewers
- Cleanup and reorganization of the focus chain
- Removal of an old hack
- Fixed an annoying bug
It may not look like a radical movement, but gosh, git says it -449/+382 lines of code, and each line of code removed and improved here counts.
GUADEC
As some of you may know, this year I’ll attend GUADEC. It’s the first time ever that I:
- attend the conference
- go to Sweden
- go to Europe, in fact
- bring paçocas and other brazilian sweets in my bag (as democratically asked by my mentor, under the risk of losing my life :P)
Now I have to find some vegan restaurants nearby to eat and a good park to meditate. Looks like there are some good options, but nevertheless I’m accepting suggestions here, in case someone knows (or even better, lives in) Gothenbutg.
Last but not least, I’d like to thank the GNOME Foundation for providing me shelter and covering most of the travel costs. It wouldn’t be possible without this kind sponsorship. See you all in Gothenburg, folks!
Leave a Reply