Skip to content

continue conversion to dt_gui_box_add/_vbox/_hbox#19354

Merged
TurboGit merged 1 commit intodarktable-org:masterfrom
dterrahe:box_conversion
Sep 21, 2025
Merged

continue conversion to dt_gui_box_add/_vbox/_hbox#19354
TurboGit merged 1 commit intodarktable-org:masterfrom
dterrahe:box_conversion

Conversation

@dterrahe
Copy link
Contributor

Following up on #18273 and #19118

New work often gets copy/pasted from existing code so the longer the old pattern exists the more needs to be converted in the end.

This PR finishes all of iop and converts some libs. It does not attempt to convert all dialogs at this point, since some of those (modulegroups/print) are probably better served with a partial redesign/rewrite when porting to gtk4.

Some more of the libs panel code could be done now, if somebody wants to step up. Please coordinate here if you plan to help out, so we don't do double work and I can review and comment early.

As usual this is partly tedious application of similar patterns, so the mental energy left for testing was very limited. This especially applies to deprecated modules. A thorough review would be nice. And if someone went to hunt for newly introduced memory leaks, I'd be surprised if they didn't find any.

@dterrahe dterrahe added priority: medium core features are degraded in a way that is still mostly usable, software stutters scope: codebase making darktable source code easier to manage labels Sep 16, 2025
@TurboGit TurboGit added this to the 5.4 milestone Sep 17, 2025
@TurboGit
Copy link
Member

That's a huge amount of work ! I'm not yet over reading the code, but frankly it is hard to review. I'll start testing too.

@TurboGit TurboGit self-requested a review September 18, 2025 16:48
@TurboGit
Copy link
Member

Something is happening with the darkroom right panel. I cannot resize it completely, it remains large:

I cannot make it smaller than that:

image

Whereas on master I can have it as small as this:

image

@dterrahe
Copy link
Contributor Author

Thanks for letting me know; I'll investigate.

BTW the last commit doesn't belong here; I'll move it to a separate PR.

@dterrahe
Copy link
Contributor Author

Something is happening with the darkroom right panel. I cannot resize it completely, it remains large:

Fixed. I had to explicitly set hexpand for the sidepanels to false, otherwise the widgets in hboxes that had it set (to replace the TRUE, TRUE parameters to gtk_box_pack_start) would cause that value to get propagated up. One of the subtle differences between the old and new way of doing things. This may occur in other places as well (dialog boxes etc) so please continue to be on the lookout for this. Thanks!

@wpferguson
Copy link
Member

@dterrahe does lua/widgets/box.c need work too?

@dterrahe
Copy link
Contributor Author

Yes, eventually lua needs work too, but it is going to be more complex than simply replacing one pattern for another. gtkcontainer will completely disappear, so some of the central infrastructure will need to be rewritten. Not much point replacing "low hanging fruit" if that work eventually needs to be redone to a deeper level.

What I'm doing for now is convert simple standard functionality that is widely spread (in iop and lib modules), like compositions using boxes and scrolled windows and event/gesture handling, where an approach that is compatible with gtk4 can implemented and tested in place. This could put us in a position where we can then work on switching the core infrastructure and fairly quickly have something "working" that people can start experimenting with instead of ending up in a state where "everything" is fully borked for a prolonged period of time preventing people from getting involved (in testing). Anything that isn't "core" (i.e. would prevent starting), like dialogs and lua, can then be filled in from that state. Being able to immediately run and test something that is converted should dramatically increase productivity.

Just to manage expectations; there's no "grand plan" as yet, with work items, timelines and "resource" allocations. Just looking at different bits and pieces, feeling my way around, tackling subtasks that seem doable now and learning about what next steps would be involved. In the meantime any work is also intended to improve the quality of the current codebase (just in case a final gtk4 transition never materialises). Anybody who wants to do the same thing (learning about gtk4 and what conversion could involve) is encouraged to do so. I would also encourage coordination (with me... I do seem to be the "expert" for now) before going ahead and spending too much time on actual work/PRs.

Copy link
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested as much as I can... no other issues found. Thanks!

@TurboGit TurboGit merged commit 4abee2e into darktable-org:master Sep 21, 2025
5 checks passed
@dterrahe dterrahe mentioned this pull request Oct 1, 2025
17 tasks
@dterrahe dterrahe deleted the box_conversion branch January 29, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium core features are degraded in a way that is still mostly usable, software stutters scope: codebase making darktable source code easier to manage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants