Skip to content

joinedmenu: add helper to join menus instead of nesting

Christian Hergert requested to merge wip/chergert/fix-4094 into master

In many cases, we have an "extra-menu" property that is used to allow applications to join menus into the native menu for the widget. Previously, this was done by nesting that menu in a section.

Doing so increases the complexity of the rules for GtkMenuTracker as you may want different handling from inside of the section vs toplevel sections.

If instead we synthetically glue the menus together, we have a much more natural joining of menus as the application developer would expect for their menu.

This also ports GtkLabel, GtkText, GtkPasswordEntry, and GtkTextView to use the joined menu helper.

The joined menu helper comes originally from GNOME Builder and has had extensive use there.

Fixes #4094 (closed)

Merge request reports