FileChooser.connectUpdatePreview
gulong connectUpdatePreview(T)(T callback, Flag!"After" after = No.After)Connect to UpdatePreview signal.
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.file_chooser.FileChooser.setPreviewWidget], you should update it when this signal is emitted. You can use the functions [gtk.file_chooser.FileChooser.getPreviewFilename] or [gtk.file_chooser.FileChooser.getPreviewUri] 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.file_chooser.FileChooser.setPreviewWidgetActive] to inform the file chooser about whether the preview was generated successfully or not.
Please see the example code in [Using a Preview Widget][gtkfilechooser-preview].
See also: [gtk.file_chooser.FileChooser.setPreviewWidget], [gtk.file_chooser.FileChooser.setPreviewWidgetActive], [gtk.file_chooser.FileChooser.setUsePreviewLabel], [gtk.file_chooser.FileChooser.getPreviewFilename], [gtk.file_chooser.FileChooser.getPreviewUri].
Parameters
callback | signal callback delegate or function to connect void callback(gtk.file_chooser.FileChooser fileChooser) fileChooser the instance the signal is connected to (optional) |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |