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

Use GLib.MenuModel for context menu #769

Merged
merged 7 commits into from
Aug 9, 2024
Merged

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Aug 5, 2024

This is similar to #751 but based on latest master and more closely following current code to reduce diff (a little). Code cleanup can be done in separate PR.

Also added custom "accel" menu attribute to the items. This does not seem to be working with the current version - maybe it ill work in Gtk4?

src/MainWindow.vala Outdated Show resolved Hide resolved
src/Widgets/TerminalWidget.vala Outdated Show resolved Hide resolved
src/Widgets/TerminalWidget.vala Outdated Show resolved Hide resolved
Comment on lines 470 to 471
context_popover.show_all ();
context_popover.popup ();
Copy link
Member

Choose a reason for hiding this comment

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

I think show_all and popup are redundant here. I'm not sure show_all is necessary when using a menu from a model

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It does not work in Gtk3 without these. Revisit in Gtk4

@danirabbit
Copy link
Member

@jeremypw proposed #770 to merge into this branch. Fixes missing accels

* Use Gtk.Menu

* section labels are nullable
@danirabbit danirabbit merged commit 2e643de into master Aug 9, 2024
4 checks passed
@danirabbit danirabbit deleted the jeremypw/glib-context-menu branch August 9, 2024 15:34
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.

2 participants