diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2010-04-12 03:34:23 +0200 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2010-04-26 16:34:35 +0200 |
commit | 5d84350777a40f53ae3970f2acbafb5846cb1c94 (patch) | |
tree | 7ed267d02561334568547bc2fdd198eac61f330f /src/nautilus-bookmark-list.c | |
parent | 2d64615521d9d6a090ef9a296e7783a73edc1f68 (diff) | |
download | nautilus-5d84350777a40f53ae3970f2acbafb5846cb1c94.tar.gz |
Set rate limit to the file monitor.
Diffstat (limited to 'src/nautilus-bookmark-list.c')
-rw-r--r-- | src/nautilus-bookmark-list.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nautilus-bookmark-list.c b/src/nautilus-bookmark-list.c index 67be6107b..25885d9eb 100644 --- a/src/nautilus-bookmark-list.c +++ b/src/nautilus-bookmark-list.c @@ -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); |