GNOME Bugzilla – Bug 324999
Gnome-panel's places menu is not updated after adding a bookmark
Last modified: 2006-01-06 02:05:49 UTC
This bug has been opened here: http://bugzilla.ubuntu.com/show_bug.cgi?id=21372 "If you open Nautilus, browse to a folder and choose "add a bookmark", it appears in Nautilus' places sidepar pane but not in gnome-panel's places menu. If, then, you run killall gnome-panel, the bookmark appears in gnome-panel's places menu."
confirming.
It's not a panel issue: I can reproduce the issue, but when I do "touch ~/.gtk-bookmarks", it works. So, it's either a gnome-vfs or an inotify issue. Moving to gnome-vfs for now.
Assigning to John (hopefully)
If touch .gtk-bookmarks works, then it isn't an inotify issue. There was a similar bug in egg-recent. Egg-recent was only handling CHANGED events, but it also should have been handling DELETE/CREATE events as well. Could this be the problem here?
Current code is: result = gnome_vfs_monitor_add (&menuitem->priv->bookmarks_monitor, bookmarks_uri, GNOME_VFS_MONITOR_FILE, panel_place_menu_item_gtk_bookmarks_changed, menuitem); ... panel_place_menu_item_gtk_bookmarks_changed (GnomeVFSMonitorHandle *handle, const gchar *monitor_uri, const gchar *info_uri, GnomeVFSMonitorEventType event_type, gpointer user_data) { panel_place_menu_item_recreate_menu (GTK_WIDGET (user_data)); } So, we're not even checking the type of event (which might be a bug, btw ;-))
Vincent, could you add a printf to the callback and find out what the different event streams look like?
So, here's the callback code: static void panel_place_menu_item_gtk_bookmarks_changed (GnomeVFSMonitorHandle *handle, const gchar *monitor_uri, const gchar *info_uri, GnomeVFSMonitorEventType event_type, gpointer user_data) { if (event_type == GNOME_VFS_MONITOR_EVENT_CHANGED) { g_print ("monitor event == GNOME_VFS_MONITOR_EVENT_CHANGED\n"); } else if (event_type == GNOME_VFS_MONITOR_EVENT_DELETED) { g_print ("monitor event == GNOME_VFS_MONITOR_EVENT_DELETED\n"); } else if (event_type == GNOME_VFS_MONITOR_EVENT_STARTEXECUTING) { g_print ("monitor event == GNOME_VFS_MONITOR_EVENT_STARTEXECUTING\n"); } else if (event_type == GNOME_VFS_MONITOR_EVENT_STOPEXECUTING) { g_print ("monitor event == GNOME_VFS_MONITOR_EVENT_STOPEXECUTING\n"); } else if (event_type == GNOME_VFS_MONITOR_EVENT_CREATED) { g_print ("monitor event == GNOME_VFS_MONITOR_EVENT_CREATED\n"); } else if (event_type == GNOME_VFS_MONITOR_EVENT_METADATA_CHANGED) { g_print ("monitor event == GNOME_VFS_MONITOR_EVENT_METADATA_CHANGED\n"); } else { g_print ("monitor event == unknown\n"); } panel_place_menu_item_recreate_menu (GTK_WIDGET (user_data)); } When I manage (ie, add and/or remove) bookmarks in nautilus, I don't see anything printed. Then, when I do "touch ~/.gtk-bookmarks", I see monitor event == GNOME_VFS_MONITOR_EVENT_METADATA_CHANGED Maybe the Ubuntu dapper kernel is broken?
Nope, it was a bug in the inotify backend. Fixed in CVS: 2006-01-05 John McCutchan <ttb@tentacle.dhs.org> * modules/inotify-path.c: (ip_event_dispatch): When delivering a paired MOVED_TO event do the right thing and check the MOVED_TO filename instead of the MOVED_FROM. (#324999)