forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
b274a2656d
commit
3b41daca78
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user