mirror of
https://repo.dec05eba.com/gpu-screen-recorder-ui
synced 2026-05-06 06:50:44 +09:00
Add buttons to exit program and to go back to old ui for flatpak
This commit is contained in:
@@ -56,6 +56,8 @@ namespace gsr {
|
||||
void save_replay();
|
||||
void show_notification(const char *str, double timeout_seconds, mgl::Color icon_color, mgl::Color bg_color, NotificationType notification_type);
|
||||
bool is_open() const;
|
||||
bool should_exit(std::string &reason) const;
|
||||
void exit();
|
||||
private:
|
||||
void xi_setup();
|
||||
void handle_xi_events();
|
||||
@@ -161,5 +163,8 @@ namespace gsr {
|
||||
|
||||
std::array<KeyBinding, 1> key_bindings;
|
||||
bool drawn_first_frame = false;
|
||||
|
||||
bool do_exit = false;
|
||||
std::string exit_reason;
|
||||
};
|
||||
}
|
||||
@@ -12,6 +12,7 @@ namespace gsr {
|
||||
class ScrollablePage;
|
||||
class Subsection;
|
||||
class RadioButton;
|
||||
class Button;
|
||||
|
||||
class GlobalSettingsPage : public StaticPage {
|
||||
public:
|
||||
@@ -25,9 +26,14 @@ namespace gsr {
|
||||
|
||||
// Called with (enable, exit_status)
|
||||
std::function<void(bool, int)> on_startup_changed;
|
||||
// Called with (reason)
|
||||
std::function<void(const char*)> on_click_exit_program_button;
|
||||
private:
|
||||
std::unique_ptr<Subsection> create_appearance_subsection(ScrollablePage *parent_page);
|
||||
std::unique_ptr<Subsection> create_startup_subsection(ScrollablePage *parent_page);
|
||||
std::unique_ptr<Button> create_exit_program_button();
|
||||
std::unique_ptr<Button> create_go_back_to_old_ui_button();
|
||||
std::unique_ptr<Subsection> create_application_options_subsection(ScrollablePage *parent_page);
|
||||
void add_widgets();
|
||||
private:
|
||||
Config &config;
|
||||
|
||||
Reference in New Issue
Block a user