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
This commit is contained in:
Szymon Kłos
2021-10-27 13:04:17 +02:00
parent 98d2c965ac
commit 1da258a626
2 changed files with 11 additions and 4 deletions

View File

@@ -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);

View File

@@ -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; });
}
}