From: Carl Hetherington Date: Mon, 16 Jan 2023 19:53:44 +0000 (+0100) Subject: Add set_recipient_file(). X-Git-Tag: v2.16.41~33 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=b8f53a53e5648340a5b33b04c412e85d4ccd71c0 Add set_recipient_file(). --- diff --git a/src/wx/screen_dialog.cc b/src/wx/screen_dialog.cc index bc39193fb..55be806d8 100644 --- a/src/wx/screen_dialog.cc +++ b/src/wx/screen_dialog.cc @@ -154,8 +154,8 @@ ScreenDialog::ScreenDialog ( ++r; add_label_to_sizer (_sizer, this, _("Filename"), true, wxGBPosition(r, 0)); - checked_set (_recipient_file, recipient_file.get_value_or("")); _recipient_file = new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(600, -1), wxST_ELLIPSIZE_MIDDLE | wxST_NO_AUTORESIZE); + set_recipient_file(recipient_file.get_value_or("")); _sizer->Add (_recipient_file, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP); ++r; @@ -249,7 +249,7 @@ ScreenDialog::load_recipient (boost::filesystem::path file) return; } set_recipient (c.leaf ()); - checked_set (_recipient_file, file.string()); + set_recipient_file(file.string()); } catch (dcp::MiscError& e) { error_dialog (this, _("Could not read certificate file."), std_to_wx(e.what())); } @@ -274,7 +274,7 @@ ScreenDialog::download_recipient () auto dialog = make_wx(this); if (dialog->ShowModal() == wxID_OK) { set_recipient(dialog->certificate()); - checked_set(_recipient_file, dialog->url()); + set_recipient_file(dialog->url()); } setup_sensitivity (); } @@ -300,3 +300,11 @@ ScreenDialog::set_recipient (optional r) _sizer->Layout (); } } + + +void +ScreenDialog::set_recipient_file(string file) +{ + checked_set(_recipient_file, file); +} + diff --git a/src/wx/screen_dialog.h b/src/wx/screen_dialog.h index 517218669..e623f3889 100644 --- a/src/wx/screen_dialog.h +++ b/src/wx/screen_dialog.h @@ -60,6 +60,7 @@ private: void download_recipient (); void setup_sensitivity (); void set_recipient (boost::optional); + void set_recipient_file(std::string file); void set_trusted_devices (std::vector d) { _trusted_devices = d;