GNOME Bugzilla – Bug 340938
The volume icon isn't updated when unmounting the volume
Last modified: 2008-01-29 01:04:01 UTC
Hi, When I unmount a volume like the floppy in computer:/// the icon in the places sidebar isn't updated. The problem is that GnomeVFS emit the "volume-unmounted" signal and remove the volume from his drive *after* that. So when we catch the signal, we run update_places which will still see the volume for the drive !
Created attachment 64967 [details] [review] proposed patch
Ubuntu bug about that: https://launchpad.net/distros/ubuntu/+source/nautilus/+bug/43412 "When I plug in a usb Card Reader all works fine. but when I unplug it again the places menu is not updated. It still shows the items of the card reader. http://librarian.launchpad.net/2517893/nautilus.png Nautilus Screenshot" Did you forward that patch to the list?
Created attachment 65310 [details] [review] better patch I think this patch works better and is easier. Any comment ?
Created attachment 65336 [details] [review] update when connect/disconnect drive Now that I have a USB key to make some tests I can improve my patch. - I update places when a new drive is connected because it is maybe user-visible. For optimisation I can maybe check that before running update_places() because most (all??) drives that can be hotplugged aren't user-visible. - I update places when a drive is disconnected because when I disconnect my USB key I get the unmount signal which makes update the places but the drive isn't removed from GnomeVFS ' drive list directly and is user-visible (it shouldn't I think)
Thanks, it's on HEAD. The fact that the volume is removed after the signal was emitted should probably be sorted out in gnome-vfs. Perhaps there's a reason for it, but chances are that nobody really cared up to now. 2006-05-15 Martin Wehner <martin.wehner@gmail.com> * src/nautilus-places-sidebar.c: (update_places_cb), (volume_unmounted_callback), (drive_disconnected_callback), (drive_connected_callback), (nautilus_places_sidebar_set_parent_window): Update the places on drive-connected and drive-disconnected signals too. Delay the update for the volume-unmounted signal with an idle callback to work around gnome-vfs removing the volume only after we received the signal. Patch from Xavier Claessens <xclaesse@gmail.com>
I think this patch should go to GNOME 2.14 too.
still not commited to 2.14 ! It's a bit late, we can close the bug when commited.
any reason to not commit that change to gnome-2-14 too?
Closing as FIXED, as this was committed much time ago.
*** Bug 343671 has been marked as a duplicate of this bug. ***