Gtk.FileChooser::update-preview

function callback(file_chooser, ):void;

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 Gtk.FileChooser.prototype.set_preview_widget, you should update it when this signal is emitted. You can use the functions Gtk.FileChooser.prototype.get_preview_filename or Gtk.FileChooser.prototype.get_preview_uri 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 Gtk.FileChooser.prototype.set_preview_widget_active to inform the file chooser about whether the preview was generated successfully or not.

Please see the example code in <xref linkend="gtkfilechooser-preview"/>.

See also: Gtk.FileChooser.prototype.set_preview_widget, Gtk.FileChooser.prototype.set_preview_widget_active, Gtk.FileChooser.prototype.set_use_preview_label, Gtk.FileChooser.prototype.get_preview_filename, Gtk.FileChooser.prototype.get_preview_uri.

file_chooser

instance of Gtk.FileChooser that is emitting the signal