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 561957 - Load new scripts without restarting Nautilus
Load new scripts without restarting Nautilus
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: Scripts facilities
2.24.x
Other All
: Normal minor
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-11-22 21:38 UTC by Siegfried Gevatter (RainCT)
Modified: 2021-06-18 15:14 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
Patch by Walton A (2.73 KB, patch)
2010-08-22 02:56 UTC, Nigel Babu
needs-work Details | Review

Description Siegfried Gevatter (RainCT) 2008-11-22 21:38:41 UTC
Nautilus should either watch the script directories and automatically load new scripts and unload deleted ones, or offer some option (command/DBus call/whatever) to do this manually without needing to restart Nautilus.

Other information:
This has originally been reported in Ubuntu's BTS, at https://launchpad.net/bugs/269213, and A. Walton has submitted an initial patch proposal there (to watch the scripts directory).
Comment 1 Nigel Babu 2010-08-22 02:56:31 UTC
Created attachment 168485 [details] [review]
Patch by Walton A

Walton A submited a patch sometime back in the Ubuntu bug tracker.  Attaching the patch here for upstream review.  The patch still seems to apply and would be interesting to have.
Comment 2 Cosimo Cecchi 2010-10-13 17:00:55 UTC
Review of attachment 168485 [details] [review]:

I can see why this might be useful, though AFAICS this patch doesn't do anything for scripts, but only for extensions.

::: libnautilus-private/nautilus-module.c
@@ +226,3 @@
+load_module_callback (gpointer data)
+{
+	gchar *filename = (gchar *)data;

No need to cast a gpointer to gchar *.

@@ +228,3 @@
+	gchar *filename = (gchar *)data;
+	nautilus_module_load_file (filename);
+	g_free (filename);

This should return FALSE.

@@ +247,3 @@
+			    && g_str_has_suffix (filename, "." G_MODULE_SUFFIX))
+			{
+				g_timeout_add_seconds (10, load_module_callback, g_strdup (filename));

Why the timeout here?

@@ +249,3 @@
+				g_timeout_add_seconds (10, load_module_callback, g_strdup (filename));
+			}
+			g_free (filename);

If you use the timeout, you could just pass |filename| as user_data and avoid one useless strdup/free.

@@ +294,1 @@
 		eel_debug_call_at_shutdown (free_module_objects);

At this point, you probably need another eel_debug_call_at_shutdown() to clear the GFileMonitor.
Comment 3 André Klapper 2021-06-18 15:14:14 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.