Re : volume-unmounted signal on GnomeVFSDrive



sorry for late repley,

Ok, the problem is that gnome_vfs_volume_is_mounted() says FALSE when
gnome_vfs_drive_is_mounted() says TRUE. So the volume knows that it is
unmounted but his drive doesn't know it yet... I think it's
inconsitant and that should be fixed.

2006/6/12, Alexander Larsson <alexl redhat com>:
On Sun, 2006-06-04 at 23:19 +0200, Xavier Claessens wrote:
> Hello,
>
> As I understand the "volume-unmounted" signal is emitted before the
> volume unmounted is really removed from the drive. So in the callback,
> if we run gnome_vfs_drive_get_mounted_volumes() it will return a GList
> still containing the unmounted GnomeVFSVolume.
>
> I think it should be very useful to have a callback after everything is
> done. For example in nautilus'places sidebar when we get the
> "volume-unmounted" callback we can't update the sidebar yet because the
> drive still has the volume connected... so we add a g_idle_add() to have
> a callback after everything is done and then we can update the sidebar.
>
> I think that's more a workaround than a real solution. What about adding
> in GnomeVFSDrive and GnomeVFSVolumeMonitor a "volume-post-unmount"
> callback (we already have a "volume-pre-unmount" cb) ?
>
> I you are OK with the idea I can make a patch.

You could just look at gnome_vfs_volume_is_mounted() in the
volume-unmounted call and ignore things that are not mounted. We do set
is_mounted before emitting the signal for things like this.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc
                   alexl redhat com    alla lysator liu se
He's a deeply religious umbrella-wielding astronaut looking for a cure to
the
poison coursing through his veins. She's a green-fingered snooty femme
fatale
who can talk to animals. They fight crime!





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]