diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-10-27 13:04:17 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2022-01-24 13:46:57 +0100 |
commit | 1da258a6269720f01e7c342e2b93e7834d86f02c (patch) | |
tree | 50d2f915421a7cd88f6dabf0d74f553d187c004c /xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | |
parent | 98d2c965aca67f59a27c0a9a7a3bc6e4fdb90950 (diff) |
Make Certificate not found dialog async
Change-Id: I8da2a2dc763cffd13659b61966a954a6e1ef06a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124269
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128841
Tested-by: Jenkins
Diffstat (limited to 'xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx')
-rw-r--r-- | xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
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; }); } } |