зеркало из https://github.com/mozilla/pjs.git
85386 - Navigator menu cleanup.
Rearrange content of view menu r=jag, sr=blake, a=asa
This commit is contained in:
Родитель
3b3fabac52
Коммит
dc7ca2e90e
|
@ -255,12 +255,6 @@ function Startup()
|
|||
if (homePage)
|
||||
document.getElementById("home-button").setAttribute("tooltiptext", homePage);
|
||||
|
||||
try {
|
||||
var searchMode = pref.GetIntPref("browser.search.mode");
|
||||
setBrowserSearchMode(searchMode);
|
||||
} catch (ex) {
|
||||
}
|
||||
|
||||
// initialize observers and listeners
|
||||
window.XULBrowserWindow = new nsBrowserStatusHandler();
|
||||
window.buttonPrefListener = new nsButtonPrefListener();
|
||||
|
@ -675,22 +669,6 @@ function OpenSearch(tabName, forceDialogFlag, searchStr)
|
|||
RevealSearchPanel();
|
||||
}
|
||||
|
||||
function setBrowserSearchMode(searchMode)
|
||||
{
|
||||
// set search mode preference
|
||||
try {
|
||||
pref.SetIntPref("browser.search.mode", searchMode);
|
||||
} catch (ex) {
|
||||
}
|
||||
|
||||
// update search menu
|
||||
var simpleMenuItem = document.getElementById("simpleSearch");
|
||||
simpleMenuItem.setAttribute("checked", (searchMode == 0) ? "true" : "false");
|
||||
|
||||
var advancedMenuItem = document.getElementById("advancedSearch");
|
||||
advancedMenuItem.setAttribute("checked", (searchMode == 1) ? "true" : "false");
|
||||
}
|
||||
|
||||
function RevealSearchPanel()
|
||||
{
|
||||
var searchPanel = document.getElementById("urn:sidebar:panel:search");
|
||||
|
|
|
@ -252,12 +252,6 @@ function Startup()
|
|||
if (homePage)
|
||||
document.getElementById("home-button").setAttribute("tooltiptext", homePage);
|
||||
|
||||
try {
|
||||
var searchMode = pref.GetIntPref("browser.search.mode");
|
||||
setBrowserSearchMode(searchMode);
|
||||
} catch (ex) {
|
||||
}
|
||||
|
||||
// initialize observers and listeners
|
||||
window.XULBrowserWindow = new nsBrowserStatusHandler();
|
||||
window.buttonPrefListener = new nsButtonPrefListener();
|
||||
|
@ -706,39 +700,6 @@ function OpenSearch(tabName, forceDialogFlag, searchStr)
|
|||
RevealSearchPanel();
|
||||
}
|
||||
|
||||
function syncSearchModeMenuWithPref()
|
||||
{
|
||||
try {
|
||||
var searchMode = pref.GetIntPref("browser.search.mode");
|
||||
|
||||
// update search menu
|
||||
var simpleMenuItem = document.getElementById("simpleSearch");
|
||||
simpleMenuItem.setAttribute("checked",
|
||||
(searchMode == 0) ? "true" : "false");
|
||||
|
||||
var advancedMenuItem = document.getElementById("advancedSearch");
|
||||
advancedMenuItem.setAttribute("checked",
|
||||
(searchMode == 1) ? "true" : "false");
|
||||
} catch (ex) {
|
||||
}
|
||||
}
|
||||
|
||||
function setBrowserSearchMode(searchMode)
|
||||
{
|
||||
// set search mode preference
|
||||
try {
|
||||
pref.SetIntPref("browser.search.mode", searchMode);
|
||||
} catch (ex) {
|
||||
}
|
||||
|
||||
// update search menu
|
||||
var simpleMenuItem = document.getElementById("simpleSearch");
|
||||
simpleMenuItem.setAttribute("checked", (searchMode == 0) ? "true" : "false");
|
||||
|
||||
var advancedMenuItem = document.getElementById("advancedSearch");
|
||||
advancedMenuItem.setAttribute("checked", (searchMode == 1) ? "true" : "false");
|
||||
}
|
||||
|
||||
function RevealSearchPanel()
|
||||
{
|
||||
var searchPanel = document.getElementById("urn:sidebar:panel:search");
|
||||
|
|
|
@ -216,7 +216,7 @@ Contributor(s): ______________________________________. -->
|
|||
<!-- "Bookmarks" button on personal toolbar -->
|
||||
<menubutton class="button-toolbar bookmark-item" id="bookmarks-button"
|
||||
persist="hidden" label="&bookmarksButton.label;" hidden="false"
|
||||
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch rdf:httpindex"
|
||||
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
|
||||
ref="NC:BookmarksRoot" container="true" flags="dont-test-empty"
|
||||
oncommand="OpenBookmarkURL(event.target,document.getElementById('BookmarksMenu').database)"
|
||||
template="bookmarksMenuTemplate">
|
||||
|
@ -231,7 +231,7 @@ Contributor(s): ______________________________________. -->
|
|||
|
||||
<!-- Personal toolbar items -->
|
||||
<hbox id="innermostBox" flex="1" style="min-width: 1px;" context="bmContext"
|
||||
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch rdf:httpindex"
|
||||
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
|
||||
ref="NC:PersonalToolbarFolder" flags="dont-test-empty"
|
||||
type="http://home.netscape.com/NC-rdf#Folder"
|
||||
oncommand="OpenBookmarkURL(event.target, document.getElementById('innermostBox').database)">
|
||||
|
@ -264,6 +264,7 @@ Contributor(s): ______________________________________. -->
|
|||
|
||||
<rule parent="hbox">
|
||||
<button class="button-toolbar bookmark-item" uri="rdf:*" editable="true"
|
||||
status="rdf:http://home.netscape.com/WEB-rdf#status"
|
||||
tooltip="aTooltip" tooltiptext="rdf:http://home.netscape.com/NC-rdf#URL"
|
||||
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
|
||||
label="rdf:http://home.netscape.com/NC-rdf#Name" crop="right"/>
|
||||
|
@ -301,6 +302,7 @@ Contributor(s): ______________________________________. -->
|
|||
<rule>
|
||||
<menupopup>
|
||||
<menuitem class="menuitem-iconic bookmark-item" uri="rdf:*"
|
||||
status="rdf:http://home.netscape.com/WEB-rdf#status"
|
||||
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
|
||||
label="rdf:http://home.netscape.com/NC-rdf#Name"/>
|
||||
</menupopup>
|
||||
|
@ -328,22 +330,17 @@ Contributor(s): ______________________________________. -->
|
|||
ondraggesture="nsDragAndDrop.startDrag(event, contentAreaDNDObserver);"/>
|
||||
</hbox>
|
||||
</vbox>
|
||||
</hbox>
|
||||
|
||||
<statusbar id="status-bar" class="chromeclass-status"
|
||||
ondragover="nsDragAndDrop.dragOver(event, contentAreaDNDObserver);"
|
||||
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);"
|
||||
>
|
||||
</hbox>
|
||||
|
||||
<statusbar id="status-bar" class="chromeclass-status"
|
||||
ondragover="nsDragAndDrop.dragOver(event, contentAreaDNDObserver);"
|
||||
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
|
||||
<box id="component-bar"/>
|
||||
<statusbarpanel id="statusbar-display" label="&statusText.label;" crop="right" flex="1"/>
|
||||
<progressmeter class="progressmeter-statusbar" statusbar="true" id="statusbar-icon" mode="normal" value="0"/>
|
||||
<statusbarpanel class="statusbarpanel-icononly" id="offline-status"/>
|
||||
<statusbarpanel class="statusbarpanel-icononly" id="security-button"/>
|
||||
<resizer class="window-diagonal"/>
|
||||
</statusbar>
|
||||
|
||||
|
||||
|
||||
|
||||
</statusbar>
|
||||
|
||||
</window>
|
||||
|
|
|
@ -200,6 +200,9 @@
|
|||
<menuseparator/>
|
||||
<menuitem id="menu_selectAll"/>
|
||||
<menuseparator />
|
||||
<menuitem id="menu_find" label="&findOnCmd.label;" accesskey="&findOnCmd.accesskey;" key="key_find" command="Browser:Find"/>
|
||||
<menuitem id="menu_findAgain" label="&findAgainCmd.label;" accesskey="&findAgainCmd.accesskey;" key="key_findAgain" command="Browser:FindAgain"/>
|
||||
<menuseparator />
|
||||
<menuitem id="menu_preferences" oncommand="goPreferences('navigator.xul', 'chrome://communicator/content/pref/pref-navigator.xul', 'navigator')"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
@ -214,6 +217,19 @@
|
|||
</menupopup>
|
||||
</menu>
|
||||
<menuseparator />
|
||||
|
||||
<menu accesskey="&goMenu.accesskey;" label="&goMenu.label;" oncommand="gotoHistoryIndex(event);">
|
||||
<menupopup oncreate="updateGoMenu(event);">
|
||||
<menuitem label="&goBackCmd.label;" accesskey="&goBackCmd.accesskey;" key="goBackKb" command="Browser:Back"/>
|
||||
<menuitem label="&goForwardCmd.label;" accesskey="&goForwardCmd.accesskey;" key="goForwardKb" command="Browser:Forward"/>
|
||||
<menuitem label="&goHomeCmd.label;" accesskey="&goHomeCmd.accesskey;" command="Browser:Home" key="goHome"/>
|
||||
<menuseparator hidden="true"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuitem label="&stopCmd.label;" accesskey="&stopCmd.accesskey;" id="menuitem-stop" oncommand="BrowserStop();" key="key_stop"/>
|
||||
<menuitem accesskey="&reloadCmd.accesskey;" key="key_reload" label="&reloadCmd.label;" oncommand="BrowserReload();"/>
|
||||
<menuitem label="&showImagesCmd.label;" accesskey="&showImagesCmd.accesskey;" disabled="true" oncommand="BrowserReload();"/>
|
||||
<menuseparator />
|
||||
|
||||
<!-- overlayed from viewZoomOverlay.xul -->
|
||||
<menu id="menu_textZoom"/>
|
||||
|
@ -223,33 +239,12 @@
|
|||
<menuitem label="&useStyleSheetNone.label;" id="authssnoopt" type="radio" name="authorstyle" oncommand="stylesheetSwitch(window._content.document, '')"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuseparator />
|
||||
<menuitem accesskey="&reloadCmd.accesskey;" key="key_reload" label="&reloadCmd.label;" oncommand="BrowserReload();"/>
|
||||
<menuitem label="&showImagesCmd.label;" accesskey="&showImagesCmd.accesskey;" disabled="true" oncommand="BrowserReload();"/>
|
||||
<menuitem label="&stopCmd.label;" accesskey="&stopCmd.accesskey;" id="menuitem-stop" oncommand="BrowserStop();" key="key_stop"/>
|
||||
<menu id="charsetMenu" />
|
||||
<menuitem accesskey="&translateMenu.accesskey;" label="&translateMenu.label;" oncommand="Translate();"/>
|
||||
<menuseparator />
|
||||
<menuitem accesskey="&pageSourceCmd.accesskey;" label="&pageSourceCmd.label;" key="key_viewSource" command="View:PageSource"/>
|
||||
<menuitem accesskey="&pageInfoCmd.accesskey;" label="&pageInfoCmd.label;" key="key_viewInfo" command="View:PageInfo"/>
|
||||
<menuseparator />
|
||||
|
||||
<menuitem accesskey="&translateMenu.accesskey;" label="&translateMenu.label;" oncommand="Translate();"/>
|
||||
<menu label="&webContentMenu.label;" accesskey="&webContentMenu.accesskey;">
|
||||
<menupopup
|
||||
datasources="rdf:chrome" ref="urn:mozilla:locale:root"
|
||||
sortResource="http://www.mozilla.org/rdf/chrome#name"
|
||||
sortDirection="ascending" oncommand="selectLocale(event)">
|
||||
<menuitem label="&downloadMore.label;" accesskey="&downloadMore.accesskey;"
|
||||
oncommand="loadXURL('urn:clienturl:viewmenu:intlwebcontent');"/>
|
||||
<menuseparator/>
|
||||
<template>
|
||||
<menuitem class="standard" uri="rdf:*"
|
||||
label="rdf:http://www.mozilla.org/rdf/chrome#displayName"
|
||||
value="rdf:http://www.mozilla.org/rdf/chrome#name"/>
|
||||
</template>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu id = "charsetMenu" />
|
||||
<menuseparator/>
|
||||
<menu label="&applyTheme.label;" accesskey="&applyTheme.accesskey;">
|
||||
<menupopup datasources="rdf:chrome" ref="urn:mozilla:skin:root" oncommand="applyTheme(event.target)">
|
||||
|
@ -267,31 +262,12 @@
|
|||
</menu>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
|
||||
<menu accesskey="&searchMenu.accesskey;" label="&searchMenu.label;">
|
||||
<menupopup id="searchMenu">
|
||||
<menuitem label="&findOnCmd.label;" accesskey="&findOnCmd.accesskey;" key="key_find" command="Browser:Find"/>
|
||||
<menuitem label="&findAgainCmd.label;" accesskey="&findAgainCmd.accesskey;" key="key_findAgain" command="Browser:FindAgain"/>
|
||||
<menuseparator />
|
||||
<menuitem label="&searchInternetCmd.label;" accesskey="&searchInternetCmd.accesskey;" oncommand="loadXURL('urn:clienturl:srchmenu:srchinternet');"/>
|
||||
<menuseparator id="searchSeparator" />
|
||||
<menu id="searchOptionsMenu" label="&searchOptions.label;">
|
||||
<menupopup oncreate="syncSearchModeMenuWithPref();">
|
||||
<menuitem id="simpleSearch" type="radio" label="&simpleMode.label;" oncommand="setBrowserSearchMode(0);" />
|
||||
<menuitem id="advancedSearch" type="radio" label="&advancedMode.label;" oncommand="setBrowserSearchMode(1);" />
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu accesskey="&goMenu.accesskey;" label="&goMenu.label;" oncommand="gotoHistoryIndex(event);">
|
||||
<menupopup oncreate="updateGoMenu(event);">
|
||||
<menuitem label="&goBackCmd.label;" accesskey="&goBackCmd.accesskey;" key="goBackKb" command="Browser:Back"/>
|
||||
<menuitem label="&goForwardCmd.label;" accesskey="&goForwardCmd.accesskey;" key="goForwardKb" command="Browser:Forward"/>
|
||||
<menuitem label="&goHomeCmd.label;" accesskey="&goHomeCmd.accesskey;" command="Browser:Home" key="goHome"/>
|
||||
<menuseparator hidden="true"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
</menu>
|
||||
|
||||
<menu id="BookmarksMenu" label="&bookmarksMenu.label;" accesskey="&bookmarksMenu.accesskey;"
|
||||
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
|
||||
|
|
Загрузка…
Ссылка в новой задаче