mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +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:
parent
9844088964
commit
6568765e8f
14 changed files with 27 additions and 26 deletions
|
@ -126,7 +126,7 @@ int main(int argc, char** argv)
|
|||
// Actions
|
||||
auto open_action = GUI::CommonActions::make_open_action(
|
||||
[&](auto&) {
|
||||
Optional<String> path = GUI::FilePicker::get_open_filepath("Open image...");
|
||||
Optional<String> path = GUI::FilePicker::get_open_filepath(window, "Open image...");
|
||||
if (path.has_value()) {
|
||||
widget.load_from_file(path.value());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue