diff options
Diffstat (limited to 'Userland/Applications/Welcome/WelcomeWidget.cpp')
-rw-r--r-- | Userland/Applications/Welcome/WelcomeWidget.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Applications/Welcome/WelcomeWidget.cpp b/Userland/Applications/Welcome/WelcomeWidget.cpp index 39442953bd..439cfc0543 100644 --- a/Userland/Applications/Welcome/WelcomeWidget.cpp +++ b/Userland/Applications/Welcome/WelcomeWidget.cpp @@ -7,10 +7,12 @@ #include "WelcomeWidget.h" #include <AK/Random.h> #include <Applications/Welcome/WelcomeWindowGML.h> +#include <LibConfig/Client.h> #include <LibCore/File.h> #include <LibCore/Process.h> #include <LibGUI/Application.h> #include <LibGUI/Button.h> +#include <LibGUI/CheckBox.h> #include <LibGUI/Label.h> #include <LibGUI/Painter.h> #include <LibGfx/BitmapFont.h> @@ -66,6 +68,13 @@ WelcomeWidget::WelcomeWidget() GUI::Application::the()->quit(); }; + auto exec_path = Config::read_string("SystemServer", "Welcome", "Executable", {}); + m_startup_checkbox = *find_descendant_of_type_named<GUI::CheckBox>("startup_checkbox"); + m_startup_checkbox->set_checked(!exec_path.is_empty()); + m_startup_checkbox->on_checked = [](bool is_checked) { + Config::write_string("SystemServer", "Welcome", "Executable", is_checked ? "/bin/Welcome" : ""); + }; + open_and_parse_readme_file(); open_and_parse_tips_file(); set_random_tip(); |