Fix QAP on off button not responding to module active status - #22313
Conversation
|
BTW does this need release notes, if the bug was introduced between versions? For the user reading the release notes it doesn't make sense to mention fixed issues which weren't in the releases right? |
|
@hats-np : A release notes entry is needed only if the fix was for a bug in a released. So here not needed. |
Most likely, the first person to write darktable code using such functionality either didn't know about it or didn't have it available (i.e. it wasn't part of Gtk 15+ years ago), and then everyone else followed the original pattern just like you did. It's worth revisiting as part of the Gtk4 migration. |
|
Makes sense @ralfbrown So can I go ahead and amend the PR? It'll change the whole thing into just 2 lines. |
|
@TurboGit I updated the branch with the simplified code. The previous one while it worked was also emitting GTK warnings I had missed, this one seems clean and the implementation is a bit simpler as well. |
Summary
Fix QAP on off button not responding to module active status. Works both in regular and compact mode.
Referenced issue
Fixes #21991
Checklist
coding style.
own.
src/tests/integration/where thepixelpipe is touched, or
darktable-clias a headless smoke test._(), new preferences are registered indata/darktableconfig.xml.in.RELEASE_NOTES.mdentry was added.Test instructions
AI assistance
Written by me. Only used AI to explain certain GTK stuff to me since I'm a noob there, but still spent 3h following the code path and understanding better how the QAP GUI is drawn, programmed, and how it interacts or deals with the regular module GUI.
--
A question for the devs. First I asked an LLM on how to connect the button with the module status and it suggested
g_signal_connect_objectbut after a quick search around the project I rejected this approach, as it isn't used elsewhere.My question is, why isn't it used? From what I see, it would automatically drop the callback once the button was freed? This is my first time working with GTK so bear with me please :) Nevertheless, I didn't follow that path and instead manually dealt with the disconnection like it was being done elsewhere in the code already.