Forum: Ruby-Gnome 2 gio volume changed signal

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ff312ec21b0fd1d07c8708e29df7d242?d=identicon&s=25 Ebru Akagunduz (ebruakagunduz)
on 2014-02-15 17:40
Hi, I work on dynamic volume add-remove issue. I should detect which
device added and which one removed. I add to a hash mounted devices. I
do this:

# to add
@volume = Gio::VolumeMonitor.get
all_volumes = @volume.volumes
v0 = all_volumes.last.mount, v0)

# to remove
@volume.signal_connect("volume-removed") do |vol|
index = devices_hash.values.index(vol)

I realized vol is not any v0. device_hash values doesn't include vol
value. So How can I get correctly which device removed and added?
This topic is locked and can not be replied to.