зеркало из https://github.com/mozilla/gecko-dev.git
Bug 191818 File menu missing "Close other tabs" option r=shliang sr=jag a=asa
This commit is contained in:
Родитель
18fad264ac
Коммит
a3e1d90c48
|
@ -1160,6 +1160,30 @@ function BrowserEditBookmarks()
|
|||
}
|
||||
}
|
||||
|
||||
function updateCloseItems()
|
||||
{
|
||||
var browser = getBrowser();
|
||||
if (browser && browser.localName == 'tabbrowser' && browser.getStripVisibility()) {
|
||||
document.getElementById('menu_close').setAttribute('label', gNavigatorBundle.getString('tabs.closeTab'));
|
||||
document.getElementById('menu_closeWindow').hidden = false;
|
||||
document.getElementById('menu_closeOtherTabs').hidden = false;
|
||||
if (browser.mTabContainer.childNodes.length > 1)
|
||||
document.getElementById('cmd_closeOtherTabs').removeAttribute('disabled');
|
||||
else
|
||||
document.getElementById('cmd_closeOtherTabs').setAttribute('disabled', 'true');
|
||||
} else {
|
||||
document.getElementById('menu_close').setAttribute('label', gNavigatorBundle.getString('tabs.close'));
|
||||
document.getElementById('menu_closeWindow').hidden = true;
|
||||
document.getElementById('menu_closeOtherTabs').hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
function BrowserCloseOtherTabs()
|
||||
{
|
||||
var browser = getBrowser();
|
||||
browser.removeAllTabsBut(browser.mCurrentTab);
|
||||
}
|
||||
|
||||
function BrowserCloseTabOrWindow()
|
||||
{
|
||||
var browser = getBrowser();
|
||||
|
|
|
@ -124,6 +124,7 @@
|
|||
<command id="Browser:PrintPreview" oncommand="BrowserPrintPreview();"/>
|
||||
<command id="cmd_quit"/>
|
||||
<command id="cmd_close" oncommand="BrowserCloseTabOrWindow()"/>
|
||||
<command id="cmd_closeOtherTabs" oncommand="BrowserCloseOtherTabs()"/>
|
||||
<command id="cmd_closeWindow" oncommand="BrowserCloseWindow()"/>
|
||||
|
||||
<!-- Edit Menu -->
|
||||
|
@ -188,7 +189,7 @@
|
|||
<!-- Menu -->
|
||||
<menubar id="main-menubar" class="chromeclass-menubar">
|
||||
<menu id="menu_File">
|
||||
<menupopup id="menu_FilePopup" onpopupshowing="getContentAreaFrameCount();">
|
||||
<menupopup id="menu_FilePopup" onpopupshowing="updateCloseItems();getContentAreaFrameCount();">
|
||||
<menu id="menu_New">
|
||||
<menupopup id="menu_NewPopup">
|
||||
<!-- From utilityOverlay.xul -->
|
||||
|
@ -202,6 +203,7 @@
|
|||
<menuitem label="&openCmd.label;" accesskey="&openCmd.accesskey;" key="openLocationKb" command="Browser:Open"/>
|
||||
<menuitem label="&openFileCmd.label;" accesskey="&openFileCmd.accesskey;" key="openFileKb" command="Browser:OpenFile"/>
|
||||
<menuitem id="menu_close"/>
|
||||
<menuitem id="menu_closeOtherTabs" command="cmd_closeOtherTabs" label="&closeOtherTabs.label;"/>
|
||||
<menuitem id="menu_closeWindow" hidden="true" command="cmd_closeWindow" key="key_closeWindow" label="&closeWindow.label;"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&savePageCmd.label;" accesskey="&savePageCmd.accesskey;" key="key_savePage" command="Browser:SavePage"/>
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
<!ENTITY translateMenu.accesskey "T">
|
||||
<!ENTITY translate.commandKey "t">
|
||||
|
||||
<!ENTITY closeOtherTabs.label "Close Other Tabs">
|
||||
<!ENTITY closeWindow.label "Close Window">
|
||||
|
||||
<!-- I'd like all this to move to an overlay or something -->
|
||||
|
|
|
@ -56,6 +56,10 @@ switchskinstitle=Apply Theme
|
|||
# set the following value to false so it won't show up.
|
||||
showskinsdescription=true
|
||||
|
||||
# menu_close labels
|
||||
tabs.closeTab=Close Tab
|
||||
tabs.close=Close
|
||||
|
||||
# urlbarBindings.xml
|
||||
# LOCALIZATION NOTE: This is for the location bar drop-down string:
|
||||
# "Seach " + search_engine_name + " for " + user_input
|
||||
|
|
Загрузка…
Ссылка в новой задаче