Skip to content

Draft: GTK4 preparations: get rid of GtkMenu

EDIT: I discussed with the Design Team and the visual change does not seem to be acceptable. So this needs some alternative solution. Draft until then.

GtkMenu does not exist in GTK4, but menus were replaced by GtkPopover and GtkPopoverMenu. Since those already exist in GTK3, a great amount of the porting can be done ahead. This MR ports all the GtkMenu to GtkPopoverMenu, when possible. There is unfortunately still a GtkMenu instance in libmisc/ev-search-box.c. However, that instance is unavoidable, due to the search box depending on GtkEntry, which in GTK3 internally uses a GtkMenu.

The styling of the popovers changes slightly too. I haven't figured out a way to change this, seems overall fine:

Before:

image

After:

Screenshot_from_2022-11-07_23-27-26

This MR also includes some other small refactoring around the menu logic, which I bumped into while looking at the code. There are independent commits for that refactoring, so it is probably better to review this commit by commit.

Relates !373

Edited by Pablo Correa Gomez

Merge request reports