It derives from <GObject>.
Asynchronous API to present a file chooser dialog.
<GtkFileDialog> collects the arguments that are
needed to present the dialog to the user, such as a title for the dialog
and whether it should be modal.
The dialog is shown with file-dialog:open,
file-dialog:save, etc.
Label for the file chooser’s accept button.
Its value is a string, or #f.
Set it with (set! (file-dialog:accept-label self) value).
The default filter.
This filter is initially active in the file chooser dialog.
If the default filter is NULL, the first filter of
file-dialog:filters is used as
the default filter. If that property contains no filter, the dialog
will be unfiltered.
If file-dialog:filters is not
NULL, the default filter should be part of the list. If it is
not, the dialog may choose to not make it available.
Its value is a <GtkFileFilter>, or #f.
Set it with (set! (file-dialog:default-filter self) value).
The list of filters.
See file-dialog:default-filter about how these two
properties interact.
Its value is a <GListModel>, or #f.
Set it with (set! (file-dialog:filters self) value).
The initial file.
This file is initially selected in the file chooser dialog
This is a utility property that sets both file-dialog:initial-folder and file-dialog:initial-name.
Its value is a <GFile>, or #f.
Set it with (set! (file-dialog:initial-file self) value).
The initial folder.
This is the directory that is initially opened in the file chooser dialog.
Its value is a <GFile>, or #f.
Set it with (set! (file-dialog:initial-folder self) value).
The initial name.
This is the name of the file that is initially selected in the file chooser dialog.
Its value is a string, or #f.
Set it with (set! (file-dialog:initial-name self) value).
Whether the file chooser dialog is modal.
Its value is a boolean.
Set it with (set! (file-dialog:modal self) value).
A title that may be shown on the file chooser dialog.
Its value is a string, or #f.
Set it with (set! (file-dialog:title self) value).
Retrieves the text used by the dialog on its accept button.
Passed: a <GtkFileDialog>.
a file dialog
Returned: a string, or #f.
the label shown on the file chooser’s accept button
Gets the filter that will be selected by default in the file chooser dialog.
Passed: a <GtkFileDialog>.
a file dialog
Returned: a <GtkFileFilter>, or #f.
the default filter
Gets the filters that will be offered to the user in the file chooser dialog.
Passed: a <GtkFileDialog>.
a file dialog
Returned: a <GListModel>, or #f.
the filters, as a list model of <GtkFileFilter>
Gets the file that will be initially selected in the file chooser dialog.
Passed: a <GtkFileDialog>.
a file dialog
Returned: a <GFile>, or #f.
the file
Gets the folder that will be set as the initial folder in the file chooser dialog.
Passed: a <GtkFileDialog>.
a file dialog
Returned: a <GFile>, or #f.
the folder
Gets the filename that will be initially selected.
Passed: a <GtkFileDialog>.
a file dialog
Returned: a string, or #f.
the name
Returns whether the file chooser dialog blocks interaction with the parent window while it is presented.
Passed: a <GtkFileDialog>.
a file dialog
Returned: a boolean.
true if the file chooser dialog is modal
Returns the title that will be shown on the file chooser dialog.
Passed: a <GtkFileDialog>.
a file dialog
Returned: a string.
the title
Creates a new <GtkFileDialog> object.
Returned: a <GtkFileDialog>.
the new <GtkFileDialog>
Presents a file chooser dialog to the user.
The file chooser dialog will be set up to select a single file.
The callback will be called when the dialog is closed.
Passed: a <GtkFileDialog>.
a file dialog
Passed, or left out: a <GtkWindow>, or #f.
the parent window
Passed, or left out: a <GCancellable>, or
#f.
a cancellable to cancel the operation
Passed, or left out: a procedure, or #f.
a callback to call when the operation is complete
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes the file-dialog:open call.
Note that this function returns a Gtk.DialogError.DISMISSED error
if the user cancels the dialog.
Passed: a <GtkFileDialog>.
a file dialog
Passed: a <GAsyncResult>.
the result
Returned: a <GFile>.
the file that was selected
Presents a file chooser dialog to the user.
The file chooser dialog will be set up to select multiple files.
The file chooser dialog will initially be opened in the directory
file-dialog:initial-folder.
The callback will be called when the dialog is closed.
Passed: a <GtkFileDialog>.
a file dialog
Passed, or left out: a <GtkWindow>, or #f.
the parent window
Passed, or left out: a <GCancellable>, or
#f.
a cancellable to cancel the operation
Passed, or left out: a procedure, or #f.
a callback to call when the operation is complete
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes the file-dialog:open call.
Note that this function returns a Gtk.DialogError.DISMISSED error
if the user cancels the dialog.
Passed: a <GtkFileDialog>.
a file dialog
Passed: a <GAsyncResult>.
the result
Returned: a <GListModel>.
the files that were selected, as a list model of
<GFile>
Presents a file chooser dialog to the user.
The file chooser dialog will be set up to select multiple files.
The file chooser dialog will initially be opened in the directory
file-dialog:initial-folder.
In contrast to file-dialog:open, this
function lets the user select the text encoding for the files, if
possible.
The callback will be called when the dialog is closed.
Passed: a <GtkFileDialog>.
a file dialog
Passed, or left out: a <GtkWindow>, or #f.
the parent window
Passed, or left out: a <GCancellable>, or
#f.
a cancellable to cancel the operation
Passed, or left out: a procedure, or #f.
a callback to call when the operation is complete
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes the file-dialog:open call.
Note that this function returns a Gtk.DialogError.DISMISSED error
if the user cancels the dialog.
Passed: a <GtkFileDialog>.
a file dialog
Passed: a <GAsyncResult>.
the result
Returned: a <GListModel>.
the files that were selected, as a list model of
<GFile>
Returned: a string.
return location for the text encoding to use
Initiates a file selection operation by presenting a file chooser dialog to the user.
In contrast to file-dialog:open, this
function lets the user select the text encoding for the file, if
possible.
The callback will be called when the dialog is closed.
Passed: a <GtkFileDialog>.
Passed, or left out: a <GtkWindow>, or #f.
the parent <GtkWindow>
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> to cancel the operation
Passed, or left out: a procedure, or #f.
a callback to call when the operation is complete
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes the file-dialog:open-text-file call and returns the
resulting file and text encoding.
If the user has explicitly selected a text encoding to use for the file,
then encoding will be set to a codeset name that is suitable for
passing to iconv_open(). Otherwise, it will be NULL.
Note that this function returns a Gtk.DialogError.DISMISSED error
if the user cancels the dialog.
Passed: a <GtkFileDialog>.
Passed: a <GAsyncResult>.
Returned: a <GFile>.
the file that was selected
Returned: a string.
return location for the text encoding to use
Presents a file chooser dialog to the user.
The file chooser dialog will be save mode.
The callback will be called when the dialog is closed.
Passed: a <GtkFileDialog>.
a file dialog
Passed, or left out: a <GtkWindow>, or #f.
the parent window
Passed, or left out: a <GCancellable>, or
#f.
a cancellable to cancel the operation
Passed, or left out: a procedure, or #f.
a callback to call when the operation is complete
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes the file-dialog:save call.
Note that this function returns a Gtk.DialogError.DISMISSED error
if the user cancels the dialog.
Passed: a <GtkFileDialog>.
a file dialog
Passed: a <GAsyncResult>.
the result
Returned: a <GFile>.
the file that was selected
Initiates a file save operation by presenting a file chooser dialog to the user.
In contrast to file-dialog:save, this
function lets the user select the text encoding and line endings for the
text file, if possible.
The callback will be called when the dialog is closed.
Passed: a <GtkFileDialog>.
Passed, or left out: a <GtkWindow>, or #f.
the parent <GtkWindow>
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> to cancel the operation
Passed, or left out: a procedure, or #f.
a callback to call when the operation is complete
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes the file-dialog:save-text-file call and returns the
resulting file, text encoding and line endings.
If the user has explicitly selected a text encoding to use for the file,
then encoding will be set to a codeset name that is suitable for
passing to iconv_open(). Otherwise, it will be NULL.
The line-ending will be set to one of "\n", "\r\n", "\r" or "", where the latter means to preserve existing line endings.
Note that this function returns a Gtk.DialogError.DISMISSED error
if the user cancels the dialog.
Passed: a <GtkFileDialog>.
Passed: a <GAsyncResult>.
Returned: a <GFile>.
the file that was selected.
Returned: a string.
return location for the text encoding to use
Returned: a string.
return location for the line endings to use
Presents a file chooser dialog to the user.
The file chooser dialog will be set up to select a single folder.
If you pass initial-folder, the file chooser dialog will initially
be opened in the parent directory of that folder, otherwise, it will be
in the directory file-dialog:initial-folder.
The callback will be called when the dialog is closed.
Passed: a <GtkFileDialog>.
a file dialog
Passed, or left out: a <GtkWindow>, or #f.
the parent window
Passed, or left out: a <GCancellable>, or
#f.
a cancellable to cancel the operation
Passed, or left out: a procedure, or #f.
a callback to call when the operation is complete
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes the file-dialog:select-folder call.
Note that this function returns a Gtk.DialogError.DISMISSED error
if the user cancels the dialog.
Passed: a <GtkFileDialog>.
a file dialog
Passed: a <GAsyncResult>.
the result
Returned: a <GFile>.
the folder that was selected
Presents a file chooser dialog to the user.
The file chooser dialog will be set up to allow selecting multiple folders.
The file chooser dialog will initially be opened in the directory
file-dialog:initial-folder.
The callback will be called when the dialog is closed.
Passed: a <GtkFileDialog>.
a file dialog
Passed, or left out: a <GtkWindow>, or #f.
the parent window
Passed, or left out: a <GCancellable>, or
#f.
a cancellable to cancel the operation
Passed, or left out: a procedure, or #f.
a callback to call when the operation is complete
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes the file-dialog:select-multiple-folders call.
Note that this function returns a Gtk.DialogError.DISMISSED error
if the user cancels the dialog.
Passed: a <GtkFileDialog>.
a file dialog
Passed: a <GAsyncResult>.
the result
Returned: a <GListModel>.
the folders that were selected, as a list model of
<GFile>
Sets the label shown on the file chooser’s accept button.
Leaving the accept label unset or setting it as NULL will fall
back to a default label, depending on what API is used to launch the
file dialog.
Passed: a <GtkFileDialog>.
a file dialog
Passed, or left out: a string, or #f.
the new accept label
Sets the filter that will be selected by default in the file chooser dialog.
If set to NULL, the first item in file-dialog:filters will be used as the default filter. If
that list is empty, the dialog will be unfiltered.
Passed: a <GtkFileDialog>.
a file dialog
Passed, or left out: a <GtkFileFilter>, or
#f.
the file filter
Sets the filters that will be offered to the user in the file chooser dialog.
Passed: a <GtkFileDialog>.
a file dialog
Passed, or left out: a <GListModel>, or
#f.
a list model of <GtkFileFilter>
Sets the file that will be initially selected in the file chooser dialog.
This function is a shortcut for calling both file-dialog:set-initial-folder and
file-dialog:set-initial-name
with the directory and name of file, respectively.
Passed: a <GtkFileDialog>.
a file dialog
Passed, or left out: a <GFile>, or #f.
a file
Sets the folder that will be set as the initial folder in the file chooser dialog.
Passed: a <GtkFileDialog>.
a file dialog
Passed, or left out: a <GFile>, or #f.
a file
Sets the filename that will be initially selected.
For save dialogs, name will usually be pre-entered into the name field.
If a file with this name already exists in the directory set via
file-dialog:initial-folder, the dialog will preselect
it.
Passed: a <GtkFileDialog>.
a file dialog
Passed, or left out: a string, or #f.
a string
Sets whether the file chooser dialog blocks interaction with the parent window while it is presented.
Passed: a <GtkFileDialog>.
a file dialog
Passed: a boolean.
the new value
Sets the title that will be shown on the file chooser dialog.
Passed: a <GtkFileDialog>.
a file dialog
Passed: a string.
the new title