Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Extend ActionMapExtManual::add_action_entries for usage with gio::SimpleActionGroup #1568

Open
andy128k opened this issue Nov 10, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@andy128k
Copy link
Contributor

ActionMapExtManual::add_action_entries is defined like

fn add_action_entries(&self, entries: impl IntoIterator<Item = ActionEntry<Self>>)

This works well when an object implements gio::ActionMap (e.g. gtk::Application) and action handlers receive a reference to an object. But it's problematic to use this function with gio::SimpleActionGroup attached to an arbitrary widget, because it assumes that handlers receive a group and not a widget reference.

Could this function be extended and be generic over handlers' recipients' type?

@andy128k andy128k added the enhancement New feature or request label Nov 10, 2024
@bilelmoussaoui
Copy link
Member

That is basically the C API. A random widget doesn't necessarily implement GActionMap and it is probably easier to use the install_action helpers in this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants