1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

LibGUI: Add parent window argument to FilePicker functions

Since FilePicker almost always should be modal, add the parent
window as mandatory first argument.
This commit is contained in:
Tom 2020-07-15 19:52:02 -06:00 committed by Andreas Kling
parent 9844088964
commit 6568765e8f
14 changed files with 27 additions and 26 deletions

View file

@ -79,7 +79,7 @@ int main(int argc, char** argv)
});
app_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) {
Optional<String> path = GUI::FilePicker::get_open_filepath("Open wav file...");
Optional<String> path = GUI::FilePicker::get_open_filepath(window, "Open wav file...");
if (path.has_value()) {
player.open_file(path.value());
}