GNOME Bugzilla – Bug 530858
Bookmarks not updated correctly when locale is changed.
Last modified: 2010-05-06 16:52:34 UTC
1) Ensure that .gtk-bookmarks contains the equivalent of file:///home/padraigo/Music 2) Check that Music bookmark appears in side panel. 3) LC_ALL=fr_FR xdg-user-dirs-gtk-update (note any locale should do) 4) .gtk-bookmarks is not updated and Music bookmark disappears
It looks like we are getting notification that Music has changed to Musique which triggers writing out .gtk-bookmarks before we get notification that .gtk-bookmarks has changed. dtrace script 6693915.d: #!/usr/sbin/dtrace -Cs inline int PID = $target; pid$target::bookmark_file_changed_callback:entry { ustack(); } pid$target::nautilus_bookmark_list_load_file:entry { ustack(); } dtrace: script './6693915.d' matched 2 probes CPU ID FUNCTION:NAME 0 75773 bookmark_file_changed_callback:entry nautilus`bookmark_file_changed_callback libgobject-2.0.so.0.1600.3`g_cclosure_marshal_VOID__VOID+0x55 libgobject-2.0.so.0.1600.3`g_closure_invoke+0x107 libgobject-2.0.so.0.1600.3`signal_emit_unlocked_R+0x75f libgobject-2.0.so.0.1600.3`g_signal_emit_valist+0x8c4 libgobject-2.0.so.0.1600.3`g_signal_emit+0x25 nautilus`nautilus_file_emit_changed+0x7d nautilus`nautilus_directory_emit_change_signals+0x22 nautilus`call_files_changed_common+0x4e nautilus`call_files_changed_unref_free_list+0x81 libglib-2.0.so.0.1600.3`g_hash_table_foreach+0x61 nautilus`nautilus_directory_notify_files_removed+0xca nautilus`nautilus_file_changes_consume_changes+0x2b4 nautilus`call_consume_changes_idle_cb+0x1a libglib-2.0.so.0.1600.3`g_idle_dispatch+0x1f libglib-2.0.so.0.1600.3`g_main_dispatch+0x1e0 libglib-2.0.so.0.1600.3`g_main_context_dispatch+0x85 libglib-2.0.so.0.1600.3`g_main_context_iterate+0x3ce libglib-2.0.so.0.1600.3`g_main_loop_run+0x1b8 libgtk-x11-2.0.so.0.1200.9`gtk_main+0xb2 0 75774 nautilus_bookmark_list_load_file:entry nautilus`nautilus_bookmark_list_load_file nautilus`bookmark_monitor_changed_cb+0x6f libgio-2.0.so.0.0.0`_gio_marshal_VOID__OBJECT_OBJECT_ENUM+0x61 libgobject-2.0.so.0.1600.3`g_closure_invoke+0x107 libgobject-2.0.so.0.1600.3`signal_emit_unlocked_R+0x75f libgobject-2.0.so.0.1600.3`g_signal_emit_valist+0x8c4 libgobject-2.0.so.0.1600.3`g_signal_emit+0x25 libgio-2.0.so.0.0.0`emit_cb+0x2e libglib-2.0.so.0.1600.3`g_idle_dispatch+0x1f libglib-2.0.so.0.1600.3`g_main_dispatch+0x1e0 libglib-2.0.so.0.1600.3`g_main_context_dispatch+0x85 libglib-2.0.so.0.1600.3`g_main_context_iterate+0x3ce libglib-2.0.so.0.1600.3`g_main_loop_run+0x1b8 libgtk-x11-2.0.so.0.1200.9`gtk_main+0xb2 nautilus`main+0x850 nautilus`_start+0x7a
Created attachment 110266 [details] [review] proposed patch This patch corrects the behavior complained of in this bug. It also maintains the same behavior when a directory which is a bookmark is ndeleted.
I don't think this is the right approach to fix this issue. I've seen this bug too while making an updated patch for bug 532911, and I think the right solution is to avoid connecting to "appearance-changed" in the bookmark list, and always emit the "contents-changed" from the bookmark itself when an attribute that will be written to disk is set (i.e. the name should be considered as part of the contents, as it is written to the .gtk-bookmarks file). I will post an updated patch implementing this soon.
Cosimo, do you have an updated patch hidden somewhere on your hard-drive? :) Cheers.
This should work fine now in master.