зеркало из https://github.com/mozilla/gecko-dev.git
Bug 328156 - Window menu: blank line for open About box, r=mano
This commit is contained in:
Родитель
d85823fed6
Коммит
49df520432
|
@ -57,6 +57,7 @@
|
|||
windowtype="Browser:About"
|
||||
onload="init(event);" onunload="uninit(event);"
|
||||
#ifdef XP_MACOSX
|
||||
inwindowmenu="false"
|
||||
buttons="extra2"
|
||||
align="end"
|
||||
#else
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче