gi-gtk-3.0.26: Gtk bindings

Copyright Will Thompson Iñaki García Etxebarria and Jonas Platte LGPL-2.1 Iñaki García Etxebarria (garetxe@gmail.com) None Haskell2010

GI.Gtk.Objects.PlacesSidebar

Description

PlacesSidebar 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 FileChooser 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 placesSidebarAddShortcut.

To make use of the places sidebar, an application at least needs to connect to the PlacesSidebar::open-location signal. This is emitted when the user selects in the sidebar a location to open. The application should also call placesSidebarSetLocation 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:

• .sidebar-new-bookmark-row for the 'Add new bookmark' row
• .sidebar-placeholder-row for a row that is a placeholder
• .has-open-popup when a popup is open for a row
Synopsis

# Exported types

newtype PlacesSidebar Source #

Memory-managed wrapper type.

Constructors

 PlacesSidebar (ManagedPtr PlacesSidebar)
Instances
 Source # Instance detailsDefined in GI.Gtk.Objects.PlacesSidebar Methods Source # Instance detailsDefined in GI.Gtk.Objects.PlacesSidebar Source # Instance detailsDefined in GI.Gtk.Objects.PlacesSidebar Source # Instance detailsDefined in GI.Gtk.Objects.PlacesSidebar Source # Instance detailsDefined in GI.Gtk.Objects.PlacesSidebar Source # Instance detailsDefined in GI.Gtk.Objects.PlacesSidebar Source # Instance detailsDefined in GI.Gtk.Objects.PlacesSidebar Source # Instance detailsDefined in GI.Gtk.Objects.PlacesSidebar Source # Instance detailsDefined in GI.Gtk.Objects.PlacesSidebar

class GObject o => IsPlacesSidebar o Source #

Type class for types which can be safely cast to PlacesSidebar, for instance with toPlacesSidebar.

Instances
 Source # Instance detailsDefined in GI.Gtk.Objects.PlacesSidebar Source # Instance detailsDefined in GI.Gtk.Objects.PlacesSidebar

toPlacesSidebar :: (MonadIO m, IsPlacesSidebar o) => o -> m PlacesSidebar Source #

Cast to PlacesSidebar, for types for which this is known to be safe. For general casts, use castTo.

A convenience alias for Nothing :: Maybe PlacesSidebar.

# Methods

## addShortcut

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a, IsFile b) => a sidebar: a places sidebar -> b location: location to add as an application-specific shortcut -> m ()

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.

This function adds the specified location to a special place for immutable shortcuts. The shortcuts are application-specific; they are not shared across applications, and they are not persistent. If this function is called multiple times with different locations, then they are added to the sidebar’s list in the same order as the function is called.

Since: 3.10

## getLocalOnly

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> m Bool Returns: True if the sidebar will only show local files.

Returns the value previously set with placesSidebarSetLocalOnly.

Since: 3.12

## getLocation

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> m (Maybe File) Returns: a File with the selected location, or Nothing if nothing is visually selected.

Gets the currently selected location in the sidebar. This can be Nothing when nothing is selected, for example, when placesSidebarSetLocation 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 PlacesSidebar::populate-popup signal, you can use this function to get the location that is being referred to during the callbacks for your menu items.

Since: 3.10

## getNthBookmark

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> Int32 n: index of the bookmark to query -> m (Maybe File) Returns: The bookmark specified by the index n, or Nothing if no such index exist. Note that the indices start at 0, even though the file chooser starts them with the keyboard shortcut "Alt-1".

This function queries the bookmarks added by the user to the places sidebar, and returns one of them. This function is used by FileChooser to implement the “Alt-1”, “Alt-2”, etc. shortcuts, which activate the cooresponding bookmark.

Since: 3.10

## getOpenFlags

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a PlacesSidebar -> m [PlacesOpenFlags] Returns: the PlacesOpenFlags of sidebar

Gets the open flags.

Since: 3.10

## getShowConnectToServer

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> m Bool Returns: True if the sidebar will display a “Connect to Server” item.

Deprecated: (Since version 3.18)It is recommended to group this functionality with the drives and network location under the new 'Other Location' item

Returns the value previously set with placesSidebarSetShowConnectToServer

## getShowDesktop

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> m Bool Returns: True if the sidebar will display a builtin shortcut to the desktop folder.

Returns the value previously set with placesSidebarSetShowDesktop

Since: 3.10

## getShowEnterLocation

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> m Bool Returns: True if the sidebar will display an “Enter Location” item.

Returns the value previously set with placesSidebarSetShowEnterLocation

Since: 3.14

## getShowOtherLocations

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> m Bool Returns: True if the sidebar will display an “Other Locations” item.

Returns the value previously set with placesSidebarSetShowOtherLocations

Since: 3.18

## getShowRecent

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> m Bool Returns: True if the sidebar will display a builtin shortcut for recent files

Returns the value previously set with placesSidebarSetShowRecent

Since: 3.18

## getShowStarredLocation

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> m Bool Returns: True if the sidebar will display a Starred item.

Returns the value previously set with placesSidebarSetShowStarredLocation

Since: 3.22.26

## getShowTrash

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> m Bool Returns: True if the sidebar will display a “Trash” item.

Returns the value previously set with placesSidebarSetShowTrash

Since: 3.18

## listShortcuts

Arguments

:: (HasCallStack, MonadIO m, IsPlacesSidebar a)
=> a

sidebar: a places sidebar

-> m [File]

Returns: A SList of File of the locations that have been added as application-specific shortcuts with placesSidebarAddShortcut. To free this list, you can use

### C code

g_slist_free_full (list, (GDestroyNotify) g_object_unref);

Gets the list of shortcuts.

Since: 3.10

## new

Arguments

 :: (HasCallStack, MonadIO m) => m PlacesSidebar Returns: a newly created PlacesSidebar

Creates a new PlacesSidebar widget.

The application should connect to at least the PlacesSidebar::open-location signal to be notified when the user makes a selection in the sidebar.

Since: 3.10

## removeShortcut

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a, IsFile b) => a sidebar: a places sidebar -> b location: location to remove -> m ()

Removes an application-specific shortcut that has been previously been inserted with placesSidebarAddShortcut. If the location is not a shortcut in the sidebar, then nothing is done.

Since: 3.10

## setDropTargetsVisible

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a, IsDragContext b) => a sidebar: a places sidebar. -> Bool visible: whether to show the valid targets or not. -> b context: drag context used to ask the source about the action that wants to perform, so hints are more accurate. -> m ()

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.

This needs to be called when the application is aware of an ongoing drag that might target the sidebar. The drop-targets-visible state will be unset automatically if the drag finishes in the GtkPlacesSidebar. You only need to unset the state when the drag ends on some other widget on your application.

Since: 3.18

## setLocalOnly

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> Bool localOnly: whether to show only local files -> m ()

Sets whether the sidebar should only show local files.

Since: 3.12

## setLocation

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a, IsFile b) => a sidebar: a places sidebar -> Maybe b location: location to select, or Nothing for no current path -> m ()

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.

Since: 3.10

## setOpenFlags

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> [PlacesOpenFlags] flags: Bitmask of modes in which the calling application can open locations -> m ()

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.

This function is used to tell the places sidebar about the ways in which the application can open new locations, so that the sidebar can display (or not) the “Open in new tab” and “Open in new window” menu items as appropriate.

When the PlacesSidebar::open-location signal is emitted, its flags argument will be set to one of the flags that was passed in placesSidebarSetOpenFlags.

Passing 0 for flags will cause GTK_PLACES_OPEN_NORMAL to always be sent to callbacks for the “open-location” signal.

Since: 3.10

## setShowConnectToServer

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> Bool showConnectToServer: whether to show an item for the Connect to Server command -> m ()

Deprecated: (Since version 3.18)It is recommended to group this functionality with the drives and network location under the new 'Other Location' item

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.

If you enable this, you should connect to the PlacesSidebar::show-connect-to-server signal.

Since: 3.10

## setShowDesktop

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> Bool showDesktop: whether to show an item for the Desktop folder -> m ()

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.

Since: 3.10

## setShowEnterLocation

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> Bool showEnterLocation: whether to show an item to enter a location -> m ()

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.

If you enable this, you should connect to the PlacesSidebar::show-enter-location signal.

Since: 3.14

## setShowOtherLocations

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> Bool showOtherLocations: whether to show an item for the Other Locations view -> m ()

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.

If you enable this, you should connect to the PlacesSidebar::show-other-locations signal.

Since: 3.18

## setShowRecent

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> Bool showRecent: whether to show an item for recent files -> m ()

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.

Since: 3.18

## setShowStarredLocation

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> Bool showStarredLocation: whether to show an item for Starred files -> m ()

If you enable this, you should connect to the PlacesSidebar::show-starred-location signal.

Since: 3.22.26

## setShowTrash

Arguments

 :: (HasCallStack, MonadIO m, IsPlacesSidebar a) => a sidebar: a places sidebar -> Bool showTrash: whether to show an item for the Trash location -> m ()

Sets whether the sidebar should show an item for the Trash location.

Since: 3.18

# Properties

## localOnly

No description available in the introspection data.

Construct a GValueConstruct with valid value for the “local-only” property. This is rarely needed directly, but it is used by new.

getPlacesSidebarLocalOnly :: (MonadIO m, IsPlacesSidebar o) => o -> m Bool Source #

Get the value of the “local-only” property. When overloading is enabled, this is equivalent to

get placesSidebar #localOnly


setPlacesSidebarLocalOnly :: (MonadIO m, IsPlacesSidebar o) => o -> Bool -> m () Source #

Set the value of the “local-only” property. When overloading is enabled, this is equivalent to

set placesSidebar [ #localOnly := value ]


## location

No description available in the introspection data.

clearPlacesSidebarLocation :: (MonadIO m, IsPlacesSidebar o) => o -> m () Source #

Set the value of the “location” property to Nothing. When overloading is enabled, this is equivalent to

clear #location


constructPlacesSidebarLocation :: (IsPlacesSidebar o, IsFile a) => a -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “location” property. This is rarely needed directly, but it is used by new.

getPlacesSidebarLocation :: (MonadIO m, IsPlacesSidebar o) => o -> m (Maybe File) Source #

Get the value of the “location” property. When overloading is enabled, this is equivalent to

get placesSidebar #location


setPlacesSidebarLocation :: (MonadIO m, IsPlacesSidebar o, IsFile a) => o -> a -> m () Source #

Set the value of the “location” property. When overloading is enabled, this is equivalent to

set placesSidebar [ #location := value ]


## openFlags

No description available in the introspection data.

Construct a GValueConstruct with valid value for the “open-flags” property. This is rarely needed directly, but it is used by new.

getPlacesSidebarOpenFlags :: (MonadIO m, IsPlacesSidebar o) => o -> m [PlacesOpenFlags] Source #

Get the value of the “open-flags” property. When overloading is enabled, this is equivalent to

get placesSidebar #openFlags


setPlacesSidebarOpenFlags :: (MonadIO m, IsPlacesSidebar o) => o -> [PlacesOpenFlags] -> m () Source #

Set the value of the “open-flags” property. When overloading is enabled, this is equivalent to

set placesSidebar [ #openFlags := value ]


## populateAll

If :populate-all is True, the PlacesSidebar::populate-popup signal is also emitted for popovers.

Since: 3.18

Construct a GValueConstruct with valid value for the “populate-all” property. This is rarely needed directly, but it is used by new.

getPlacesSidebarPopulateAll :: (MonadIO m, IsPlacesSidebar o) => o -> m Bool Source #

Get the value of the “populate-all” property. When overloading is enabled, this is equivalent to

get placesSidebar #populateAll


setPlacesSidebarPopulateAll :: (MonadIO m, IsPlacesSidebar o) => o -> Bool -> m () Source #

Set the value of the “populate-all” property. When overloading is enabled, this is equivalent to

set placesSidebar [ #populateAll := value ]


## showConnectToServer

No description available in the introspection data.

Construct a GValueConstruct with valid value for the “show-connect-to-server” property. This is rarely needed directly, but it is used by new.

getPlacesSidebarShowConnectToServer :: (MonadIO m, IsPlacesSidebar o) => o -> m Bool Source #

Get the value of the “show-connect-to-server” property. When overloading is enabled, this is equivalent to

get placesSidebar #showConnectToServer


setPlacesSidebarShowConnectToServer :: (MonadIO m, IsPlacesSidebar o) => o -> Bool -> m () Source #

Set the value of the “show-connect-to-server” property. When overloading is enabled, this is equivalent to

set placesSidebar [ #showConnectToServer := value ]


## showDesktop

No description available in the introspection data.

Construct a GValueConstruct with valid value for the “show-desktop” property. This is rarely needed directly, but it is used by new.

getPlacesSidebarShowDesktop :: (MonadIO m, IsPlacesSidebar o) => o -> m Bool Source #

Get the value of the “show-desktop” property. When overloading is enabled, this is equivalent to

get placesSidebar #showDesktop


setPlacesSidebarShowDesktop :: (MonadIO m, IsPlacesSidebar o) => o -> Bool -> m () Source #

Set the value of the “show-desktop” property. When overloading is enabled, this is equivalent to

set placesSidebar [ #showDesktop := value ]


## showEnterLocation

No description available in the introspection data.

Construct a GValueConstruct with valid value for the “show-enter-location” property. This is rarely needed directly, but it is used by new.

getPlacesSidebarShowEnterLocation :: (MonadIO m, IsPlacesSidebar o) => o -> m Bool Source #

Get the value of the “show-enter-location” property. When overloading is enabled, this is equivalent to

get placesSidebar #showEnterLocation


setPlacesSidebarShowEnterLocation :: (MonadIO m, IsPlacesSidebar o) => o -> Bool -> m () Source #

Set the value of the “show-enter-location” property. When overloading is enabled, this is equivalent to

set placesSidebar [ #showEnterLocation := value ]


## showOtherLocations

No description available in the introspection data.

Construct a GValueConstruct with valid value for the “show-other-locations” property. This is rarely needed directly, but it is used by new.

getPlacesSidebarShowOtherLocations :: (MonadIO m, IsPlacesSidebar o) => o -> m Bool Source #

Get the value of the “show-other-locations” property. When overloading is enabled, this is equivalent to

get placesSidebar #showOtherLocations


setPlacesSidebarShowOtherLocations :: (MonadIO m, IsPlacesSidebar o) => o -> Bool -> m () Source #

Set the value of the “show-other-locations” property. When overloading is enabled, this is equivalent to

set placesSidebar [ #showOtherLocations := value ]


## showRecent

No description available in the introspection data.

Construct a GValueConstruct with valid value for the “show-recent” property. This is rarely needed directly, but it is used by new.

getPlacesSidebarShowRecent :: (MonadIO m, IsPlacesSidebar o) => o -> m Bool Source #

Get the value of the “show-recent” property. When overloading is enabled, this is equivalent to

get placesSidebar #showRecent


setPlacesSidebarShowRecent :: (MonadIO m, IsPlacesSidebar o) => o -> Bool -> m () Source #

Set the value of the “show-recent” property. When overloading is enabled, this is equivalent to

set placesSidebar [ #showRecent := value ]


## showStarredLocation

No description available in the introspection data.

Construct a GValueConstruct with valid value for the “show-starred-location” property. This is rarely needed directly, but it is used by new.

getPlacesSidebarShowStarredLocation :: (MonadIO m, IsPlacesSidebar o) => o -> m Bool Source #

Get the value of the “show-starred-location” property. When overloading is enabled, this is equivalent to

get placesSidebar #showStarredLocation


setPlacesSidebarShowStarredLocation :: (MonadIO m, IsPlacesSidebar o) => o -> Bool -> m () Source #

Set the value of the “show-starred-location” property. When overloading is enabled, this is equivalent to

set placesSidebar [ #showStarredLocation := value ]


## showTrash

No description available in the introspection data.

Construct a GValueConstruct with valid value for the “show-trash” property. This is rarely needed directly, but it is used by new.

getPlacesSidebarShowTrash :: (MonadIO m, IsPlacesSidebar o) => o -> m Bool Source #

Get the value of the “show-trash” property. When overloading is enabled, this is equivalent to

get placesSidebar #showTrash


setPlacesSidebarShowTrash :: (MonadIO m, IsPlacesSidebar o) => o -> Bool -> m () Source #

Set the value of the “show-trash” property. When overloading is enabled, this is equivalent to

set placesSidebar [ #showTrash := value ]


# Signals

## dragActionAsk

type C_PlacesSidebarDragActionAskCallback = Ptr () -> Int32 -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

Arguments

 = Int32 actions: Possible drag actions that need to be asked for. -> IO Int32 Returns: the final drag action that the sidebar should pass to the drag side of the drag-and-drop operation.

The places sidebar emits this signal when it needs to ask the application to pop up a menu to ask the user for which drag action to perform.

Since: 3.10

Connect a signal handler for the “drag-action-ask” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after placesSidebar #dragActionAsk callback


Wrap the callback into a Closure.

Generate a function pointer callable from C code, from a C_PlacesSidebarDragActionAskCallback.

A convenience synonym for Nothing :: Maybe PlacesSidebarDragActionAskCallback.

Connect a signal handler for the “drag-action-ask” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on placesSidebar #dragActionAsk callback


Wrap a PlacesSidebarDragActionAskCallback into a C_PlacesSidebarDragActionAskCallback.

## dragActionRequested

type C_PlacesSidebarDragActionRequestedCallback = Ptr () -> Ptr DragContext -> Ptr File -> Ptr (GList (Ptr File)) -> Ptr () -> IO Int32 Source #

Type for the callback on the (unwrapped) C side.

Arguments

 = DragContext context: DragContext with information about the drag operation -> File destFile: File with the tentative location that is being hovered for a drop -> [File] sourceFileList: List of File that are being dragged -> IO Int32 Returns: The drag action to use, for example, GDK_ACTION_COPY or GDK_ACTION_MOVE, or 0 if no action is allowed here (i.e. drops are not allowed in the specified destFile).

When the user starts a drag-and-drop operation and the sidebar needs to ask the application for which drag action to perform, then the sidebar will emit this signal.

The application can evaluate the context for customary actions, or it can check the type of the files indicated by sourceFileList against the possible actions for the destination destFile.

The drag action to use must be the return value of the signal handler.

Since: 3.10

Connect a signal handler for the “drag-action-requested” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after placesSidebar #dragActionRequested callback


Wrap the callback into a Closure.

Generate a function pointer callable from C code, from a C_PlacesSidebarDragActionRequestedCallback.

A convenience synonym for Nothing :: Maybe PlacesSidebarDragActionRequestedCallback.

Connect a signal handler for the “drag-action-requested” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on placesSidebar #dragActionRequested callback


Wrap a PlacesSidebarDragActionRequestedCallback into a C_PlacesSidebarDragActionRequestedCallback.

## dragPerformDrop

type C_PlacesSidebarDragPerformDropCallback = Ptr () -> Ptr File -> Ptr (GList (Ptr File)) -> Int32 -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

Arguments

 = File destFile: Destination File. -> [File] sourceFileList: List of File that got dropped. -> Int32 action: Drop action to perform. -> IO ()

The places sidebar emits this signal when the user completes a drag-and-drop operation and one of the sidebar's items is the destination. This item is in the destFile, and the sourceFileList has the list of files that are dropped into it and which should be copied/moved/etc. based on the specified action.

Since: 3.10

Connect a signal handler for the “drag-perform-drop” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after placesSidebar #dragPerformDrop callback


Wrap the callback into a Closure.

Generate a function pointer callable from C code, from a C_PlacesSidebarDragPerformDropCallback.

A convenience synonym for Nothing :: Maybe PlacesSidebarDragPerformDropCallback.

Connect a signal handler for the “drag-perform-drop” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on placesSidebar #dragPerformDrop callback


Wrap a PlacesSidebarDragPerformDropCallback into a C_PlacesSidebarDragPerformDropCallback.

## mount

type C_PlacesSidebarMountCallback = Ptr () -> Ptr MountOperation -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

Arguments

 = MountOperation mountOperation: the MountOperation that is going to start. -> IO ()

The places sidebar emits this signal when it starts a new operation because the user clicked on some location that needs mounting. In this way the application using the PlacesSidebar can track the progress of the operation and, for example, show a notification.

Since: 3.20

Connect a signal handler for the “mount” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after placesSidebar #mount callback


Wrap the callback into a Closure.

Generate a function pointer callable from C code, from a C_PlacesSidebarMountCallback.

A convenience synonym for Nothing :: Maybe PlacesSidebarMountCallback.

Connect a signal handler for the “mount” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on placesSidebar #mount callback


Wrap a PlacesSidebarMountCallback into a C_PlacesSidebarMountCallback.

## openLocation

type C_PlacesSidebarOpenLocationCallback = Ptr () -> Ptr File -> CUInt -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

Arguments

 = File location: File to which the caller should switch. -> [PlacesOpenFlags] openFlags: a single value from PlacesOpenFlags specifying how the location should be opened. -> IO ()

The places sidebar emits this signal when the user selects a location in it. The calling application should display the contents of that location; for example, a file manager should show a list of files in the specified location.

Since: 3.10

Connect a signal handler for the “open-location” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after placesSidebar #openLocation callback


Wrap the callback into a Closure.

Generate a function pointer callable from C code, from a C_PlacesSidebarOpenLocationCallback.

A convenience synonym for Nothing :: Maybe PlacesSidebarOpenLocationCallback.

Connect a signal handler for the “open-location” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on placesSidebar #openLocation callback


Wrap a PlacesSidebarOpenLocationCallback into a C_PlacesSidebarOpenLocationCallback.

## populatePopup

type C_PlacesSidebarPopulatePopupCallback = Ptr () -> Ptr Widget -> Ptr File -> Ptr Volume -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

Arguments

 = Widget container: a Menu or another Container -> Maybe File selectedItem: File with the item to which the popup should refer, or Nothing in the case of a selectedVolume. -> Maybe Volume selectedVolume: Volume if the selected item is a volume, or Nothing if it is a file. -> IO ()

The places sidebar emits this signal when the user invokes a contextual popup on one of its items. In the signal handler, the application may add extra items to the menu as appropriate. For example, a file manager may want to add a "Properties" command to the menu.

It is not necessary to store the selectedItem for each menu item; during their callbacks, the application can use placesSidebarGetLocation to get the file to which the item refers.

The selectedItem argument may be Nothing in case the selection refers to a volume. In this case, selectedVolume will be non-Nothing. In this case, the calling application will have to objectRef the selectedVolume and keep it around to use it in the callback.

The container and all its contents are destroyed after the user dismisses the popup. The popup is re-created (and thus, this signal is emitted) every time the user activates the contextual menu.

Before 3.18, the container always was a Menu, and you were expected to add your items as GtkMenuItems. Since 3.18, the popup may be implemented as a Popover, in which case container will be something else, e.g. a Box, to which you may add GtkModelButtons or other widgets, such as GtkEntries, GtkSpinButtons, etc. If your application can deal with this situation, you can set PlacesSidebar::populate-all to True to request that this signal is emitted for populating popovers as well.

Since: 3.10

Connect a signal handler for the “populate-popup” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after placesSidebar #populatePopup callback


Wrap the callback into a Closure.

Generate a function pointer callable from C code, from a C_PlacesSidebarPopulatePopupCallback.

A convenience synonym for Nothing :: Maybe PlacesSidebarPopulatePopupCallback.

Connect a signal handler for the “populate-popup” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on placesSidebar #populatePopup callback


Wrap a PlacesSidebarPopulatePopupCallback into a C_PlacesSidebarPopulatePopupCallback.

## showConnectToServer

type C_PlacesSidebarShowConnectToServerCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

Deprecated: (Since version 3.18)use the PlacesSidebar::show-other-locations signal to connect to network servers.

The places sidebar emits this signal when it needs the calling application to present an way to connect directly to a network server. For example, the application may bring up a dialog box asking for a URL like "sftp://ftp.example.com". It is up to the application to create the corresponding mount by using, for example, fileMountEnclosingVolume.

Connect a signal handler for the “show-connect-to-server” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after placesSidebar #showConnectToServer callback


Wrap the callback into a Closure.

Generate a function pointer callable from C code, from a C_PlacesSidebarShowConnectToServerCallback.

A convenience synonym for Nothing :: Maybe PlacesSidebarShowConnectToServerCallback.

Connect a signal handler for the “show-connect-to-server” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on placesSidebar #showConnectToServer callback


Wrap a PlacesSidebarShowConnectToServerCallback into a C_PlacesSidebarShowConnectToServerCallback.

## showEnterLocation

type C_PlacesSidebarShowEnterLocationCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

The places sidebar emits this signal when it needs the calling application to present an way to directly enter a location. For example, the application may bring up a dialog box asking for a URL like "http://http.example.com".

Since: 3.14

Connect a signal handler for the “show-enter-location” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after placesSidebar #showEnterLocation callback


Wrap the callback into a Closure.

Generate a function pointer callable from C code, from a C_PlacesSidebarShowEnterLocationCallback.

A convenience synonym for Nothing :: Maybe PlacesSidebarShowEnterLocationCallback.

Connect a signal handler for the “show-enter-location” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on placesSidebar #showEnterLocation callback


Wrap a PlacesSidebarShowEnterLocationCallback into a C_PlacesSidebarShowEnterLocationCallback.

## showErrorMessage

type C_PlacesSidebarShowErrorMessageCallback = Ptr () -> CString -> CString -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

Arguments

 = Text primary: primary message with a summary of the error to show. -> Text secondary: secondary message with details of the error to show. -> IO ()

The places sidebar emits this signal when it needs the calling application to present an error message. Most of these messages refer to mounting or unmounting media, for example, when a drive cannot be started for some reason.

Since: 3.10

Connect a signal handler for the “show-error-message” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after placesSidebar #showErrorMessage callback


Wrap the callback into a Closure.

Generate a function pointer callable from C code, from a C_PlacesSidebarShowErrorMessageCallback.

A convenience synonym for Nothing :: Maybe PlacesSidebarShowErrorMessageCallback.

Connect a signal handler for the “show-error-message” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on placesSidebar #showErrorMessage callback


Wrap a PlacesSidebarShowErrorMessageCallback into a C_PlacesSidebarShowErrorMessageCallback.

## showOtherLocations

type C_PlacesSidebarShowOtherLocationsCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

Deprecated: (Since version 3.20)use the PlacesSidebar::show-other-locations-with-flagswhich includes the open flags in order to allow the user to specify to openin a new tab or window, in a similar way than PlacesSidebar::open-location

The places sidebar emits this signal when it needs the calling application to present a way to show other locations e.g. drives and network access points. For example, the application may bring up a page showing persistent volumes and discovered network addresses.

Since: 3.18

Connect a signal handler for the “show-other-locations” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after placesSidebar #showOtherLocations callback


Wrap the callback into a Closure.

Generate a function pointer callable from C code, from a C_PlacesSidebarShowOtherLocationsCallback.

A convenience synonym for Nothing :: Maybe PlacesSidebarShowOtherLocationsCallback.

Connect a signal handler for the “show-other-locations” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on placesSidebar #showOtherLocations callback


Wrap a PlacesSidebarShowOtherLocationsCallback into a C_PlacesSidebarShowOtherLocationsCallback.

## showOtherLocationsWithFlags

type C_PlacesSidebarShowOtherLocationsWithFlagsCallback = Ptr () -> CUInt -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

Arguments

 = [PlacesOpenFlags] openFlags: a single value from PlacesOpenFlags specifying how it should be opened. -> IO ()

The places sidebar emits this signal when it needs the calling application to present a way to show other locations e.g. drives and network access points. For example, the application may bring up a page showing persistent volumes and discovered network addresses.

Since: 3.20

Connect a signal handler for the “show-other-locations-with-flags” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after placesSidebar #showOtherLocationsWithFlags callback


Wrap the callback into a Closure.

Generate a function pointer callable from C code, from a C_PlacesSidebarShowOtherLocationsWithFlagsCallback.

A convenience synonym for Nothing :: Maybe PlacesSidebarShowOtherLocationsWithFlagsCallback.

Connect a signal handler for the “show-other-locations-with-flags” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on placesSidebar #showOtherLocationsWithFlags callback


Wrap a PlacesSidebarShowOtherLocationsWithFlagsCallback into a C_PlacesSidebarShowOtherLocationsWithFlagsCallback.

## showStarredLocation

type C_PlacesSidebarShowStarredLocationCallback = Ptr () -> CUInt -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

Arguments

 = [PlacesOpenFlags] openFlags: a single value from PlacesOpenFlags specifying how the starred file should be opened. -> IO ()

The places sidebar emits this signal when it needs the calling application to present a way to show the starred files. In GNOME, starred files are implemented by setting the nao:predefined-tag-favorite tag in the tracker database.

Since: 3.22.26

Connect a signal handler for the “show-starred-location” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after placesSidebar #showStarredLocation callback


Wrap the callback into a Closure.

Generate a function pointer callable from C code, from a C_PlacesSidebarShowStarredLocationCallback.

A convenience synonym for Nothing :: Maybe PlacesSidebarShowStarredLocationCallback.

Connect a signal handler for the “show-starred-location” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on placesSidebar #showStarredLocation callback


Wrap a PlacesSidebarShowStarredLocationCallback into a C_PlacesSidebarShowStarredLocationCallback.

## unmount

type C_PlacesSidebarUnmountCallback = Ptr () -> Ptr MountOperation -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

Arguments

 = MountOperation mountOperation: the MountOperation that is going to start. -> IO ()

The places sidebar emits this signal when it starts a new operation because the user for example ejected some drive or unmounted a mount. In this way the application using the PlacesSidebar can track the progress of the operation and, for example, show a notification.

Since: 3.20

Connect a signal handler for the “unmount” signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after placesSidebar #unmount callback


Wrap the callback into a Closure.

Generate a function pointer callable from C code, from a C_PlacesSidebarUnmountCallback.

A convenience synonym for Nothing :: Maybe PlacesSidebarUnmountCallback.

Connect a signal handler for the “unmount” signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on placesSidebar #unmount callback


Wrap a PlacesSidebarUnmountCallback into a C_PlacesSidebarUnmountCallback.