darktable-org / darktable-org/darktable
Refactoring: Remove Gtk dependency from data structs in develop.h
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.1k
- Forks
- 1.4k
- Avg merge
- 22h 14m
- Merged PRs (30d)
- 198
Description
The purpose of this issue ticket is tracking some issues in the code, which should be addressed at some point.
While touching develop.h I noticed that the structs defined should ideally only contain data for the business logic of the darkroom / develop mode of darktable, it should be completely detached from the GUI stuff.
However, some of the structs in there contain GtkWidgets pointers with some comments to get rid of them.
Additionally develop.h contains neither a #include <gtk/gtk.h> nor #include <gtk/gtkwidget.h> include directive, hence depends on transitive dependencies to gtk and therefore hides this dependency, which is not good too.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with develop.h and inspect the structs containing GtkWidgets pointers and their surrounding comments. Trace where those fields are used before deciding how to separate GUI state from develop data. Done means the data structs no longer depend on GTK and develop.h no longer hides a GTK dependency through transitive includes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100