From e3434bc6b2dc641e7dec365782784526cc9c0a43 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Thu, 23 Nov 2017 22:18:09 +0100 Subject: gpg4libre: find keymanager executable on Windows Change-Id: If93c06ad90d708b0fbaf476bda6fdb902bd77b1e --- xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx index ba726e04d0a5..42ca15d05faf 100644 --- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx +++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx @@ -468,9 +468,17 @@ IMPL_LINK_NOARG(DigitalSignaturesDialog, RemoveButtonHdl, Button*, void) IMPL_STATIC_LINK_NOARG(DigitalSignaturesDialog, CertMgrButtonHdl, Button*, void) { - const OUString aGUIServers[] = { OUString("kleopatra"), OUString("seahorse"), OUString("gpa"), OUString("kgpg") }; - // FIXME: the same for Windows + registry search for gpg4win +#ifdef _WIN32 + // FIXME: call GpgME::dirInfo("bindir") somewhere in + // SecurityEnvironmentGpg or whatnot + // FIXME: perhaps poke GpgME for uiserver, and hope it returns something useful? + const OUString aGUIServers[] = { OUString("kleopatra.exe"), OUString("launch-gpa.exe"), OUString("gpa.exe"), + OUString("bin\\kleopatra.exe"), OUString("bin\\launch-gpa.exe"), OUString("bin\\gpa.exe") }; + const char* cPath = "C:\\Program Files (x86)\\GNU\\GnuPG"; +#else + const OUString aGUIServers[] = { OUString("kleopatra"), OUString("seahorse"), OUString("gpa"), OUString("kgpg") }; const char* cPath = getenv("PATH"); +#endif if (cPath) { -- cgit