darktable-org / darktable-org/darktable

Refactoring: Remove Gtk dependency from data structs in develop.h

Open
#18,559 9 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.