mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +00:00
LibGUI+HackStudio: Add way to tell FilePicker to open a folder
This now means that when trying to open a folder, one can click on the folder and press open instead of having to actually step into the desired folder. Of course, it also means it won't let you open non-directories anymore.
This commit is contained in:
committed by
Andreas Kling
parent
ce010de74f
commit
2ed5d19407
@@ -118,7 +118,7 @@ NewProjectDialog::NewProjectDialog(GUI::Window* parent)
|
||||
|
||||
m_browse_button = *find_descendant_of_type_named<GUI::Button>("browse_button");
|
||||
m_browse_button->on_click = [this](auto) {
|
||||
Optional<String> path = GUI::FilePicker::get_open_filepath(this);
|
||||
Optional<String> path = GUI::FilePicker::get_open_filepath(this, {}, Core::StandardPaths::home_directory(), true);
|
||||
if (path.has_value())
|
||||
m_create_in_input->set_text(path.value().view());
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user