Bug 328156 - Window menu: blank line for open About box, r=mano

This commit is contained in:
Markus Amalthea Magnuson 2010-01-05 18:35:58 -05:00
parent 823e864469
commit d3bfe91c55
3 changed files with 6 additions and 6 deletions

View File

@ -57,6 +57,7 @@
windowtype="Browser:About"
onload="init(event);" onunload="uninit(event);"
#ifdef XP_MACOSX
inwindowmenu="false"
buttons="extra2"
align="end"
#else

View File

@ -16,7 +16,7 @@
<menu id="windowMenu"
label="&windowMenu.label;"
datasources="rdf:window-mediator" ref="NC:WindowMediatorRoot"
onpopupshowing="checkFocusedWindow();"
onpopupshowing="macWindowMenuDidShow();"
hidden="false">
<template>
<rule>

View File

@ -35,21 +35,20 @@
#
# ***** END LICENSE BLOCK *****
function checkFocusedWindow()
function macWindowMenuDidShow()
{
var windowManagerDS =
Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator']
.getService(Components.interfaces.nsIWindowDataSource);
var sep = document.getElementById("sep-window-list");
// Using double parens to avoid warning
while ((sep = sep.nextSibling)) {
var url = sep.getAttribute('id');
var win = windowManagerDS.getWindowForResource(url);
if (win == window) {
if (win.document.documentElement.getAttribute("inwindowmenu") == "false")
sep.hidden = true;
else if (win == window)
sep.setAttribute("checked", "true");
break;
}
}
}