xmlsecurity/inc/digitalsignaturesdialog.hxx | 1 + xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-)
New commits: commit 601d3094547649f088638faa168010eb0bb18136 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed Oct 27 13:04:17 2021 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Fri Oct 29 10:25:07 2021 +0200 Make Certificate not found dialog async Change-Id: I8da2a2dc763cffd13659b61966a954a6e1ef06a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124267 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx b/xmlsecurity/inc/digitalsignaturesdialog.hxx index 64fd26bae169..848a2deeac80 100644 --- a/xmlsecurity/inc/digitalsignaturesdialog.hxx +++ b/xmlsecurity/inc/digitalsignaturesdialog.hxx @@ -81,6 +81,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::ToggleButton&, void); DECL_LINK(ViewButtonHdl, weld::Button&, void); diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index 9c8a48c0df48..a27737668eba 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -202,6 +202,9 @@ DigitalSignaturesDialog::~DigitalSignaturesDialog() { if (m_xViewer) m_xViewer->response(RET_OK); + + if (m_xInfoBox) + m_xInfoBox->response(RET_OK); } bool DigitalSignaturesDialog::Init() @@ -778,10 +781,13 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails() } else { - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(m_xDialog.get(), + 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))); - xInfoBox->run(); + m_xInfoBox->runAsync(m_xInfoBox, [this] (sal_Int32) { m_xInfoBox = nullptr; }); } } }