Skip to content

Fix QAP on off button not responding to module active status - #22313

Merged
TurboGit merged 1 commit into
darktable-org:masterfrom
hats-np:fix-21991
Sep 19, 2026
Merged

TurboGit merged 1 commit into
darktable-org:masterfrom
hats-np:fix-21991

Conversation

@hats-np

@hats-np hats-np commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix QAP on off button not responding to module active status. Works both in regular and compact mode.

Referenced issue

Fixes #21991

Checklist

  • [ x] I have read CONTRIBUTING.md and the
    coding style.
  • [x ] I don't have merged master into the topic branch.
  • [ x] The pull request is one logical change, and every commit compiles on its
    own.
  • I ran the relevant tests: unit tests, src/tests/integration/ where the
    pixelpipe is touched, or darktable-cli as a headless smoke test.
  • [x ] New user-visible strings use _(), new preferences are registered in
    data/darktableconfig.xml.in.
  • [x ] A RELEASE_NOTES.md entry was added.

Test instructions

  1. Open QAP
  2. Make sure module is disabled
  3. Change value on a param
  4. Module becomes visibly active
  5. Change config setting to compact and repeat 1-4

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_object but 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.

@hats-np

hats-np commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

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?

@TurboGit

Copy link
Copy Markdown
Member

@hats-np : A release notes entry is needed only if the fix was for a bug in a released. So here not needed.

@ralfbrown

Copy link
Copy Markdown
Collaborator

My question is, why isn't it used?

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.

@hats-np

hats-np commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

Makes sense @ralfbrown So can I go ahead and amend the PR? It'll change the whole thing into just 2 lines.

@hats-np

hats-np commented Sep 19, 2026

Copy link
Copy Markdown
Contributor Author

@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.

@TurboGit TurboGit added this to the 5.8 milestone Sep 19, 2026
@TurboGit TurboGit added bugfix pull request fixing a bug priority: low core features work as expected, only secondary/optional features don't scope: UI user interface and interactions labels Sep 19, 2026

@TurboGit TurboGit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works for me, thanks!

@TurboGit
TurboGit merged commit e40b699 into darktable-org:master Sep 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix pull request fixing a bug priority: low core features work as expected, only secondary/optional features don't scope: UI user interface and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quick Access Panel: Module switch on button does not reflect module status

3 participants