Skip to content

Popup Menus as St Widgets

Marco Trevisan requested to merge 3v1n0/gnome-shell:popupmenu-menu-objects into main

This is based on !499 (merged), but I've split it since it's somewhat a major change compared to that one.

Introduce menu interfaces that the menu items and menu themselves should implement: PopupItemInterface, PopupMenuInterface, PopupMenuBaseInterface.

PopupItemInterface is used for common properties and signals for menu and menu items, while PopupMenuInterface is the base menu implementation and PopupMenuBaseInterface the base menu with real widgets.

Use these to re-implement PopupMenu, PopupSubMenu and PopupMenuSection and re-define all the menu implementations in the shell using these new base objects that are now actually st widgets instead of composited classes.

To simplify creation of base menus, I've added a PopupMenuBaseFactory in order to avoid repeating the same things for base classes, however this commit is optional, but it's the only way I found to have a single way to create a base type that was inheriting from something and at the same time implementing interfaces.

Then remove all the usages for

Merge request reports