From: Georges Basile Stavracas Neto Date: Thu, 16 Jul 2015 13:28:19 +0000 (-0300) Subject: placessidebar: show persistent drives when not showing Other Locations X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~24^2~9041 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3b41daca780e9e83d04dcad43e2fbd5a2ab8c120;p=gtk4.git placessidebar: show persistent drives when not showing Other Locations Previous commits changes the behavior of GtkPlacesSidebar, as it stops handling persistent devices and only manages mounted networks, XDG directories and bookmarks. By radically breaking the previous behavior, we may have trouble since we provide no alternatives to that besides the private widget GtkPlacesView. Fix that by showing the persistent devices when not showing Other Locations item. --- diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index 39291bca75..ee1e5f22af 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -987,7 +987,7 @@ update_places (GtkPlacesSidebar *sidebar) } g_free (identifier); - if (!is_removable_volume (volume)) + if (sidebar->show_other_locations && !is_removable_volume (volume)) { g_object_unref (volume); continue; @@ -1091,7 +1091,7 @@ update_places (GtkPlacesSidebar *sidebar) } g_free (identifier); - if (!is_removable_volume (volume)) + if (sidebar->show_other_locations && !is_removable_volume (volume)) { g_object_unref (volume); continue; @@ -4757,7 +4757,8 @@ gtk_places_sidebar_get_show_enter_location (GtkPlacesSidebar *sidebar) * @show_other_locations: whether to show an item for the Other Locations view * * Sets whether the @sidebar should show an item for the application to show an Other Locations - * view; this is off by default. + * view; this is off by default. When set to %TRUE, persistent devices such as hard drives are + * hidden, otherwise they are shown in the sidebar. * An application may want to turn this on if it implements a way for the user to see and interact * with drives and network servers directly. #GtkPlacesView is the reference implementation for * it.