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 /src/Overlay.cpp | |
parent | 81e2fab47f4ec9423fd92b8e5fd013e83a080e2b (diff) |
Add option to manage program startup directly in the program
Diffstat (limited to 'src/Overlay.cpp')
-rw-r--r-- | src/Overlay.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Overlay.cpp b/src/Overlay.cpp index 3d6a603..1c7a54c 100644 --- a/src/Overlay.cpp +++ b/src/Overlay.cpp @@ -979,6 +979,15 @@ namespace gsr { button->set_icon(&get_theme().settings_small_texture); button->on_click = [&]() { auto settings_page = std::make_unique<GlobalSettingsPage>(&gsr_info, config, &page_stack); + settings_page->on_startup_changed = [&](bool enable, int exit_status) { + if(exit_status == 0) + return; + + if(enable) + show_notification("Failed to add GPU Screen Recorder to system startup", 3.0, mgl::Color(255, 0, 0), mgl::Color(255, 0, 0), NotificationType::NONE); + else + show_notification("Failed to remove GPU Screen Recorder from system startup", 3.0, mgl::Color(255, 0, 0), mgl::Color(255, 0, 0), NotificationType::NONE); + }; page_stack.push(std::move(settings_page)); }; front_page_ptr->add_widget(std::move(button)); |