зеркало из https://github.com/mozilla/gecko-dev.git
Bug 182359 only open one manager window of each type r=dwitte sr=darin
This commit is contained in:
Родитель
2dff18c7d7
Коммит
1c4c4c930a
|
@ -16,24 +16,35 @@
|
|||
* Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Neil Rashbrook <neil@parkwaycc.co.uk>
|
||||
*/
|
||||
|
||||
var COOKIEPERMISSION = 0;
|
||||
var IMAGEPERMISSION = 1;
|
||||
function openCookieViewer(viewerType)
|
||||
{
|
||||
const wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var enumerator = wm.getEnumerator("mozilla:cookieviewer");
|
||||
while (enumerator.hasMoreElements()) {
|
||||
var viewer = enumerator.getNext();
|
||||
if (viewer.arguments[0] == viewerType) {
|
||||
viewer.focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul",
|
||||
"_blank", "chrome,resizable", viewerType);
|
||||
}
|
||||
|
||||
function viewImages() {
|
||||
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","_blank",
|
||||
"chrome,resizable=yes", "imageManager" );
|
||||
openCookieViewer("imageManager");
|
||||
}
|
||||
|
||||
function viewCookies() {
|
||||
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","_blank",
|
||||
"chrome,resizable=yes", "cookieManager");
|
||||
openCookieViewer("cookieManager");
|
||||
}
|
||||
|
||||
function viewCookiesFromIcon() {
|
||||
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","_blank",
|
||||
"chrome,resizable=yes", "cookieManagerFromIcon");
|
||||
openCookieViewer("cookieManagerFromIcon");
|
||||
}
|
||||
|
||||
function viewP3P() {
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
buttons="accept,help"
|
||||
title="&windowtitle.label;"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
windowtype="mozilla:cookieviewer"
|
||||
style="width: 30em;"
|
||||
onload="Startup()"
|
||||
onunload="Shutdown()"
|
||||
|
|
|
@ -16,24 +16,35 @@
|
|||
* Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Neil Rashbrook <neil@parkwaycc.co.uk>
|
||||
*/
|
||||
|
||||
var COOKIEPERMISSION = 0;
|
||||
var IMAGEPERMISSION = 1;
|
||||
function openCookieViewer(viewerType)
|
||||
{
|
||||
const wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
|
||||
.getService(Components.interfaces.nsIWindowMediator);
|
||||
var enumerator = wm.getEnumerator("mozilla:cookieviewer");
|
||||
while (enumerator.hasMoreElements()) {
|
||||
var viewer = enumerator.getNext();
|
||||
if (viewer.arguments[0] == viewerType) {
|
||||
viewer.focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul",
|
||||
"_blank", "chrome,resizable", viewerType);
|
||||
}
|
||||
|
||||
function viewImages() {
|
||||
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","_blank",
|
||||
"chrome,resizable=yes", "imageManager" );
|
||||
openCookieViewer("imageManager");
|
||||
}
|
||||
|
||||
function viewCookies() {
|
||||
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","_blank",
|
||||
"chrome,resizable=yes", "cookieManager");
|
||||
openCookieViewer("cookieManager");
|
||||
}
|
||||
|
||||
function viewCookiesFromIcon() {
|
||||
window.openDialog("chrome://communicator/content/wallet/CookieViewer.xul","_blank",
|
||||
"chrome,resizable=yes", "cookieManagerFromIcon");
|
||||
openCookieViewer("cookieManagerFromIcon");
|
||||
}
|
||||
|
||||
function viewP3P() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче