mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +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
Notes:
sideshowbarker
2024-07-19 04:46:15 +09:00
Author: https://github.com/tomuta
Commit: 6568765e8f
Pull-request: https://github.com/SerenityOS/serenity/pull/2820
14 changed files with 27 additions and 26 deletions
|
@ -100,7 +100,7 @@ int main(int argc, char** argv)
|
|||
auto& app_menu = menubar->add_menu("PixelPaint");
|
||||
|
||||
app_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) {
|
||||
Optional<String> open_path = GUI::FilePicker::get_open_filepath();
|
||||
Optional<String> open_path = GUI::FilePicker::get_open_filepath(window);
|
||||
|
||||
if (!open_path.has_value())
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue