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 784119 - Extension context menus do not refresh even after emit_items_updated_signal is called
Extension context menus do not refresh even after emit_items_updated_signal i...
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: Extension Library
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-23 01:34 UTC by Adam Plumb
Modified: 2021-06-18 15:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Adam Plumb 2017-06-23 01:34:20 UTC
Hey guys, so I was working on fixing an issue in RabbitVCS (a nautilus-python extension) where our context menu items were not getting refreshed like they used to be.  It used to be that you could right-click on a file, return a temporary empty list and in a separate thread generate a menu, then emit the "items-updated" signal and the menu would get refreshed without re-opening the menu.  Now, even with the items-updated signal getting passed, and get_file_items getting called again, the menu items don't change until I close and re-open the context menu.

I thought it might be due to a bug in nautilus-python, so I wrote up a C extension that reproduces the issue.

https://github.com/adamplumb/simple-nautilus-extension

To reproduce, open nautilus and right-click on a file.  You should see an 'Always here' item.  Then, I would expect it to show a 'Sometimes here' item after a second but that doesn't happen.  If you close and re-open the menu you'll then see the 'Sometimes here' item.

This seems to be a regression because the "items-updated" signal mechanism is still in place, so I would expect it to refresh the menu items in an open context menu.
Comment 1 Ernestas Kulik 2017-06-23 03:08:09 UTC
Are you on a Wayland session? If so, are you able to reproduce the issue on X?
Comment 2 Olivier Fourdan 2017-06-23 07:15:12 UTC
Just tested, that happens in x11 as well, so not Wayland specific.

BTW, the given sample code crashes nautilus on third attempt, so there is something wrong in the sample code.
Comment 3 Adam Plumb 2017-06-23 10:32:31 UTC
Sorry about that.  I've updated the plugin to not crash Nautilus.  FYI I just tested on a X11 session and it shows the same behavior as Wayland.
Comment 4 Adam Plumb 2017-06-23 10:32:42 UTC
Sorry about that.  I've updated the plugin to not crash Nautilus.  FYI I just tested on a X11 session and it shows the same behavior as Wayland.
Comment 5 André Klapper 2021-06-18 15:53:13 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of Files (nautilus), then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/nautilus/-/issues/

Thank you for your understanding and your help.