зеркало из https://github.com/mozilla/gecko-dev.git
fixed bug 149841 It should NOT be possible to open cert manager twice at the same time. r=kaie sr=alecf
This commit is contained in:
Родитель
e04e31b8c0
Коммит
1c850ced92
|
@ -33,6 +33,7 @@
|
|||
<!DOCTYPE window SYSTEM "chrome://pippki/locale/certManager.dtd">
|
||||
|
||||
<window id="certmanager"
|
||||
windowtype="mozilla:certmanager"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&certmgr.title;"
|
||||
onload="LoadCerts();">
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
]>
|
||||
|
||||
<window id="devicemanager"
|
||||
windowtype="mozilla:devicemanager"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
title="&devmgr.title;"
|
||||
persist="screenX screenY width height"
|
||||
|
|
|
@ -35,12 +35,30 @@
|
|||
|
||||
function openCertManager()
|
||||
{
|
||||
window.open('chrome://pippki/content/certManager.xul', "",
|
||||
'chrome,width=500,height=400,resizable=yes,dialog=no');
|
||||
//check for an existing certManager window and focus it; it's not application modal
|
||||
const kWindowMediatorContractID = "@mozilla.org/appshell/window-mediator;1";
|
||||
const kWindowMediatorIID = Components.interfaces.nsIWindowMediator;
|
||||
const kWindowMediator = Components.classes[kWindowMediatorContractID].getService(kWindowMediatorIID);
|
||||
var lastCertManager = kWindowMediator.getMostRecentWindow("mozilla:certmanager");
|
||||
if (lastCertManager)
|
||||
lastCertManager.focus();
|
||||
else {
|
||||
window.open('chrome://pippki/content/certManager.xul', "",
|
||||
'chrome,width=500,height=400,resizable=yes,dialog=no');
|
||||
}
|
||||
}
|
||||
|
||||
function openDeviceManager()
|
||||
{
|
||||
window.open('chrome://pippki/content/device_manager.xul', "devmgr",
|
||||
'chrome,width=540,height=360,resizable=yes');
|
||||
//check for an existing deviceManger window and focus it; it's not application modal
|
||||
const kWindowMediatorContractID = "@mozilla.org/appshell/window-mediator;1";
|
||||
const kWindowMediatorIID = Components.interfaces.nsIWindowMediator;
|
||||
const kWindowMediator = Components.classes[kWindowMediatorContractID].getService(kWindowMediatorIID);
|
||||
var lastCertManager = kWindowMediator.getMostRecentWindow("mozilla:devicemanager");
|
||||
if (lastCertManager)
|
||||
lastCertManager.focus();
|
||||
else {
|
||||
window.open('chrome://pippki/content/device_manager.xul', "devmgr",
|
||||
'chrome,width=540,height=360,resizable=yes');
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче