Conversation
ZanderBrown
left a comment
There was a problem hiding this comment.
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.
👍 Looks like you've covered all the context-menu cases I know of
leolost2605
left a comment
There was a problem hiding this comment.
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! |
Co-authored-by: Leonhard <leo.kargl@proton.me>
|
@leolost2605 can I get another review here please? :) |
leolost2605
left a comment
There was a problem hiding this comment.
Just a minor commen. TBH I would prefer having the signal handlers as methods instead of lambdas because that makes sure we don't get memory leaks by capturing a local without having to be extra careful.
|
@leolost2605 done and added comments |
Adds a menu_model property to Granite.ListItem so you can automatically set up a context menu without all the boilerplate