Method

Gtk.FileChooser.add_choice

Declaration [src]

void
gtk_file_chooser_add_choice (
  GtkFileChooser* chooser,
  const char* id,
  const char* label,
  const char** options,
  const char** option_labels
)

Description [src]

Adds a ‘choice’ to the file chooser.

This is typically implemented as a combobox or, for boolean choices, as a checkbutton. You can select a value using gtk_file_chooser_set_choice() before the dialog is shown, and you can obtain the user-selected value in the GtkDialog::response signal handler using gtk_file_chooser_get_choice().

Parameters

id const char*
 

id for the added choice

 The data is owned by the caller of the function
 The string is a NUL terminated UTF-8 string
label const char*
 

user-visible label for the added choice

 The data is owned by the caller of the function
 The string is a NUL terminated UTF-8 string
options An array of char*
 

ids for the options of the choice, or NULL for a boolean choice

 Can be NULL
 The data is owned by the caller of the function
option_labels An array of char*
 

user-visible labels for the options, must be the same length as options

 Can be NULL
 The data is owned by the caller of the function