After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772106 - Regressions in the context menu after the switch to GAction
Regressions in the context menu after the switch to GAction
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Interface
git master
Other Linux
: Normal blocker
: ---
Assigned To: Michael Catanzaro
Epiphany Maintainers
: 784437 (view as bug list)
Depends on:
Blocks: 765145
 
 
Reported: 2016-09-28 07:08 UTC by Carlos Garcia Campos
Modified: 2017-11-22 22:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window: Check context menu item sensitivity using editor state (6.92 KB, patch)
2017-09-26 21:36 UTC, Michael Catanzaro
none Details | Review

Description Carlos Garcia Campos 2016-09-28 07:08:21 UTC
We have two different ways of disabling items in the context menu. When the action belongs to that context menu, for example cut/copy/paste on editable content, we make the actions not available insensitive. But when the action is doesn't really belong to the context menu, for example copy option when there's a link selected, we hide the option to make the context menu less cluttered. Now both options seem to be broken. To reproduce, select text on a link an right click over the link, you should see the copy option, then clear the selection an open the context menu again, the copy option shouldn't be there anymore, however it's there and enabled. I'm sure there are more cases broken. I'm afraid this is very difficult to achieve with the GMenu, there's a hidden-when GMenuItem attribute that allows you to hide options when the action is disabled or not present. Maybe we need to delay the context menu until we have all the information available and not include options we don't want to show. We have just switched and I'm already missing GtkAction.
Comment 1 Michael Catanzaro 2016-09-28 09:44:11 UTC
(In reply to Carlos Garcia Campos from comment #0)
> Maybe we need to delay
> the context menu until we have all the information available and not include
> options we don't want to show.

I want to do this anyway, because it's the only way to fix bug #765145.
Comment 2 Michael Catanzaro 2016-11-26 16:32:42 UTC
Maybe not the most serious bug, but I want to use blocker status to help track priority issues for 3.24.
Comment 3 Michael Catanzaro 2017-02-13 04:48:06 UTC
I think the only problematic menu item is copy, right?

I'm going to attach a patch that fixes this in bug #765145. I had to add new WebKitWebEditor API so that I could check the availability of the editing commands in the web process, then I send it to the UI process via context menu user data. Let me know what you think in that bug.
Comment 4 Michael Catanzaro 2017-03-11 16:26:22 UTC
(In reply to Michael Catanzaro from comment #3)
> I think the only problematic menu item is copy, right?
> 
> I'm going to attach a patch that fixes this in bug #765145. I had to add new
> WebKitWebEditor API so that I could check the availability of the editing
> commands in the web process, then I send it to the UI process via context
> menu user data. Let me know what you think in that bug.

(Stalled since it depends on WebKit API that we decided not to add.)
Comment 5 Michael Catanzaro 2017-07-02 14:51:31 UTC
*** Bug 784437 has been marked as a duplicate of this bug. ***
Comment 6 Michael Catanzaro 2017-09-26 21:36:25 UTC
Created attachment 360500 [details] [review]
window: Check context menu item sensitivity using editor state

This allows us to get the context menu right without flickering.
Notably, we can now hide the copy context menu item once again, without
flickering, when it is not available.
Comment 7 Michael Catanzaro 2017-11-22 22:56:09 UTC
This is fixed in master now.