diff options
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/full_config_dialog.cc | 3 | ||||
| -rw-r--r-- | src/wx/general_preferences_page.cc | 21 | ||||
| -rw-r--r-- | src/wx/general_preferences_page.h | 9 |
3 files changed, 33 insertions, 0 deletions
diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc index eff3fdee2..3ebd8092d 100644 --- a/src/wx/full_config_dialog.cc +++ b/src/wx/full_config_dialog.cc @@ -144,6 +144,9 @@ private: ++r; add_update_controls(table, r); +#ifdef DCPOMATIC_SENTRY + add_crash_reporting_controls(table, r); +#endif _default_add_file_location->add_entry(_("Same place as last time")); _default_add_file_location->add_entry(_("Same place as project")); diff --git a/src/wx/general_preferences_page.cc b/src/wx/general_preferences_page.cc index beed9012f..2404289e2 100644 --- a/src/wx/general_preferences_page.cc +++ b/src/wx/general_preferences_page.cc @@ -205,6 +205,27 @@ GeneralPage::add_update_controls(wxGridBagSizer* table, int& r) _check_for_test_updates->bind(&GeneralPage::check_for_test_updates_changed, this); } + +#ifdef DCPOMATIC_SENTRY +void +GeneralPage::add_crash_reporting_controls(wxGridBagSizer* table, int& r) +{ + _enable_crash_reporting = new CheckBox(_panel, _("Automatically upload crash reports")); + table->Add(_enable_crash_reporting, wxGBPosition(r, 0), wxGBSpan(1, 2)); + ++r; + + _enable_crash_reporting->bind(&GeneralPage::enable_crash_reporting_changed, this); +} + + +void +GeneralPage::enable_crash_reporting_changed() +{ + Config::instance()->set_enable_crash_reporting(_enable_crash_reporting->get()); +} +#endif + + void GeneralPage::config_changed() { diff --git a/src/wx/general_preferences_page.h b/src/wx/general_preferences_page.h index d871c2506..ed63f356b 100644 --- a/src/wx/general_preferences_page.h +++ b/src/wx/general_preferences_page.h @@ -48,6 +48,9 @@ protected: void add_language_controls(wxGridBagSizer* table, int& r); void add_config_file_controls(wxGridBagSizer* table, int& r); void add_update_controls(wxGridBagSizer* table, int& r); +#ifdef DCPOMATIC_SENTRY + void add_crash_reporting_controls(wxGridBagSizer* table, int& r); +#endif void config_changed() override; private: @@ -59,6 +62,9 @@ private: void export_cinemas_file(); void check_for_updates_changed(); void check_for_test_updates_changed(); +#ifdef DCPOMATIC_SENTRY + void enable_crash_reporting_changed(); +#endif CheckBox* _set_language = nullptr; wxChoice* _language = nullptr; @@ -66,6 +72,9 @@ private: FilePickerCtrl* _cinemas_file = nullptr; CheckBox* _check_for_updates = nullptr; CheckBox* _check_for_test_updates = nullptr; +#ifdef DCPOMATIC_SENTRY + CheckBox* _enable_crash_reporting = nullptr; +#endif }; |
