Method

GtkFileChooserset_preview_widget

since: 2.4

Declaration [src]

void
gtk_file_chooser_set_preview_widget (
  GtkFileChooser* chooser,
  GtkWidget* preview_widget
)

Description [src]

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 GtkFileChooser::update-preview signal, and call gtk_file_chooser_get_preview_filename() or gtk_file_chooser_get_preview_uri() on each change. If you can display a preview of the new file, update your widget and set the preview active using gtk_file_chooser_set_preview_widget_active(). 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 will display no preview at all.

Available since: 2.4

Parameters

preview_widget

Type: GtkWidget

Widget for displaying preview.

The data is owned by the caller of the method.