mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-19 07:08:54 +02:00
GUnixVolumeMonitor: Make use of new g_list_copy_deep()
This commit is contained in:
@@ -105,28 +105,20 @@ static GList *
|
|||||||
get_mounts (GVolumeMonitor *volume_monitor)
|
get_mounts (GVolumeMonitor *volume_monitor)
|
||||||
{
|
{
|
||||||
GUnixVolumeMonitor *monitor;
|
GUnixVolumeMonitor *monitor;
|
||||||
GList *l;
|
|
||||||
|
|
||||||
monitor = G_UNIX_VOLUME_MONITOR (volume_monitor);
|
monitor = G_UNIX_VOLUME_MONITOR (volume_monitor);
|
||||||
|
|
||||||
l = g_list_copy (monitor->mounts);
|
return g_list_copy_deep (monitor->mounts, (GCopyFunc) g_object_ref, NULL);
|
||||||
g_list_foreach (l, (GFunc)g_object_ref, NULL);
|
|
||||||
|
|
||||||
return l;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GList *
|
static GList *
|
||||||
get_volumes (GVolumeMonitor *volume_monitor)
|
get_volumes (GVolumeMonitor *volume_monitor)
|
||||||
{
|
{
|
||||||
GUnixVolumeMonitor *monitor;
|
GUnixVolumeMonitor *monitor;
|
||||||
GList *l;
|
|
||||||
|
|
||||||
monitor = G_UNIX_VOLUME_MONITOR (volume_monitor);
|
monitor = G_UNIX_VOLUME_MONITOR (volume_monitor);
|
||||||
|
|
||||||
l = g_list_copy (monitor->volumes);
|
return g_list_copy_deep (monitor->volumes, (GCopyFunc) g_object_ref, NULL);
|
||||||
g_list_foreach (l, (GFunc)g_object_ref, NULL);
|
|
||||||
|
|
||||||
return l;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GList *
|
static GList *
|
||||||
|
Reference in New Issue
Block a user