From ccc3da4ee154fb67f87d1a4ea688f384ab715ea8 Mon Sep 17 00:00:00 2001 From: Marco Cutecchia Date: Sat, 19 Mar 2022 12:53:02 +0100 Subject: [PATCH] HackStudio: Remember if the user wants to see dotfiles between sessions --- Userland/DevTools/HackStudio/HackStudioWidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/DevTools/HackStudio/HackStudioWidget.cpp b/Userland/DevTools/HackStudio/HackStudioWidget.cpp index 1a140cc7dd..c9b2be04bf 100644 --- a/Userland/DevTools/HackStudio/HackStudioWidget.cpp +++ b/Userland/DevTools/HackStudio/HackStudioWidget.cpp @@ -185,6 +185,7 @@ HackStudioWidget::HackStudioWidget(String path_to_project) } m_project_builder = make(*m_terminal_wrapper, *m_project); + project().model().set_should_show_dotfiles(Config::read_bool("HackStudio", "Global", "ShowDotfiles", false)); } void HackStudioWidget::update_actions() @@ -1394,7 +1395,9 @@ void HackStudioWidget::create_view_menu(GUI::Window& window) }); auto show_dotfiles_action = GUI::Action::create_checkable("S&how Dotfiles", { Mod_Ctrl, Key_H }, [&](auto& checked) { project().model().set_should_show_dotfiles(checked.is_checked()); + Config::write_bool("HackStudio", "Global", "ShowDotfiles", checked.is_checked()); }); + show_dotfiles_action->set_checked(Config::read_bool("HackStudio", "Global", "ShowDotfiles", false)); auto& view_menu = window.add_menu("&View"); view_menu.add_action(hide_action_tabs_action);