diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-16 21:20:02 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-01-16 21:20:14 +0100 |
| commit | 5063594e6836cfabed7d55f4963da9c8cf3b9f11 (patch) | |
| tree | 40786904b280a6454134feabfba9f17c381c078c /src | |
| parent | 7ac2d256ba45896693c68da63e8810e910b3d835 (diff) | |
Add subject/issuer details to the screen dialog (#2422).
Diffstat (limited to 'src')
| -rw-r--r-- | src/wx/screen_dialog.cc | 27 | ||||
| -rw-r--r-- | src/wx/screen_dialog.h | 4 |
2 files changed, 30 insertions, 1 deletions
diff --git a/src/wx/screen_dialog.cc b/src/wx/screen_dialog.cc index 7323f655c..b985888ea 100644 --- a/src/wx/screen_dialog.cc +++ b/src/wx/screen_dialog.cc @@ -143,7 +143,6 @@ ScreenDialog::ScreenDialog ( auto s = new wxBoxSizer (wxHORIZONTAL); _recipient_thumbprint = new StaticText (this, wxT (""), wxDefaultPosition, size); _recipient_thumbprint->SetFont (font); - set_recipient (recipient); _get_recipient_from_file = new Button (this, _("Get from file...")); _download_recipient = new Button (this, _("Download...")); @@ -159,6 +158,28 @@ ScreenDialog::ScreenDialog ( _sizer->Add (_recipient_file, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP); ++r; + add_label_to_sizer(_sizer, this, _("Subject common name"), true, wxGBPosition(r, 0)); + _subject_common_name = new wxStaticText(this, wxID_ANY, wxT("")); + _sizer->Add(_subject_common_name, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP); + ++r; + + add_label_to_sizer(_sizer, this, _("Subject organization name"), true, wxGBPosition(r, 0)); + _subject_organization_name = new wxStaticText(this, wxID_ANY, wxT("")); + _sizer->Add(_subject_organization_name, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP); + ++r; + + add_label_to_sizer(_sizer, this, _("Issuer common name"), true, wxGBPosition(r, 0)); + _issuer_common_name = new wxStaticText(this, wxID_ANY, wxT("")); + _sizer->Add(_issuer_common_name, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP); + ++r; + + add_label_to_sizer(_sizer, this, _("Issuer organization name"), true, wxGBPosition(r, 0)); + _issuer_organization_name = new wxStaticText(this, wxID_ANY, wxT("")); + _sizer->Add(_issuer_organization_name, wxGBPosition(r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_Y_GAP); + ++r; + + set_recipient (recipient); + { int flags = wxALIGN_CENTER_VERTICAL | wxTOP; #ifdef __WXOSX__ @@ -297,6 +318,10 @@ ScreenDialog::set_recipient (optional<dcp::Certificate> r) if (_recipient) { _recipient_thumbprint->SetLabel (std_to_wx (_recipient->thumbprint ())); + _subject_common_name->SetLabel(std_to_wx(_recipient->subject_common_name())); + _subject_organization_name->SetLabel(std_to_wx(_recipient->subject_organization_name())); + _issuer_common_name->SetLabel(std_to_wx(_recipient->issuer_common_name())); + _issuer_organization_name->SetLabel(std_to_wx(_recipient->issuer_organization_name())); _sizer->Layout (); } } diff --git a/src/wx/screen_dialog.h b/src/wx/screen_dialog.h index e623f3889..0069b9fa3 100644 --- a/src/wx/screen_dialog.h +++ b/src/wx/screen_dialog.h @@ -71,6 +71,10 @@ private: wxTextCtrl* _notes; wxStaticText* _recipient_thumbprint; wxStaticText* _recipient_file; + wxStaticText* _subject_common_name; + wxStaticText* _subject_organization_name; + wxStaticText* _issuer_common_name; + wxStaticText* _issuer_organization_name; wxButton* _get_recipient_from_file; wxButton* _download_recipient; EditableList<TrustedDevice, TrustedDeviceDialog>* _trusted_device_list; |
