summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorJan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>2019-10-23 11:11:56 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2019-10-23 13:54:15 +0200
commit978fffefb15078d52be66463834c8b19ad78af4b (patch)
tree56cf583f46b22de901fafc62e4606283a8ccc355 /cui
parentaa40976cb91cde4940d97203e94660be04bdda1d (diff)
tdf#127909 follow the NSSInitializer selection
NSSInitializer contains the copy of the algorithm used in the certificate path selection dialog, but with commit aceab9cbf104 ("tdf#127909 don't always select the first entry") these were desynced, as the first default profile should be selected not the last one. Change-Id: I07816c74eb1184df17e4d251f27ff0bee715e82d Reviewed-on: https://gerrit.libreoffice.org/81367 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/certpath.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index 6f52fcbf1926..c5b496c08440 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -58,6 +58,7 @@ CertPathDialog::CertPathDialog(weld::Window* pParent)
"thunderbird",
"firefox",
"mozilla" };
+ bool bSelected = false;
uno::Reference<mozilla::XMozillaBootstrap> xMozillaBootstrap = mozilla::MozillaBootstrap::create( comphelper::getProcessComponentContext() );
@@ -78,7 +79,10 @@ CertPathDialog::CertPathDialog(weld::Window* pParent)
{
OUString sEntry = OUString::createFromAscii(productNames[i]) + ":" + sProfileName;
OUString sProfilePath = xMozillaBootstrap->getProfilePath(productTypes[i], sProfileName);
- AddCertPath(sEntry, sProfilePath, sProfileName == sDefaultProfile);
+ const bool bSelectDefaultProfile = !bSelected && sProfileName == sDefaultProfile;
+ AddCertPath(sEntry, sProfilePath, bSelectDefaultProfile);
+ if (bSelectDefaultProfile)
+ bSelected = true;
}
}
}