From 3b41daca780e9e83d04dcad43e2fbd5a2ab8c120 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Thu, 16 Jul 2015 10:28:19 -0300 Subject: [PATCH] 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. --- gtk/gtkplacessidebar.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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. -- 2.30.2