зеркало из https://github.com/mozilla/pjs.git
67139 - title of active window should be checked in tasks menu. r=ben sr=hewitt
This commit is contained in:
Родитель
90eb546c38
Коммит
ad3a80978a
|
@ -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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче