Bug 182359 only open one manager window of each type r=dwitte sr=darin

This commit is contained in:
neil%parkwaycc.co.uk 2003-10-07 10:03:21 +00:00
Родитель 2dff18c7d7
Коммит 1c4c4c930a
3 изменённых файлов: 39 добавлений и 16 удалений

Просмотреть файл

@ -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() {