When I try to show a file chooser dialog, it is missing the action buttons:
let dialog = FileChooserDialog::new(Some("Open File"), Some(&window), FileChooserAction::Open);
dialog.run();
I found another way from another project:
let dialog = FileChooserDialog::new_with_buttons::<ApplicationWindow>(
Some("Open File"),
Some(&window),
FileChooserAction::Open,
&[
("_Cancel", ResponseType::Cancel),
("_Open", ResponseType::Accept),
],
);
The error message is:
no function or associated item named `new_with_buttons` found for type `gtk::FileChooserDialog` in the current scope