GUnixVolumeMonitor: Make use of new g_list_copy_deep()

This commit is contained in:
Colin Walters 2012-06-21 18:32:06 -04:00
parent 2fd6eb7e1c
commit aae1633d0f

View File

@ -105,28 +105,20 @@ static GList *
get_mounts (GVolumeMonitor *volume_monitor)
{
GUnixVolumeMonitor *monitor;
GList *l;
monitor = G_UNIX_VOLUME_MONITOR (volume_monitor);
l = g_list_copy (monitor->mounts);
g_list_foreach (l, (GFunc)g_object_ref, NULL);
return l;
return g_list_copy_deep (monitor->mounts, (GCopyFunc) g_object_ref, NULL);
}
static GList *
get_volumes (GVolumeMonitor *volume_monitor)
{
GUnixVolumeMonitor *monitor;
GList *l;
monitor = G_UNIX_VOLUME_MONITOR (volume_monitor);
l = g_list_copy (monitor->volumes);
g_list_foreach (l, (GFunc)g_object_ref, NULL);
return l;
return g_list_copy_deep (monitor->volumes, (GCopyFunc) g_object_ref, NULL);
}
static GList *