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
@@ -544,7 +544,7 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_remove_current_editor_action
|
||||
NonnullRefPtr<GUI::Action> HackStudioWidget::create_open_action()
|
||||
{
|
||||
return GUI::Action::create("&Open Project...", { Mod_Ctrl | Mod_Shift, Key_O }, Gfx::Bitmap::load_from_file("/res/icons/16x16/open.png"), [this](auto&) {
|
||||
auto open_path = GUI::FilePicker::get_open_filepath(window(), "Open project");
|
||||
auto open_path = GUI::FilePicker::get_open_filepath(window(), "Open project", Core::StandardPaths::home_directory(), true);
|
||||
if (!open_path.has_value())
|
||||
return;
|
||||
open_project(open_path.value());
|
||||
|
||||
Reference in New Issue
Block a user