diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-12-28 15:29:26 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-12-28 22:30:30 +0100 |
commit | c213b5de89ee4a11d1c6c94b8b142b24885a4323 (patch) | |
tree | 8e6b50f6cd42f6a3381705e79b4db1016929b1ab /include/gui | |
parent | 81e2fab47f4ec9423fd92b8e5fd013e83a080e2b (diff) |
Add option to manage program startup directly in the program
Diffstat (limited to 'include/gui')
-rw-r--r-- | include/gui/GlobalSettingsPage.hpp | 7 | ||||
-rw-r--r-- | include/gui/SettingsPage.hpp | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/gui/GlobalSettingsPage.hpp b/include/gui/GlobalSettingsPage.hpp index cd4a50c..35b6003 100644 --- a/include/gui/GlobalSettingsPage.hpp +++ b/include/gui/GlobalSettingsPage.hpp @@ -4,6 +4,8 @@ #include "../GsrInfo.hpp" #include "../Config.hpp" +#include <functional> + namespace gsr { class GsrPage; class PageStack; @@ -20,8 +22,12 @@ namespace gsr { void load(); void save(); void on_navigate_away_from_page() override; + + // Called with (enable, exit_status) + std::function<void(bool, int)> on_startup_changed; private: std::unique_ptr<Subsection> create_appearance_subsection(ScrollablePage *parent_page); + std::unique_ptr<Subsection> create_startup_subsection(ScrollablePage *parent_page); void add_widgets(); private: Config &config; @@ -30,5 +36,6 @@ namespace gsr { GsrPage *content_page_ptr = nullptr; PageStack *page_stack = nullptr; RadioButton *tint_color_radio_button_ptr = nullptr; + RadioButton *startup_radio_button_ptr = nullptr; }; }
\ No newline at end of file diff --git a/include/gui/SettingsPage.hpp b/include/gui/SettingsPage.hpp index 1ab0cb2..4057059 100644 --- a/include/gui/SettingsPage.hpp +++ b/include/gui/SettingsPage.hpp @@ -10,6 +10,8 @@ #include "../GsrInfo.hpp" #include "../Config.hpp" +#include <functional> + namespace gsr { class GsrPage; class PageStack; |