The new life of the new icon view
This is a blocker for the GTK 4 switch and a step towards GtkGridView adopting. #319 (closed)
I've refactored the seminal view-model-controller code design into something as close as possible to the GTK 4 list model-list widget paradigm, before completing its re-implementation of canvas view features.
It also removes the canvas view as a whole, as well as EelCanvas.
The 36 commits of this monolithic MR follow this logical sequence:
- Emphasize GListModel;
- Refactor widget construction;
- Tweak icon visuals to make them closer to the canvas view;
- Update event handling (as this part of the code has been spared in !699 (merged) to avoid merge conflicts);
- Implement missing feature to reach feature parity with canvas view (except DND and clipboard);
- Remove canvas view and cleanup leftovers.
Drag-and-drop and clipboard would need to be reimplemented in GTK 4 anyway, so that's why they are skipped for now.
- Drag and drop doesn't work:
- to do after GTK 4 switch, which brings an all-new DND API.
- Cut items are not marked as such:
- to do after GTK 4 switch, which brings an all-new clipboard API;
- Performance is bad for directories with many files:
- GtkGridView is going to solve this, but is only available in GTK 4, so we must switch first;
- After loading the directory, the grid view doesn't get keyboard focus:
- it may be a GTK 3/GtkFlowBox bug; I've debugged it for a couple of hours to no avail, let's check again in GTK 4. -- Indeed, a GtkFlowBox-only thing. Solved after porting to GtkGridView.
- If the view doesn't fill all available height, the blank space at the bottom cannot be used to start a rubberband selection. -- It's still a bug in GtkGridView gtk#3462