-
-
Notifications
You must be signed in to change notification settings - Fork 61
ListItem: add menu_model property #826
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
base: main
Are you sure you want to change the base?
Conversation
ZanderBrown
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like Gdk.Key.Menu (and ShiftF10) isn't being handled here?
Must admit I'm not quite sure what the recommended way to do that in Vala would be these days, but it is somewhat handy to have!
|
@ZanderBrown fixed the click gesture to use the menu event and also added keypress handling. Thanks for the review! |
ZanderBrown
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks like you've covered all the context-menu cases I know of
leolost2605
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably remove the menu key controller from the parent when we unparent
|
@leolost2605 does it make sense to do it as part of the destructor or should we connect to |
|
@danirabbit ig the proper fix would be to make it focusable because then we receive keyboard input so we don't have to deal with parent etc.. Not sure if that would break something? |
|
@leolost2605 fixed! |
|
@danirabbit New conflict to resolve! |
Adds a menu_model property to Granite.ListItem so you can automatically set up a context menu without all the boilerplate