xmlsecurity/inc/digitalsignaturesdialog.hxx | 1 + xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-)
New commits: commit 1da258a6269720f01e7c342e2b93e7834d86f02c Author: Szymon Kłos <[email protected]> AuthorDate: Wed Oct 27 13:04:17 2021 +0200 Commit: Szymon Kłos <[email protected]> CommitDate: Mon Jan 24 13:46:57 2022 +0100 Make Certificate not found dialog async Change-Id: I8da2a2dc763cffd13659b61966a954a6e1ef06a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124269 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Szymon Kłos <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128841 Tested-by: Jenkins diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx b/xmlsecurity/inc/digitalsignaturesdialog.hxx index f8ace3d976a6..28ed32ccb098 100644 --- a/xmlsecurity/inc/digitalsignaturesdialog.hxx +++ b/xmlsecurity/inc/digitalsignaturesdialog.hxx @@ -74,6 +74,7 @@ private: std::unique_ptr<weld::Button> m_xCloseBtn; std::shared_ptr<CertificateViewer> m_xViewer; + std::shared_ptr<weld::MessageDialog> m_xInfoBox; DECL_LINK(AdESCompliantCheckBoxHdl, weld::Toggleable&, void); DECL_LINK(ViewButtonHdl, weld::Button&, void); diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index fc7cf6b2a534..1d40e7562be1 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -206,6 +206,9 @@ DigitalSignaturesDialog::~DigitalSignaturesDialog() { if (m_xViewer) m_xViewer->response(RET_OK); + + if (m_xInfoBox) + m_xInfoBox->response(RET_OK); } bool DigitalSignaturesDialog::Init() @@ -785,10 +788,13 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails() } else { - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(m_xDialog.get(), - VclMessageType::Info, VclButtonsType::Ok, - XsResId(STR_XMLSECDLG_NO_CERT_FOUND))); - xInfoBox->run(); + if (m_xInfoBox) + m_xInfoBox->response(RET_OK); + + m_xInfoBox = std::shared_ptr<weld::MessageDialog>(Application::CreateMessageDialog(m_xDialog.get(), + VclMessageType::Info, VclButtonsType::Ok, + XsResId(STR_XMLSECDLG_NO_CERT_FOUND))); + m_xInfoBox->runAsync(m_xInfoBox, [this] (sal_Int32) { m_xInfoBox = nullptr; }); } }
