Method

GtkPlacesSidebarget_location

since: 3.10

Declaration [src]

GFile*
gtk_places_sidebar_get_location (
  GtkPlacesSidebar* sidebar
)

Description [src]

Gets the currently selected location in the sidebar. This can be NULL when nothing is selected, for example, when gtk_places_sidebar_set_location() 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.

Available since: 3.10

Return value

Type: GFile

A GFile with the selected location, or NULL if nothing is visually selected.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be NULL.