Gtk2HsContentsIndex
Graphics.UI.Gtk.Selectors.FileChooser
Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Detail
File Names and Encodings
Adding a Preview Widget
Adding Extra Widgets
Key Bindings
Class Hierarchy
Types
Methods
Attributes
Signals
Description

File chooser interface used by FileChooserWidget and FileChooserDialog

  • Module available since Gtk+ version 2.4
Synopsis
data FileChooser
class GObjectClass o => FileChooserClass o
castToFileChooser :: GObjectClass obj => obj -> FileChooser
data FileChooserAction
= FileChooserActionOpen
| FileChooserActionSave
| FileChooserActionSelectFolder
| FileChooserActionCreateFolder
fileChooserSetAction :: FileChooserClass self => self -> FileChooserAction -> IO ()
fileChooserGetAction :: FileChooserClass self => self -> IO FileChooserAction
fileChooserSetLocalOnly :: FileChooserClass self => self -> Bool -> IO ()
fileChooserGetLocalOnly :: FileChooserClass self => self -> IO Bool
fileChooserSetSelectMultiple :: FileChooserClass self => self -> Bool -> IO ()
fileChooserGetSelectMultiple :: FileChooserClass self => self -> IO Bool
fileChooserSetCurrentName :: FileChooserClass self => self -> FilePath -> IO ()
fileChooserGetFilename :: FileChooserClass self => self -> IO (Maybe FilePath)
fileChooserSetFilename :: FileChooserClass self => self -> FilePath -> IO Bool
fileChooserSelectFilename :: FileChooserClass self => self -> FilePath -> IO Bool
fileChooserUnselectFilename :: FileChooserClass self => self -> FilePath -> IO ()
fileChooserSelectAll :: FileChooserClass self => self -> IO ()
fileChooserUnselectAll :: FileChooserClass self => self -> IO ()
fileChooserGetFilenames :: FileChooserClass self => self -> IO [FilePath]
fileChooserSetCurrentFolder :: FileChooserClass self => self -> FilePath -> IO Bool
fileChooserGetCurrentFolder :: FileChooserClass self => self -> IO (Maybe FilePath)
fileChooserGetURI :: FileChooserClass self => self -> IO (Maybe String)
fileChooserSetURI :: FileChooserClass self => self -> String -> IO Bool
fileChooserSelectURI :: FileChooserClass self => self -> String -> IO Bool
fileChooserUnselectURI :: FileChooserClass self => self -> String -> IO ()
fileChooserGetURIs :: FileChooserClass self => self -> IO [String]
fileChooserSetCurrentFolderURI :: FileChooserClass self => self -> String -> IO Bool
fileChooserGetCurrentFolderURI :: FileChooserClass self => self -> IO String
fileChooserSetPreviewWidget :: (FileChooserClass self, WidgetClass previewWidget) => self -> previewWidget -> IO ()
fileChooserGetPreviewWidget :: FileChooserClass self => self -> IO (Maybe Widget)
fileChooserSetPreviewWidgetActive :: FileChooserClass self => self -> Bool -> IO ()
fileChooserGetPreviewWidgetActive :: FileChooserClass self => self -> IO Bool
fileChooserSetUsePreviewLabel :: FileChooserClass self => self -> Bool -> IO ()
fileChooserGetUsePreviewLabel :: FileChooserClass self => self -> IO Bool
fileChooserGetPreviewFilename :: FileChooserClass self => self -> IO (Maybe FilePath)
fileChooserGetPreviewURI :: FileChooserClass self => self -> IO (Maybe String)
fileChooserSetExtraWidget :: (FileChooserClass self, WidgetClass extraWidget) => self -> extraWidget -> IO ()
fileChooserGetExtraWidget :: FileChooserClass self => self -> IO (Maybe Widget)
fileChooserAddFilter :: FileChooserClass self => self -> FileFilter -> IO ()
fileChooserRemoveFilter :: FileChooserClass self => self -> FileFilter -> IO ()
fileChooserListFilters :: FileChooserClass self => self -> IO [FileFilter]
fileChooserSetFilter :: FileChooserClass self => self -> FileFilter -> IO ()
fileChooserGetFilter :: FileChooserClass self => self -> IO (Maybe FileFilter)
fileChooserAddShortcutFolder :: FileChooserClass self => self -> FilePath -> IO ()
fileChooserRemoveShortcutFolder :: FileChooserClass self => self -> FilePath -> IO ()
fileChooserListShortcutFolders :: FileChooserClass self => self -> IO [String]
fileChooserAddShortcutFolderURI :: FileChooserClass self => self -> String -> IO ()
fileChooserRemoveShortcutFolderURI :: FileChooserClass self => self -> String -> IO ()
fileChooserListShortcutFolderURIs :: FileChooserClass self => self -> IO [String]
fileChooserErrorDomain :: GErrorDomain
data FileChooserError
= FileChooserErrorNonexistent
| FileChooserErrorBadFilename
fileChooserSetShowHidden :: FileChooserClass self => self -> Bool -> IO ()
fileChooserGetShowHidden :: FileChooserClass self => self -> IO Bool
fileChooserUsePreviewLabel :: FileChooserClass self => Attr self Bool
fileChooserShowHidden :: FileChooserClass self => Attr self Bool
fileChooserSelectMultiple :: FileChooserClass self => Attr self Bool
fileChooserPreviewWidgetActive :: FileChooserClass self => Attr self Bool
fileChooserPreviewWidget :: (FileChooserClass self, WidgetClass previewWidget) => ReadWriteAttr self (Maybe Widget) previewWidget
fileChooserLocalOnly :: FileChooserClass self => Attr self Bool
fileChooserFilter :: FileChooserClass self => ReadWriteAttr self (Maybe FileFilter) FileFilter
fileChooserExtraWidget :: (FileChooserClass self, WidgetClass extraWidget) => ReadWriteAttr self (Maybe Widget) extraWidget
fileChooserAction :: FileChooserClass self => Attr self FileChooserAction
onCurrentFolderChanged :: FileChooserClass self => self -> IO () -> IO (ConnectId self)
afterCurrentFolderChanged :: FileChooserClass self => self -> IO () -> IO (ConnectId self)
onFileActivated :: FileChooserClass self => self -> IO () -> IO (ConnectId self)
afterFileActivated :: FileChooserClass self => self -> IO () -> IO (ConnectId self)
onUpdatePreview :: FileChooserClass self => self -> IO () -> IO (ConnectId self)
afterUpdatePreview :: FileChooserClass self => self -> IO () -> IO (ConnectId self)
Detail
FileChooser is an interface that can be implemented by file selection widgets. In Gtk+, the main objects that implement this interface are FileChooserWidget, FileChooserDialog, and FileChooserButton. You do not need to write an object that implements the FileChooser interface unless you are trying to adapt an existing file selector to expose a standard programming interface.
File Names and Encodings
When the user is finished selecting files in a FileChooser, your program can get the selected names either as filenames or as URIs. For URIs, the normal escaping rules are applied if the URI contains non-ASCII characters. However, filenames are always returned in the character set specified by the G_FILENAME_ENCODING environment variable. Please see the Glib documentation for more details about this variable.
Adding a Preview Widget

