summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
diff options
context:
space:
mode:
authorThorsten Behrens <thorsten.behrens@cib.de>2017-11-23 22:18:09 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-12-07 18:21:02 +0100
commitc22236d733eff274cbd18e72109ff440177fab67 (patch)
treef8b41f86740d94e38ec2e01ccfb0c56bb36a8996 /xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
parent0a58fdfdf48ec95295eca195b07424e98381af3f (diff)
gpg4libre: find keymanager executable on Windows
Change-Id: If93c06ad90d708b0fbaf476bda6fdb902bd77b1e
Diffstat (limited to 'xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx')
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx12
1 files changed, 10 insertions, 2 deletions
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)
{