diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-04-17 00:24:39 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-04-17 00:24:39 +0100 |
| commit | aaf5f717651592df9292268b46f3b3ce09b36109 (patch) | |
| tree | c5da307763b938eea2cc58f6310be4c6d6d70184 /src | |
| parent | 35636d18928f801c1de3c8d1969e349a11d5463d (diff) | |
Try to warn about the dangers of not providing an email address on problem reports.
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/report_problem_dialog.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/wx/report_problem_dialog.cc b/src/wx/report_problem_dialog.cc index 407a7370b..3345e21f0 100644 --- a/src/wx/report_problem_dialog.cc +++ b/src/wx/report_problem_dialog.cc @@ -67,6 +67,29 @@ ReportProblemDialog::ReportProblemDialog (wxWindow* parent, shared_ptr<Film> fil _email->SetValue (std_to_wx (Config::instance()->kdm_from ())); _table->Add (_email, 1, wxEXPAND); + /* We can't use Wrap() here as it doesn't work with markup: + * http://trac.wxwidgets.org/ticket/13389 + */ + + wxString in = _("<i>It is important that you enter a valid email address here, otherwise I can't ask you for more details on your problem.</i>"); + wxString out; + int const width = 45; + int current = 0; + for (size_t i = 0; i < in.Length(); ++i) { + if (in[i] == ' ' && current >= width) { + out += '\n'; + current = 0; + } else { + out += in[i]; + ++current; + } + } + + wxStaticText* n = new wxStaticText (this, wxID_ANY, wxT ("")); + n->SetLabelMarkup (out); + _table->AddSpacer (0); + _table->Add (n, 1, wxEXPAND); + _overall_sizer->Layout (); _overall_sizer->SetSizeHints (this); } |
