PlacesSidebar.getLocation

gio.file.File getLocation()

Gets the currently selected location in the sidebar. This can be null when nothing is selected, for example, when [gtk.places_sidebar.PlacesSidebar.setLocation] has been called with a location that is not among the sidebar’s list of places to show.

You can use this function to get the selection in the sidebar. Also, if you connect to the #GtkPlacesSidebar::populate-popup signal, you can use this function to get the location that is being referred to during the callbacks for your menu items.

Returns

a #GFile with the selected location, or

null if nothing is visually selected.