open_text_file


Description:

[ Version ( since = "4.18" ) ]
public async File? open_text_file (Window? parent, Cancellable? cancellable, out unowned string encoding) throws Error

Initiates a file selection operation by presenting a file chooser dialog to the user.

In contrast to [method@Gtk.FileDialog.open], this function lets the user select the text encoding for the file, if possible.

The callback will be called when the dialog is dismissed.

Parameters:

this

a `GtkFileDialog`

parent

the parent `GtkWindow`

cancellable

a `GCancellable` to cancel the operation

callback

a callback to call when the operation is complete

user_data

data to pass to callback