Project Proposal: Porting from GtkTreeView to a new GimpTreeView
The following is my GSoC 2024 project proposal. According to the discussions on IRC, I would like to create and implement a new GimpTreeView
widget, which would replace the existing GtkTreeView
widget.
GtkTreeView
and current implementation:
Problems with - Deprecated in GTK4 (porting to GTK4 in the future would be tiresome).
- A very complicated structure, which makes UI rendering very unnecessarily difficult.
- The current implementation of the Layers/Channels dialogs could be cleaner.
A request for developers: Please let me know about your previous experiences with using GtkTreeView and what you like/dislike about that particular widget
My initial research:
Currently, the UI for Layer/Channel/Vector has been implemented with the following structure:
Other than this, TreeView has also been used in various other dialogs. I will keep up with my research about where TreeViews have been used throughout GIMP.
Plan of Action:
-
Before the results are announced, I want to keep solving some more bugs for 3.0 release, this will help me understand the code more.
-
Initially, I am going to study GObject in detail. Directly trying to implement the new Widget on the Layers UI is a bad idea, so I will start off with a simpler TreeView used in the application, like the one used in Preferences Dialog.
-
The new Widget will be inspired by GTK4 and the changes it has made to the current TreeView. This will also make the future port easy to understand.
-
Major changes lie in the Model/Store itself, in how the data is stored. Gtk4 uses GIO's GListModel, which is a 1-Dimensional base List Model, and I plan to use the same in the new Widget.
-
Cell Rendering is deprecated in GTK4, instead, widgets are directly rendered in the TreeView, using a Factory. I will be building a similar implementation in GTK3. This is going to be a very important thing to do (maybe the most). This could open various possibilities for widgets more than a tree.
-
Iteration has changed in GTK4, I want to build the widget with a similar style of Iteration.
-
I will make sure that whatever changes I am making do not use things which have been deprecated in GTK4.
-
If the above mentioned Widget is successful, I want to implement the proposed UI using it after GSoC.
Final Notes:
Requesting feedback from my future mentors and other developers as well. This is going to be a good challenge, and I think using the correct choice of Data Structures, we will be able to achieve our goal of simplifying TreeViews and encourage more ideas in the future.