Skip to content

Improve tooltips management

This follows !25 (comment 16569). I don't know why I didn't do that right away, it's obviously much better.

All the work is done in mousepad_window_menu_set_tooltips() now, without spreading out everywhere and without introducing additional data structures. I think it must be pretty fast too, because it only goes through the menu once, moving the GtkMenu and GMenu forward together.

When setting tooltips for the first time, a link is established between each GtkMenuBar submenu and its corresponding submenu in the GMenuModel the menubar comes from, so that these submenus can be accessed later to update tooltips locally in the menubar.

I also took the opportunity to add some new tooltips, for items that open a submenu, since we no longer have to necessarily link a tooltip to an action.

Edited by Gaël Bonithon

Merge request reports

Loading