From 9f327102c435887bbae650b3a573f44500b6f534 Mon Sep 17 00:00:00 2001 From: TokieSan Date: Thu, 10 Aug 2023 04:05:23 +0300 Subject: Removed Type and Usage Columns from Certificate Chooser Both columns are irrelevant in the main dialog's view, can be viewed through viewing certificate's details. Change-Id: I265a7e125c2679f3a05dba4414f4104f3a5cac2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155746 Tested-by: Jenkins Reviewed-by: Heiko Tietze --- xmlsecurity/source/dialogs/certificatechooser.cxx | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'xmlsecurity/source') diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index c7f055deea16..be3e88f9d453 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -57,14 +57,6 @@ CertificateChooser::CertificateChooser(weld::Window* _pParent, m_xCertLB->set_size_request(nControlWidth, m_xCertLB->get_height_rows(12)); m_xCertLB->make_sorted(); - std::vector aWidths - { - o3tl::narrowing(30*nControlWidth/100), - o3tl::narrowing(30*nControlWidth/100), - o3tl::narrowing(10*nControlWidth/100), - o3tl::narrowing(20*nControlWidth/100) - }; - m_xCertLB->set_column_fixed_widths(aWidths); m_xCertLB->connect_changed( LINK( this, CertificateChooser, CertificateHighlightHdl ) ); m_xCertLB->connect_row_activated( LINK( this, CertificateChooser, CertificateSelectHdl ) ); m_xViewBtn->connect_clicked( LINK( this, CertificateChooser, ViewButtonHdl ) ); @@ -225,6 +217,7 @@ void CertificateChooser::ImplInitialize(bool mbSearch) mvUserData.push_back(userData); OUString sIssuer = xmlsec::GetContentPart( xCert->getIssuerName(), xCert->getCertificateKind()); + OUString sExpDate = utl::GetDateString(xCert->getNotValidAfter()); // If we are searching and there is no match skip if (mbSearch @@ -235,13 +228,11 @@ void CertificateChooser::ImplInitialize(bool mbSearch) m_xCertLB->append(); int nRow = m_xCertLB->n_children() - 1; - m_xCertLB->set_text(nRow, xmlsec::GetContentPart(xCert->getSubjectName(), xCert->getCertificateKind()), 0); - m_xCertLB->set_text(nRow, sIssuer, 1); - m_xCertLB->set_text(nRow, xmlsec::GetCertificateKind(xCert->getCertificateKind()), 2); - m_xCertLB->set_text(nRow, utl::GetDateString(xCert->getNotValidAfter()), 3); - m_xCertLB->set_text(nRow, UsageInClearText(xCert->getCertificateUsage()), 4); OUString sId(weld::toId(userData.get())); m_xCertLB->set_id(nRow, sId); + m_xCertLB->set_text(nRow, xmlsec::GetContentPart(xCert->getSubjectName(), xCert->getCertificateKind()), 0); + m_xCertLB->set_text(nRow, sIssuer, 1); + m_xCertLB->set_text(nRow, sExpDate, 2); #if HAVE_FEATURE_GPGME // only GPG has preferred keys -- cgit