You can add a custom preview widget to a file chooser and then get notification about when the preview needs to be updated. To install a preview widget, use fileChooserSetPreviewWidget. Then, connect to the updatePreview signal to get notified when you need to update the contents of the preview.

Your callback should use fileChooserGetPreviewFilename to see what needs previewing. Once you have generated the preview for the corresponding file, you must call fileChooserSetPreviewWidgetActive with a boolean flag that indicates whether your callback could successfully generate a preview.

Adding Extra Widgets
You can add extra widgets to a file chooser to provide options that are not present in the default design. For example, you can add a toggle button to give the user the option to open a file in read-only mode. You can use fileChooserSetExtraWidget to insert additional widgets in a file chooser.
Key Bindings

Internally, Gtk+ implements a file chooser's graphical user interface with the private GtkFileChooserDefaultClass. This widget has several key bindings and their associated signals. This section describes the available key binding signals.

  • GtkFileChooser key binding example

The default keys that activate the key-binding signals in GtkFileChooserDefaultClass are as follows:

Signal name
Key
location-popup
Control-L
up-folder
Alt-Up
down-folder
Alt-Down
home-folder
Alt-Home

To change these defaults to something else, you could include the following fragment in your .gtkrc-2.0 file:

 binding "my-own-gtkfilechooser-bindings" {
 	bind "AltShiftl" {
 		"location-popup" ()
 	}
 	bind "AltShiftUp" {
 		"up-folder" ()
 	}
 	bind "AltShiftDown" {
 		"down-folder" ()
 	}
 	bind "AltShiftHome" {
 		"home-folder-folder" ()
 	}
 }
 
 class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings"
 	
