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 340938 - The volume icon isn't updated when unmounting the volume
The volume icon isn't updated when unmounting the volume
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Sidebar
2.14.x
Other Linux
: High normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 343671 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-05-07 17:09 UTC by Xavier Claessens
Modified: 2008-01-29 01:04 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
proposed patch (3.04 KB, patch)
2006-05-07 18:05 UTC, Xavier Claessens
none Details | Review
better patch (866 bytes, patch)
2006-05-12 12:05 UTC, Xavier Claessens
none Details | Review
update when connect/disconnect drive (1.79 KB, patch)
2006-05-12 17:47 UTC, Xavier Claessens
none Details | Review

Description Xavier Claessens 2006-05-07 17:09:26 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 !
Comment 1 Xavier Claessens 2006-05-07 18:05:49 UTC
Created attachment 64967 [details] [review]
proposed patch
Comment 2 Sebastien Bacher 2006-05-11 15:55:26 UTC
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?
Comment 3 Xavier Claessens 2006-05-12 12:05:25 UTC
Created attachment 65310 [details] [review]
better patch

I think this patch works better and is easier.

Any comment ?
Comment 4 Xavier Claessens 2006-05-12 17:47:37 UTC
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)
Comment 5 Martin Wehner 2006-05-15 22:16:47 UTC
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>
Comment 6 Xavier Claessens 2006-05-22 11:10:30 UTC
I think this patch should go to GNOME 2.14 too.
Comment 7 Xavier Claessens 2006-08-01 19:32:47 UTC
still not commited to 2.14 ! It's a bit late, we can close the bug when commited.
Comment 8 Sebastien Bacher 2006-08-10 11:43:25 UTC
any reason to not commit that change to gnome-2-14 too?
Comment 9 Cosimo Cecchi 2008-01-22 19:26:22 UTC
Closing as FIXED, as this was committed much time ago.
Comment 10 Cosimo Cecchi 2008-01-29 01:04:01 UTC
*** Bug 343671 has been marked as a duplicate of this bug. ***