Commit 5d843507 authored by Cosimo Cecchi's avatar Cosimo Cecchi

Set rate limit to the file monitor.

parent 2d646155
......@@ -164,6 +164,8 @@ nautilus_bookmark_list_init (NautilusBookmarkList *bookmarks)
file = nautilus_bookmark_list_get_file ();
bookmarks->monitor = g_file_monitor_file (file, 0, NULL, NULL);
g_file_monitor_set_rate_limit (bookmarks->monitor, 1000);
g_signal_connect (bookmarks->monitor, "changed",
G_CALLBACK (bookmark_monitor_changed_cb), bookmarks);
......@@ -604,8 +606,12 @@ error:
if (error)
g_error_free (error);
if (out)
g_object_unref (out);
/* re-enable bookmark file monitoring */
bookmarks->monitor = g_file_monitor_file (file, 0, NULL, NULL);
g_file_monitor_set_rate_limit (bookmarks->monitor, 1000);
g_signal_connect (bookmarks->monitor, "changed",
G_CALLBACK (bookmark_monitor_changed_cb), bookmarks);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment