-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi:

Yes, using "mount_added.connect_after" and
"mount_removed.connect_after" did the trick.

Thanks!

El 13/08/11 14:16, Luca Bruno escribió:
> On Sat, Aug 13, 2011 at 01:53:04PM +0200, rastersoft wrote:
>>
>> Hi all:
>>
>> I need to detect when a new USB disk has been mounted or
>> unmounted. Currently I use VolumeMonitor.get() to acquire a
>> VolumeMonitor instance and list the volumes (using
>> get_root().get_path() to get the mounting path), but I want to do
>> it in a more dynamic fashion, detecting when the user inserts or
>> removes a media and automagically refreshing the list then,
>> instead of forcing the user to click a button to refresh it.
>>
>> The problem is that I don't know how to do it. Drive_changed and
>> volume_changed signals are triggered before the volume is mounted
>> by nautilus, and mount_changed never happens :? If I send the
>> order to mount a volume when I receive its volume_added signal,
>> nautilus returns an error when it tries to mount it, because the
>> operation is already being made.
>>
>> So, how can I detect when a new volume has been mounted?
>
> Try .connect_after()
>

- -- 
Nos leemos
                 RASTER    (Linux user #228804)
[email protected]              http://www.rastersoft.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5GreEACgkQXEZvyfy1ha+iiQCfRs37kuvmZ71I/C6Vur8N72Ns
T/gAoN0MbaGBBeOpBT6RY8ts5FcA/Ipf
=WP+B
-----END PGP SIGNATURE-----

_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to