Applications may want to present some folders in the places sidebar if they could be immediately useful to users. For example, a drawing program could add a “/usr/share/clipart” location when the sidebar is being used in an “Insert Clipart” dialog box.
Connect to DragActionAsk signal.
Connect to DragActionRequested signal.
Connect to DragPerformDrop signal.
Connect to Mount signal.
Connect to OpenLocation signal.
Connect to PopulatePopup signal.
Connect to ShowConnectToServer signal.
Connect to ShowEnterLocation signal.
Connect to ShowErrorMessage signal.
Connect to ShowOtherLocations signal.
Connect to ShowOtherLocationsWithFlags signal.
Connect to ShowStarredLocation signal.
Connect to Unmount signal.
Returns the value previously set with gtk.places_sidebar.PlacesSidebar.setLocalOnly.
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.
This function queries the bookmarks added by the user to the places sidebar, and returns one of them. This function is used by #GtkFileChooser to implement the “Alt-1”, “Alt-2”, etc. shortcuts, which activate the cooresponding bookmark.
Gets the open flags.
Returns the value previously set with gtk.places_sidebar.PlacesSidebar.setShowConnectToServer
Returns the value previously set with gtk.places_sidebar.PlacesSidebar.setShowDesktop
Returns the value previously set with gtk.places_sidebar.PlacesSidebar.setShowEnterLocation
Returns the value previously set with gtk.places_sidebar.PlacesSidebar.setShowOtherLocations
Returns the value previously set with gtk.places_sidebar.PlacesSidebar.setShowRecent
Returns the value previously set with gtk.places_sidebar.PlacesSidebar.setShowStarredLocation
Returns the value previously set with gtk.places_sidebar.PlacesSidebar.setShowTrash
Gets the list of shortcuts.
Removes an application-specific shortcut that has been previously been inserted with gtk.places_sidebar.PlacesSidebar.addShortcut. If the location is not a shortcut in the sidebar, then nothing is done.
Returns this, for use in with statements.
Make the GtkPlacesSidebar show drop targets, so it can show the available drop targets and a "new bookmark" row. This improves the Drag-and-Drop experience of the user and allows applications to show all available drop targets at once.
Sets whether the sidebar should only show local files.
Sets the location that is being shown in the widgets surrounding the sidebar, for example, in a folder view in a file manager. In turn, the sidebar will highlight that location if it is being shown in the list of places, or it will unhighlight everything if the location is not among the places in the list.
Sets the way in which the calling application can open new locations from the places sidebar. For example, some applications only open locations “directly” into their main view, while others may support opening locations in a new notebook tab or a new window.
Sets whether the sidebar should show an item for connecting to a network server; this is off by default. An application may want to turn this on if it implements a way for the user to connect to network servers directly.
Sets whether the sidebar should show an item for the Desktop folder. The default value for this option is determined by the desktop environment and the user’s configuration, but this function can be used to override it on a per-application basis.
Sets whether the sidebar should show an item for entering a location; this is off by default. An application may want to turn this on if manually entering URLs is an expected user action.
Sets whether the sidebar should show an item for the application to show an Other Locations 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.
Sets whether the sidebar should show an item for recent files. The default value for this option is determined by the desktop environment, but this function can be used to override it on a per-application basis.
If you enable this, you should connect to the #GtkPlacesSidebar::show-starred-location signal.
Sets whether the sidebar should show an item for the Trash location.
Get populateAll property.
Set populateAll property.
Get builder for gtk.places_sidebar.PlacesSidebar
Returns this, for use in with statements.
Get builder for gtk.scrolled_window.ScrolledWindow
Get kineticScrolling property.
Set kineticScrolling property.
Get maxContentHeight property.
Set maxContentHeight property.
Get maxContentWidth property.
Set maxContentWidth property.
Get minContentHeight property.
Set minContentHeight property.
Get minContentWidth property.
Set minContentWidth property.
Get overlayScrolling property.
Set overlayScrolling property.
Get propagateNaturalHeight property.
Set propagateNaturalHeight property.
Get propagateNaturalWidth property.
Set propagateNaturalWidth property.
Get windowPlacementSet property.
Set windowPlacementSet property.
Used to add children without native scrolling capabilities. This is simply a convenience function; it is equivalent to adding the unscrollable child to a viewport, then adding the viewport to the scrolled window. If a child has native scrolling, use gtk.container.Container.add instead of this function.
Return whether button presses are captured during kinetic scrolling. See gtk.scrolled_window.ScrolledWindow.setCaptureButtonPress.
Returns the horizontal scrollbar’s adjustment, used to connect the horizontal scrollbar to the child widget’s horizontal scroll functionality.
Returns the horizontal scrollbar of scrolled_window.
Returns the specified kinetic scrolling behavior.
Returns the maximum content height set.
Returns the maximum content width set.
Gets the minimal content height of scrolled_window, or -1 if not set.
Gets the minimum content width of scrolled_window, or -1 if not set.
Returns whether overlay scrolling is enabled for this scrolled window.
Gets the placement of the contents with respect to the scrollbars for the scrolled window. See gtk.scrolled_window.ScrolledWindow.setPlacement.
Retrieves the current policy values for the horizontal and vertical scrollbars. See gtk.scrolled_window.ScrolledWindow.setPolicy.
Reports whether the natural height of the child will be calculated and propagated through the scrolled window’s requested natural height.
Reports whether the natural width of the child will be calculated and propagated through the scrolled window’s requested natural width.
Gets the shadow type of the scrolled window. See gtk.scrolled_window.ScrolledWindow.setShadowType.
Returns the vertical scrollbar’s adjustment, used to connect the vertical scrollbar to the child widget’s vertical scroll functionality.
Returns the vertical scrollbar of scrolled_window.
Changes the behaviour of scrolled_window with regard to the initial event that possibly starts kinetic scrolling. When capture_button_press is set to true, the event is captured by the scrolled window, and then later replayed if it is meant to go to the child widget.
Sets the #GtkAdjustment for the horizontal scrollbar.
Turns kinetic scrolling on or off. Kinetic scrolling only applies to devices with source gdk.types.InputSource.Touchscreen.
Sets the maximum height that scrolled_window should keep visible. The scrolled_window will grow up to this height before it starts scrolling the content.
Sets the maximum width that scrolled_window should keep visible. The scrolled_window will grow up to this width before it starts scrolling the content.
Sets the minimum height that scrolled_window should keep visible. Note that this can and (usually will) be smaller than the minimum size of the content.
Sets the minimum width that scrolled_window should keep visible. Note that this can and (usually will) be smaller than the minimum size of the content.
Enables or disables overlay scrolling for this scrolled window.
Sets the placement of the contents with respect to the scrollbars for the scrolled window.
Sets the scrollbar policy for the horizontal and vertical scrollbars.
Sets whether the natural height of the child should be calculated and propagated through the scrolled window’s requested natural height.
Sets whether the natural width of the child should be calculated and propagated through the scrolled window’s requested natural width.
Changes the type of shadow drawn around the contents of scrolled_window.
Sets the #GtkAdjustment for the vertical scrollbar.
Unsets the placement of the contents with respect to the scrollbars for the scrolled window. If no window placement is set for a scrolled window, it defaults to gtk.types.CornerType.TopLeft.
Connect to EdgeOvershot signal.
Connect to EdgeReached signal.
Connect to MoveFocusOut signal.
Connect to ScrollChild signal.
#GtkPlacesSidebar is a widget that displays a list of frequently-used places in the file system: the user’s home directory, the user’s bookmarks, and volumes and drives. This widget is used as a sidebar in #GtkFileChooser and may be used by file managers and similar programs.
The places sidebar displays drives and volumes, and will automatically mount or unmount them when the user selects them.
Applications can hook to various signals in the places sidebar to customize its behavior. For example, they can add extra commands to the context menu of the sidebar.
While bookmarks are completely in control of the user, the places sidebar also allows individual applications to provide extra shortcut folders that are unique to each application. For example, a Paint program may want to add a shortcut for a Clipart folder. You can do this with gtk.places_sidebar.PlacesSidebar.addShortcut.
To make use of the places sidebar, an application at least needs to connect to the #GtkPlacesSidebar::open-location signal. This is emitted when the user selects in the sidebar a location to open. The application should also call gtk.places_sidebar.PlacesSidebar.setLocation when it changes the currently-viewed location.
CSS nodes
GtkPlacesSidebar uses a single CSS node with name placessidebar and style class .sidebar.
Among the children of the places sidebar, the following style classes can be used: