diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-04-26 11:53:40 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-04-26 11:53:40 +0200 |
| commit | 74e944d9ba137386efff089f9906e64d255836c9 (patch) | |
| tree | e4b15b1d1164c069b6df036f4f4c0316c665a7e1 /src/lib | |
| parent | 17ef19940f152ceeb2e1ad696dd5e7ac5917d8cd (diff) | |
Allow customisation of error report email address.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/constants.h | 1 | ||||
| -rw-r--r-- | src/lib/job.cc | 8 | ||||
| -rw-r--r-- | src/lib/util.cc | 7 | ||||
| -rw-r--r-- | src/lib/util.h | 1 | ||||
| -rw-r--r-- | src/lib/variant.cc | 8 | ||||
| -rw-r--r-- | src/lib/variant.h | 2 |
6 files changed, 22 insertions, 5 deletions
diff --git a/src/lib/constants.h b/src/lib/constants.h index bfe144420..cfa156778 100644 --- a/src/lib/constants.h +++ b/src/lib/constants.h @@ -29,7 +29,6 @@ #define DCPOMATIC_HELLO "I mean really, Ray, it's used." /** Number of films to keep in history */ #define HISTORY_SIZE 10 -#define REPORT_PROBLEM _("Please report this problem by using Help -> Report a problem or via email to carl@dcpomatic.com") #define TEXT_FONT_ID "font" /** Largest KDM size (in bytes) that will be accepted */ #define MAX_KDM_SIZE (256 * 1024) diff --git a/src/lib/job.cc b/src/lib/job.cc index 94c23aac6..ee6ad4e70 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -167,7 +167,7 @@ Job::run_wrapper () if (!done) { set_error ( e.what (), - string (_("It is not known what caused this error.")) + " " + REPORT_PROBLEM + String::compose(_("It is not known what caused this error. %1"), report_problem()) ); } @@ -202,7 +202,7 @@ Job::run_wrapper () } else { set_error ( e.what (), - string (_("It is not known what caused this error.")) + " " + REPORT_PROBLEM + String::compose(_("It is not known what caused this error. %1"), report_problem()) ); } @@ -262,7 +262,7 @@ Job::run_wrapper () set_error ( e.what (), - string (_("It is not known what caused this error.")) + " " + REPORT_PROBLEM + String::compose(_("It is not known what caused this error. %1"), report_problem()) ); set_progress (1); @@ -272,7 +272,7 @@ Job::run_wrapper () set_error ( _("Unknown error"), - string (_("It is not known what caused this error.")) + " " + REPORT_PROBLEM + String::compose(_("It is not known what caused this error. %1"), report_problem()) ); set_progress (1); diff --git a/src/lib/util.cc b/src/lib/util.cc index b727d7b68..2f5c1ce49 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -1178,3 +1178,10 @@ screen_names_to_string(vector<string> names) return result.substr(0, result.length() - 2); } + +string +report_problem() +{ + return String::compose(_("Please report this problem by using Help -> Report a problem or via email to %1"), variant::report_problem_email()); +} + diff --git a/src/lib/util.h b/src/lib/util.h index 4f64369d3..eac855bef 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -116,4 +116,5 @@ number_attribute(cxml::ConstNodePtr node, std::string name1, std::string name2) extern std::string screen_names_to_string(std::vector<std::string> names); +extern std::string report_problem(); #endif diff --git a/src/lib/variant.cc b/src/lib/variant.cc index 4434993b1..829a7d6e6 100644 --- a/src/lib/variant.cc +++ b/src/lib/variant.cc @@ -36,6 +36,8 @@ static char const* _dcpomatic_playlist_editor = "DCP-o-matic Playlist Editor"; static char const* _dcpomatic_combiner = "DCP-o-matic Combiner"; static char const* _dcpomatic_batch_converter = "DCP-o-matic Batch Converter"; +static char const* _report_problem_email = "carl@dcpomatic.com"; + static bool const _show_splash = true; static bool const _show_tagline = true; static bool const _show_dcpomatic_website = true; @@ -155,3 +157,9 @@ variant::show_dcpomatic_website() return _show_dcpomatic_website; } +std::string +variant::report_problem_email() +{ + return _report_problem_email; +} + diff --git a/src/lib/variant.h b/src/lib/variant.h index f0482ca01..9bcbb234e 100644 --- a/src/lib/variant.h +++ b/src/lib/variant.h @@ -44,6 +44,8 @@ std::string dcpomatic_app(); std::string dcpomatic_batch_converter_app(); std::string dcpomatic_player_app(); +std::string report_problem_email(); + bool show_splash(); bool show_tagline(); bool show_dcpomatic_website(); |