Class Hierarchy
 |  GInterface
 |   +----FileChooser
 
Types
data FileChooser
show/hide Instances
class GObjectClass o => FileChooserClass o
show/hide Instances
castToFileChooser :: GObjectClass obj => obj -> FileChooser
data FileChooserAction
Constructors
FileChooserActionOpen
FileChooserActionSave
FileChooserActionSelectFolder
FileChooserActionCreateFolder
show/hide Instances
Methods
fileChooserSetAction
:: FileChooserClass self
=> self
-> FileChooserActionaction - the action that the file selector is performing
-> IO ()
Sets the type of operation that the chooser is performing; the user interface is adapted to suit the selected action. For example, an option to create a new folder might be shown if the action is FileChooserActionSave but not if the action is FileChooserActionOpen.
fileChooserGetAction :: FileChooserClass self => self -> IO FileChooserAction
Gets the type of operation that the file chooser is performing; see fileChooserSetAction.
fileChooserSetLocalOnly :: FileChooserClass self => self -> Bool -> IO ()
Sets whether only local files can be selected in the file selector. If localOnly is True (the default), then the selected file are files are guaranteed to be accessible through the operating systems native file file system and therefore the application only needs to worry about the filename functions in FileChooser, like fileChooserGetFilename, rather than the URI functions like fileChooserGetURI,
fileChooserGetLocalOnly :: FileChooserClass self => self -> IO Bool
Gets whether only local files can be selected in the file selector. See fileChooserSetLocalOnly
fileChooserSetSelectMultiple :: FileChooserClass self => self -> Bool -> IO ()
Sets whether multiple files can be selected in the file selector. This is only relevant if the action is set to be FileChooserActionOpen or FileChooserActionSave. It cannot be set with either of the folder actions.
fileChooserGetSelectMultiple :: FileChooserClass self => self -> IO Bool
Gets whether multiple files can be selected in the file selector. See fileChooserSetSelectMultiple.
fileChooserSetCurrentName
:: FileChooserClass self
=> self
-> FilePathname - the filename to use, as a Unicode string
-> IO ()

Sets the current name in the file selector, as if entered by the user. Note that the name passed in here is a Unicode string rather than a filename. This function is meant for such uses as a suggested name in a "Save As..." dialog.

If you want to preselect a particular existing file, you should use fileChooserSetFilename instead.

fileChooserGetFilename
:: FileChooserClass self
=> self
-> IO (Maybe FilePath)returns The currently selected filename, or Nothing if no file is selected, or the selected file can't be represented with a local filename.

Gets the filename for the currently selected file in the file selector. If multiple files are selected, one of the filenames will be returned at random.

If the file chooser is in folder mode, this function returns the selected folder.

fileChooserSetFilename
:: FileChooserClass self
=> self
-> FilePathfilename - the filename to set as current
-> IO Boolreturns True if both the folder could be changed and the file was selected successfully, False otherwise.

