Skip to content

gtk: fix lock-version and mark-auto-installed#244

Merged
mvo5 merged 1 commit into
masterfrom
fix-mark-auto-installed
Jul 14, 2026
Merged

gtk: fix lock-version and mark-auto-installed#244
mvo5 merged 1 commit into
masterfrom
fix-mark-auto-installed

Conversation

@mvo5

@mvo5 mvo5 commented Jul 14, 2026

Copy link
Copy Markdown
Owner

When a stateful GAction without a parameter type is activated from a menu, the activate handler receives parameter == NULL, so reading the new value via g_variant_get_boolean(parameter) always yielded FALSE. As a result both toggles could only ever unset their flag.

Read the actions current state instead and toggle it, and update the state so the menu checkmark reflects the change immediately.

Fixes: #184

When a stateful GAction without a parameter type is activated from a
menu, the activate handler receives parameter == NULL, so reading the
new value via g_variant_get_boolean(parameter) always yielded FALSE.
As a result both toggles could only ever unset their flag.

Read the actions current state instead and toggle it, and update
the state so the menu checkmark reflects the change immediately.

Fixes: #184

@nazar-pc nazar-pc left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I gave it a try and can confirm it fixes #184

@mvo5 mvo5 merged commit 8eee784 into master Jul 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't mark package automatically installed

2 participants