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

[Request] Force GtkPopover to use GtkMenu globally #117

Open
lah7 opened this issue Oct 27, 2024 · 2 comments
Open

[Request] Force GtkPopover to use GtkMenu globally #117

lah7 opened this issue Oct 27, 2024 · 2 comments
Labels
help wanted patch feature request A "nice to have" patch to complement the classic experience

Comments

@lah7
Copy link
Owner

lah7 commented Oct 27, 2024

What should be patched?

Popovers are starting to be misused as context menus in a GTK 3 application, namely Inkscape 1.4.

We already patched the menus in places like the file chooser, so it is unknown how easy it is to apply this globally.

Screenshots

Inkscape 1.4 - context menu GNOME Disks 46.1 - as a toolbar item
Inkscape 1.4 using a popover GNOME Disks using a popover

Commits

It seems intentional that Inkscape moved to use popovers instead of menus due to some background work of porting to GTK 4. It's possible it was a regression in the application:

Since Inkscape is also distributed as an AppImage, it could be possible to just downgrade and stick with that version forever instead.

@lah7 lah7 added patch feature request A "nice to have" patch to complement the classic experience help wanted labels Oct 27, 2024
@ssokolow
Copy link

Has any investigation been done yet into how difficult would it be to just gut GtkPopover and stick calls to GtkMenu inside it?

Since Inkscape is also distributed as an AppImage, it could be possible to just downgrade and stick with that version forever instead.

Unfortunately, new versions of Inkscape bring support for new document constructs. That will increasingly become like staying on an old version of Microsoft Office to avoid the Ribbon.

@lah7
Copy link
Owner Author

lah7 commented Dec 20, 2024

I'm hoping it would be a simple API wrapper from GtkPopover to GtkMenu.

I wondered if GitHub Copilot Workspace (Preview) can help out. A computer came up with a feasible plan, but won't know if it works until I see the diff code it generates. Currently rate limited by the hour.

image

Might be wise to put it behind an optional environment variable, just in case.

Edit: ✨ It came up with this. May be a useful stating point: 6861853ac517fc715eaff4bc9c0de5fa3de36692.patch.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted patch feature request A "nice to have" patch to complement the classic experience
Projects
None yet
Development

No branches or pull requests

2 participants