Sets filename as the current filename for the file chooser; If the file name isn't in the current folder of the chooser, then the current folder of the chooser will be changed to the folder containing filename. This is equivalent to a sequence of fileChooserUnselectAll followed by fileChooserSelectFilename.

Note that the file must exist, or nothing will be done except for the directory change. To pre-enter a filename for the user, as in a save-as dialog, use fileChooserSetCurrentName

fileChooserSelectFilename
:: FileChooserClass self
=> self
-> FilePathfilename - the filename to select
-> IO Boolreturns True if both the folder could be changed and the file was selected successfully, False otherwise.
Selects a filename. If the file name isn't in the current folder of the chooser, then the current folder of the chooser will be changed to the folder containing filename.
fileChooserUnselectFilename
:: FileChooserClass self
=> self
-> FilePathfilename - the filename to unselect
-> IO ()
Unselects a currently selected filename. If the filename is not in the current directory, does not exist, or is otherwise not currently selected, does nothing.
fileChooserSelectAll :: FileChooserClass self => self -> IO ()
Selects all the files in the current folder of a file chooser.
fileChooserUnselectAll :: FileChooserClass self => self -> IO ()
Unselects all the files in the current folder of a file chooser.
fileChooserGetFilenames :: FileChooserClass self => self -> IO [FilePath]
Lists all the selected files and subfolders in the current folder of the chooser. The returned names are full absolute paths. If files in the current folder cannot be represented as local filenames they will be ignored. (See fileChooserGetURIs)
fileChooserSetCurrentFolder
:: FileChooserClass self
=> self
-> FilePathfilename - the full path of the new current folder
-> IO Boolreturns True if the folder could be changed successfully, False otherwise.
Sets the current folder for the chooser from a local filename. The user will be shown the full contents of the current folder, plus user interface elements for navigating to other folders.
fileChooserGetCurrentFolder
:: FileChooserClass self
=> self
-> IO (Maybe FilePath)returns the full path of the current folder, or Nothing if the current path cannot be represented as a local filename.
Gets the current folder of the chooser as a local filename. See fileChooserSetCurrentFolder.
fileChooserGetURI
:: FileChooserClass self
=> self
-> IO (Maybe String)returns The currently selected URI, or Nothing if no file is selected.

Gets the URI for the currently selected file in the file selector. If multiple files are selected, one of the filenames will be returned at random.

If the file chooser is in folder mode, this function returns the selected folder.

fileChooserSetURI
:: FileChooserClass self
=> self
-> Stringuri - the URI to set as current
-> IO Boolreturns True if both the folder could be changed and the URI was selected successfully, False otherwise.

Sets the file referred to by uri as the current file for the file chooser; If the file name isn't in the current folder of the chooser, then the current folder of the chooser will be changed to the folder containing uri. This is equivalent to a sequence of fileChooserUnselectAll followed by fileChooserSelectURI.

Note that the file must exist, or nothing will be done except for the directory change. To pre-enter a filename for the user, as in a save-as dialog, use fileChooserSetCurrentName

fileChooserSelectURI
:: FileChooserClass self
=> self
-> Stringuri - the URI to select
-> IO Boolreturns True if both the folder could be changed and the URI was selected successfully, False otherwise.
Selects the file to by uri. If the URI doesn't refer to a file in the current folder of the chooser, then the current folder of the chooser will be changed to the folder containing filename.
fileChooserUnselectURI
:: FileChooserClass self
=> self
-> Stringuri - the URI to unselect
-> IO ()
Unselects the file referred to by uri. If the file is not in the current directory, does not exist, or is otherwise not currently selected, does nothing.
fileChooserGetURIs :: FileChooserClass self => self -> IO [String]
Lists all the selected files and subfolders in the current folder of the chooser. The returned names are full absolute URIs.
fileChooserSetCurrentFolderURI
:: FileChooserClass self
=> self
-> Stringuri - the URI for the new current folder
-> IO Boolreturns True if the folder could be changed successfully, False otherwise.
Sets the current folder for the chooser from an URI. The user will be shown the full contents of the current folder, plus user interface elements for navigating to other folders.
fileChooserGetCurrentFolderURI
:: FileChooserClass self
=> self
-> IO Stringreturns the URI for the current folder.
Gets the current folder of the chooser as an URI. See fileChooserSetCurrentFolderURI.
fileChooserSetPreviewWidget
:: (FileChooserClass self, WidgetClass previewWidget)
=> self
-> previewWidgetpreviewWidget - widget for displaying preview.
-> IO ()

