summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-10-27 13:04:17 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2021-10-29 14:48:25 +0200
commit21b594c1a55f1cda80e6ba66b0b902fb265e1c9e (patch)
treea6db538779af8e9e915dea22722f35f9493af9d5
parentd1c8e1627e39a6d816f82aa3a31d3092c35263f5 (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>
-rw-r--r--xmlsecurity/inc/digitalsignaturesdialog.hxx1
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx14
2 files changed, 11 insertions, 4 deletions
diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx b/xmlsecurity/inc/digitalsignaturesdialog.hxx
index 7ba84d2a677f..bac3a70470d2 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::ToggleButton&, void);
DECL_LINK(ViewButtonHdl, weld::Button&, void);
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 3179a5c09b20..86cf99c0288c 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -207,6 +207,9 @@ DigitalSignaturesDialog::~DigitalSignaturesDialog()
{
if (m_xViewer)
m_xViewer->response(RET_OK);
+
+ if (m_xInfoBox)
+ m_xInfoBox->response(RET_OK);
}
bool DigitalSignaturesDialog::Init()
@@ -784,10 +787,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; });
}
}