diff options
author | Tom <tomut@yahoo.com> | 2020-07-15 19:52:02 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-16 16:10:21 +0200 |
commit | 6568765e8f89563fa76407ce5e369ec1eb09c125 (patch) | |
tree | ab185f89d668de23ed608a8b11ae5491df3b4d16 /Applications/DisplaySettings | |
parent | 98440889641fcd7d049921146984ca5ec3b957b3 (diff) | |
download | serenity-6568765e8f89563fa76407ce5e369ec1eb09c125.zip |
LibGUI: Add parent window argument to FilePicker functions
Since FilePicker almost always should be modal, add the parent
window as mandatory first argument.
Diffstat (limited to 'Applications/DisplaySettings')
-rw-r--r-- | Applications/DisplaySettings/DisplaySettings.cpp | 2 | ||||
-rw-r--r-- | Applications/DisplaySettings/main.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/Applications/DisplaySettings/DisplaySettings.cpp b/Applications/DisplaySettings/DisplaySettings.cpp index a77a9a66b5..5c26f7156c 100644 --- a/Applications/DisplaySettings/DisplaySettings.cpp +++ b/Applications/DisplaySettings/DisplaySettings.cpp @@ -152,7 +152,7 @@ void DisplaySettingsWidget::create_frame() button.set_size_policy(GUI::SizePolicy::Fixed, GUI::SizePolicy::Fixed); button.set_preferred_size(22, 22); button.on_click = [this](auto) { - Optional<String> open_path = GUI::FilePicker::get_open_filepath("Select wallpaper from file system."); + Optional<String> open_path = GUI::FilePicker::get_open_filepath(root_widget()->window(), "Select wallpaper from file system."); if (!open_path.has_value()) return; diff --git a/Applications/DisplaySettings/main.cpp b/Applications/DisplaySettings/main.cpp index f125f1afdc..aa6a2c34ad 100644 --- a/Applications/DisplaySettings/main.cpp +++ b/Applications/DisplaySettings/main.cpp @@ -54,6 +54,7 @@ int main(int argc, char** argv) auto instance = DisplaySettingsWidget::construct(); auto window = GUI::Window::construct(); + dbg() << "main window: " << window; window->set_title("Display settings"); window->move_to(100, 100); window->resize(360, 390); |