Sets an application-supplied widget to use to display a custom preview of the currently selected file. To implement a preview, after setting the preview widget, you connect to the UpdatePreview signal, and call fileChooserGetPreviewFilename or fileChooserGetPreviewURI on each change. If you can display a preview of the new file, update your widget and set the preview active using fileChooserSetPreviewWidgetActive. Otherwise, set the preview inactive.

When there is no application-supplied preview widget, or the application-supplied preview widget is not active, the file chooser may display an internally generated preview of the current file or it may display no preview at all.

fileChooserGetPreviewWidget
:: FileChooserClass self
=> self
-> IO (Maybe Widget)returns the current preview widget, or Nothing
Gets the current preview widget; see fileChooserSetPreviewWidget.
fileChooserSetPreviewWidgetActive
:: FileChooserClass self
=> self
-> Boolactive - whether to display the user-specified preview widget
-> IO ()
Sets whether the preview widget set by fileChooserSetPreviewWidget should be shown for the current filename. When active is set to false, the file chooser may display an internally generated preview of the current file or it may display no preview at all. See fileChooserSetPreviewWidget for more details.
fileChooserGetPreviewWidgetActive
:: FileChooserClass self
=> self
-> IO Boolreturns True if the preview widget is active for the current filename.
Gets whether the preview widget set by fileChooserSetPreviewWidget should be shown for the current filename. See fileChooserSetPreviewWidgetActive.
fileChooserSetUsePreviewLabel
:: FileChooserClass self
=> self
-> BooluseLabel - whether to display a stock label with the name of the previewed file
-> IO ()

Sets whether the file chooser should display a stock label with the name of the file that is being previewed; the default is True. Applications that want to draw the whole preview area themselves should set this to False and display the name themselves in their preview widget.

See also: fileChooserSetPreviewWidget

fileChooserGetUsePreviewLabel
:: FileChooserClass self
=> self
-> IO Boolreturns True if the file chooser is set to display a label with the name of the previewed file, False otherwise.
Gets whether a stock label should be drawn with the name of the previewed file. See fileChooserSetUsePreviewLabel.
fileChooserGetPreviewFilename
:: FileChooserClass self
=> self
-> IO (Maybe FilePath)returns the filename to preview, or Nothing if no file is selected, or if the selected file cannot be represented as a local filename.
Gets the filename that should be previewed in a custom preview widget. See fileChooserSetPreviewWidget.
fileChooserGetPreviewURI
:: FileChooserClass self
=> self
-> IO (Maybe String)returns the URI for the file to preview, or Nothing if no file is selected.
Gets the URI that should be previewed in a custom preview widget. See fileChooserSetPreviewWidget.
fileChooserSetExtraWidget
:: (FileChooserClass self, WidgetClass extraWidget)
=> self
-> extraWidgetextraWidget - widget for extra options
-> IO ()
Sets an application-supplied widget to provide extra options to the user.
fileChooserGetExtraWidget
:: FileChooserClass self
=> self
-> IO (Maybe Widget)returns the current extra widget, or Nothing
Gets the current preview widget; see fileChooserSetExtraWidget.
fileChooserAddFilter :: FileChooserClass self => self -> FileFilter -> IO ()
Adds the filter to the list of filters that the user can select between. When a filter is selected, only files that are passed by that filter are displayed.
fileChooserRemoveFilter :: FileChooserClass self => self -> FileFilter -> IO ()
Removes the filter from the list of filters that the user can select between.
fileChooserListFilters :: FileChooserClass self => self -> IO [FileFilter]
Lists the current set of user-selectable filters; see fileChooserAddFilter, fileChooserRemoveFilter.
fileChooserSetFilter :: FileChooserClass self => self -> FileFilter -> IO ()
Sets the current filter; only the files that pass the filter will be displayed. If the user-selectable list of filters is non-empty, then the filter should be one of the filters in that list. Setting the current filter when the list of filters is empty is useful if you want to restrict the displayed set of files without letting the user change it.
fileChooserGetFilter
:: FileChooserClass self
=> self
-> IO (Maybe FileFilter)returns the current filter, or Nothing
Gets the current filter; see fileChooserSetFilter.
fileChooserAddShortcutFolder
:: FileChooserClass self
=> self
-> FilePathfolder - filename of the folder to add
-> IO ()

