Commit d1a9ba2c authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Merge branch 'gtk-3-24-gtkplacessidebar-add-loop-devices' into 'gtk-3-24'

gtkplacessidebar: Add loop devices

See merge request GNOME/gtk!722
parents 7af43fb9 3f77da62
...@@ -1287,10 +1287,13 @@ update_places (GtkPlacesSidebar *sidebar) ...@@ -1287,10 +1287,13 @@ update_places (GtkPlacesSidebar *sidebar)
} }
g_list_free_full (drives, g_object_unref); g_list_free_full (drives, g_object_unref);
/* add all network volumes that is not associated with a drive */ /* add all network volumes that are not associated with a drive, and
* loop devices
*/
volumes = g_volume_monitor_get_volumes (sidebar->volume_monitor); volumes = g_volume_monitor_get_volumes (sidebar->volume_monitor);
for (l = volumes; l != NULL; l = l->next) for (l = volumes; l != NULL; l = l->next)
{ {
gboolean is_loop = FALSE;
volume = l->data; volume = l->data;
drive = g_volume_get_drive (volume); drive = g_volume_get_drive (volume);
if (drive != NULL) if (drive != NULL)
...@@ -1308,9 +1311,13 @@ update_places (GtkPlacesSidebar *sidebar) ...@@ -1308,9 +1311,13 @@ update_places (GtkPlacesSidebar *sidebar)
network_volumes = g_list_prepend (network_volumes, volume); network_volumes = g_list_prepend (network_volumes, volume);
continue; continue;
} }
else if (g_strcmp0 (identifier, "loop") == 0)
is_loop = TRUE;
g_free (identifier); g_free (identifier);
if (sidebar->show_other_locations && !is_external_volume (volume)) if (sidebar->show_other_locations &&
!is_external_volume (volume) &&
!is_loop)
{ {
g_object_unref (volume); g_object_unref (volume);
continue; continue;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment