67139 - title of active window should be checked in tasks menu. r=ben sr=hewitt

This commit is contained in:
blakeross%telocity.com 2006-07-29 05:40:16 +00:00
Родитель 90eb546c38
Коммит ad3a80978a
2 изменённых файлов: 20 добавлений и 3 удалений

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

@ -216,4 +216,20 @@ function ShowUpdateFromResource( node )
OpenTaskURL( "http://www.mozilla.org/binaries.html");
}
function checkFocusedWindow()
{
var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService();
var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator);
var sep = document.getElementById("sep-window-list");
while (sep = sep.nextSibling) {
var url = sep.getAttribute('id');
var win = windowManagerInterface.getWindowForResource(url);
if (win == window) {
sep.setAttribute("checked", "true");
break;
}
}
}

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

@ -29,11 +29,12 @@
<!-- Tasks Menu -->
<menu id="tasksMenu" label="&tasksMenu.label;" accesskey="&tasksMenu.accesskey;" datasources="rdf:window-mediator" ref="NC:WindowMediatorRoot">
<menu id="tasksMenu" label="&tasksMenu.label;" accesskey="&tasksMenu.accesskey;" datasources="rdf:window-mediator" ref="NC:WindowMediatorRoot"
onpopupshown="checkFocusedWindow();">
<template>
<rule>
<menupopup>
<menuitem uri="rdf:*" label="rdf:http://home.netscape.com/NC-rdf#KeyIndex rdf:http://home.netscape.com/NC-rdf#Name"
<menuitem uri="rdf:*" label="rdf:http://home.netscape.com/NC-rdf#KeyIndex rdf:http://home.netscape.com/NC-rdf#Name" type="radio"
oncommand="ShowWindowFromResource(event.target)" accesskey="rdf:http://home.netscape.com/NC-rdf#KeyIndex"/>
</menupopup>
</rule>
@ -62,7 +63,7 @@
<menuitem label="&javaScriptConsoleCmd.label;" accesskey="&javaScriptConsoleCmd.accesskey;" oncommand="toJavaScriptConsole();"/>
</menupopup>
</menu>
<menuseparator/>
<menuseparator id="sep-window-list"/>
</menupopup>
</menu>