Adds a folder to be displayed with the shortcut folders in a file chooser. Note that shortcut folders do not get saved, as they are provided by the application. For example, you can use this to add a "/usr/share/mydrawprogram/Clipart" folder to the volume list.

If the folder can not be added successfully an exception will be thrown.

fileChooserRemoveShortcutFolder
:: FileChooserClass self
=> self
-> FilePathfolder - filename of the folder to remove
-> IO ()

Removes a folder from a file chooser's list of shortcut folders.

If the folder can not be removed successfully an exception will be thrown.

fileChooserListShortcutFolders :: FileChooserClass self => self -> IO [String]
Queries the list of shortcut folders in the file chooser, as set by fileChooserAddShortcutFolder.
fileChooserAddShortcutFolderURI
:: FileChooserClass self
=> self
-> Stringuri - URI of the folder to add
-> IO ()

Adds a folder URI to be displayed with the shortcut folders in a file chooser. Note that shortcut folders do not get saved, as they are provided by the application. For example, you can use this to add a "file:///usr/share/mydrawprogram/Clipart" folder to the volume list.

If the folder can not be added successfully an exception will be thrown.

fileChooserRemoveShortcutFolderURI
:: FileChooserClass self
=> self
-> Stringuri - URI of the folder to remove
-> IO ()
Removes a folder URI from a file chooser's list of shortcut folders.
fileChooserListShortcutFolderURIs :: FileChooserClass self => self -> IO [String]
Queries the list of shortcut folders in the file chooser, as set by fileChooserAddShortcutFolderURI.
fileChooserErrorDomain :: GErrorDomain
data FileChooserError
Constructors
FileChooserErrorNonexistent
FileChooserErrorBadFilename
show/hide Instances
fileChooserSetShowHidden
:: FileChooserClass self
=> self
-> BoolshowHidden - True if hidden files and folders should be displayed.
-> IO ()

Sets whether hidden files and folders are displayed in the file selector.

  • Available since Gtk+ version 2.6
fileChooserGetShowHidden
:: FileChooserClass self
=> self
-> IO Boolreturns True if hidden files and folders are displayed.

Gets whether hidden files and folders are displayed in the file selector. See fileChooserSetShowHidden.

  • Available since Gtk+ version 2.6
Attributes
fileChooserUsePreviewLabel :: FileChooserClass self => Attr self Bool
'usePreviewLabel' property. See fileChooserGetUsePreviewLabel and fileChooserSetUsePreviewLabel
fileChooserShowHidden :: FileChooserClass self => Attr self Bool
'showHidden' property. See fileChooserGetShowHidden and fileChooserSetShowHidden
fileChooserSelectMultiple :: FileChooserClass self => Attr self Bool
'selectMultiple' property. See fileChooserGetSelectMultiple and fileChooserSetSelectMultiple
fileChooserPreviewWidgetActive :: FileChooserClass self => Attr self Bool
'previewWidgetActive' property. See fileChooserGetPreviewWidgetActive and fileChooserSetPreviewWidgetActive
fileChooserPreviewWidget :: (FileChooserClass self, WidgetClass previewWidget) => ReadWriteAttr self (Maybe Widget) previewWidget
'previewWidget' property. See fileChooserGetPreviewWidget and fileChooserSetPreviewWidget
fileChooserLocalOnly :: FileChooserClass self => Attr self Bool
'localOnly' property. See fileChooserGetLocalOnly and fileChooserSetLocalOnly
fileChooserFilter :: FileChooserClass self => ReadWriteAttr self (Maybe FileFilter) FileFilter
'filter' property. See fileChooserGetFilter and fileChooserSetFilter
fileChooserExtraWidget :: (FileChooserClass self, WidgetClass extraWidget) => ReadWriteAttr self (Maybe Widget) extraWidget
'extraWidget' property. See fileChooserGetExtraWidget and fileChooserSetExtraWidget
fileChooserAction :: FileChooserClass self => Attr self FileChooserAction
'action' property. See fileChooserGetAction and fileChooserSetAction
Signals
onCurrentFolderChanged :: FileChooserClass self => self -> IO () -> IO (ConnectId self)

This signal is emitted when the current folder in a FileChooser changes. This can happen due to the user performing some action that changes folders, such as selecting a bookmark or visiting a folder on the file list. It can also happen as a result of calling a function to explicitly change the current folder in a file chooser.

Normally you do not need to connect to this signal, unless you need to keep track of which folder a file chooser is showing.

See also: fileChooserSetCurrentFolder, fileChooserGetCurrentFolder, fileChooserSetCurrentFolderURI, fileChooserGetCurrentFolderURI.

afterCurrentFolderChanged :: FileChooserClass self => self -> IO () -> IO (ConnectId self)
onFileActivated :: FileChooserClass self => self -> IO () -> IO (ConnectId self)

This signal is emitted when the user "activates" a file in the file chooser. This can happen by double-clicking on a file in the file list, or by pressing Enter.

Normally you do not need to connect to this signal. It is used internally by FileChooserDialog to know when to activate the default button in the dialog.

See also: fileChooserGetFilename, fileChooserGetFilenames, fileChooserGetURI, fileChooserGetURIs.

afterFileActivated :: FileChooserClass self => self -> IO () -> IO (ConnectId self)
onUpdatePreview :: FileChooserClass self => self -> IO () -> IO (ConnectId self)

This signal is emitted when there is a change in the set of selected files in a FileChooser. This can happen when the user modifies the selection with the mouse or the keyboard, or when explicitly calling functions to change the selection.

Normally you do not need to connect to this signal, as it is easier to wait for the file chooser to finish running, and then to get the list of selected files using the functions mentioned below.

See also: fileChooserSelectFilename, fileChooserUnselectFilename, fileChooserGetFilename, fileChooserGetFilenames, fileChooserSelectURI, fileChooserUnselectURI, fileChooserGetURI, fileChooserGetURIs.

onSelectionChanged, afterSelectionChanged :: FileChooserClass self => self -> IO () -> IO (ConnectId self) onSelectionChanged = connect_NONE__NONE selection-changed False afterSelectionChanged = connect_NONE__NONE selection-changed True

This signal is emitted when the preview in a file chooser should be regenerated. For example, this can happen when the currently selected file changes. You should use this signal if you want your file chooser to have a preview widget.

Once you have installed a preview widget with fileChooserSetPreviewWidget, you should update it when this signal is emitted. You can use the functions fileChooserGetPreviewFilename or fileChooserGetPreviewURI to get the name of the file to preview. Your widget may not be able to preview all kinds of files; your callback must call fileChooserSetPreviewWigetActive to inform the file chooser about whether the preview was generated successfully or not.

See also: fileChooserSetPreviewWidget, fileChooserSetPreviewWidgetActive, fileChooserSetUsePreviewLabel, fileChooserGetPreviewFilename, fileChooserGetPreviewURI.

afterUpdatePreview :: FileChooserClass self => self -> IO () -> IO (ConnectId self)
Produced by Haddock version 0.7