summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-01-16 20:53:44 +0100
committerCarl Hetherington <cth@carlh.net>2023-01-16 20:53:44 +0100
commitb8f53a53e5648340a5b33b04c412e85d4ccd71c0 (patch)
tree73b16ac2d56daa7ece885ea0deeb0374fb87d4ca /src
parent275c1e78c022e5d8c41e4f718fab2c355f41f785 (diff)
Add set_recipient_file().
Diffstat (limited to 'src')
-rw-r--r--src/wx/screen_dialog.cc14
-rw-r--r--src/wx/screen_dialog.h1
2 files changed, 12 insertions, 3 deletions
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<DownloadCertificateDialog>(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<dcp::Certificate> 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<dcp::Certificate>);
+ void set_recipient_file(std::string file);
void set_trusted_devices (std::vector<TrustedDevice> d) {
_trusted_devices = d;