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 530858 - Bookmarks not updated correctly when locale is changed.
Bookmarks not updated correctly when locale is changed.
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: Bookmarks
2.22.x
Other Solaris
: Normal major
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-01 08:53 UTC by padraig.obriain
Modified: 2010-05-06 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.25 KB, patch)
2008-05-02 09:35 UTC, padraig.obriain
none Details | Review

Description padraig.obriain 2008-05-01 08:53:18 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
Comment 1 padraig.obriain 2008-05-01 08:58:30 UTC
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

Comment 2 padraig.obriain 2008-05-02 09:35:32 UTC
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.
Comment 3 Cosimo Cecchi 2008-05-23 19:10:09 UTC
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.
Comment 4 Baptiste Mille-Mathias 2009-03-11 12:10:36 UTC
Cosimo,

do you have an updated patch hidden somewhere on your hard-drive? :)

Cheers.
Comment 5 Cosimo Cecchi 2010-05-06 16:52:34 UTC
This should work fine now in master.