LibGUI: Add "New Directory" to the contextual menu in FilePicker

This commit is contained in:
Lucas CHOLLET 2023-03-08 16:59:45 -05:00 committed by Sam Atkins
parent b51090e83e
commit af8b715aac
Notes: sideshowbarker 2024-07-16 23:09:49 +09:00

View file

@ -203,6 +203,10 @@ FilePicker::FilePicker(Window* parent_window, Mode mode, StringView filename, St
};
m_context_menu = GUI::Menu::construct();
m_context_menu->add_action(mkdir_action);
m_context_menu->add_separator();
m_context_menu->add_action(GUI::Action::create_checkable(
"Show dotfiles", { Mod_Ctrl, Key_H }, [&](auto& action) {
m_model->set_should_show_dotfiles(action.is_checked());