[NAVIGATOR] Even more menu stuffs

custom-2020
Matt A. Tobin 4 years ago committed by Roy Tam
parent 0eb312c73b
commit 377b53c555
  1. 4
      navigator/base/content/navigator.js
  2. 9
      navigator/base/content/navigatorOverlay.xul
  3. 86
      navigator/base/content/tasksOverlay.js
  4. 6
      navigator/base/content/tasksOverlay.xul
  5. 2
      navigator/components/permissions/content/cookies.xul
  6. 2
      navigator/components/permissions/content/permissions.xul
  7. 4
      navigator/locales/en-US/chrome/browser/navigator.properties
  8. 4
      navigator/locales/en-US/chrome/browser/navigatorOverlay.dtd
  9. 4
      navigator/locales/en-US/chrome/common/tasksOverlay.dtd
  10. 2
      navigator/locales/en-US/chrome/common/utilityOverlay.dtd

@ -1497,10 +1497,8 @@ function updateCloseItems()
closeItem.setAttribute("accesskey", gNavigatorBundle.getString("tabs.closeTab.accesskey"));
}
var hideCloseOtherTabs = !browser || !browser.getStripVisibility();
var hideCloseOtherTabs = !browser || !browser.getStripVisibility() || hideCloseWindow;
document.getElementById("menu_closeOtherTabs").hidden = hideCloseOtherTabs;
if (!hideCloseOtherTabs)
document.getElementById("cmd_closeOtherTabs").setAttribute("disabled", hideCloseWindow);
}
function updateRecentMenuItems()

@ -230,19 +230,18 @@
<menuitem id="menu_newPrivateWindow"/>
</menupopup>
</menu>
<!-- XXXTobin: Get rid of this
<menuitem id="menu_openLocation"
label="&openCmd.label;"
accesskey="&openCmd.accesskey;"
key="openLocationKb"
command="Browser:Open"/>
-->
<menuitem id="menu_openFile"
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;" accesskey="&closeOtherTabs.accesskey;"/>
<menuitem id="menu_closeWindow" hidden="true" command="cmd_closeWindow" key="key_closeWindow" label="&closeWindow.label;" accesskey="&closeWindow.accesskey;"/>
<menuseparator/>
<menuitem id="savepage" valueSaveAs="&savePageAsCmd.label;" valueSave="&savePageCmd.label;"
accesskey="&savePageCmd.accesskey;" key="key_savePage" command="Browser:SavePage"/>
@ -254,6 +253,10 @@
<menuitem id="menu_print"/>
<menuseparator/>
<menuitem id="offlineGoOfflineCmd"/>
<menuseparator/>
<menuitem id="menu_close"/>
<menuitem id="menu_closeOtherTabs" hidden="true" command="cmd_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"/>
<menuitem id="menu_closeWindow" hidden="true" command="cmd_closeWindow" key="key_closeWindow" label="&closeWindow.label;" accesskey="&closeWindow.accesskey;"/>
</menupopup>
</menu>

@ -14,38 +14,14 @@ function toNavigator()
function toCookieManager()
{
toOpenWindowByType("Navigator:Cookies",
toOpenWindowByType("permissions:cookieManager",
"chrome://navigator/content/permissions/cookies.xul",
"resizable");
}
function toPasswordManager()
{
toOpenWindowByType("Toolkit:PasswordManager",
"chrome://passwordmgr/content/passwordManager.xul",
"resizable");
}
// Queries the HTTP Auth Manager and clears all sessions
function ExpireHTTPAuth()
{
Components.classes['@mozilla.org/network/http-auth-manager;1']
.getService(Components.interfaces.nsIHttpAuthManager)
.clearAll();
}
// Expires the master password
function ExpirePassword()
{
Components.classes["@mozilla.org/security/pk11tokendb;1"]
.createInstance(Components.interfaces.nsIPK11TokenDB)
.getInternalKeyToken()
.checkPassword("");
}
// cookie, popup, image, install, geo, desktop-notification, login-saving, offline-app
function toPermissionsManager(aViewerType, aHost = "") {
var windowtype = "Navigator:Permissions-" + aViewerType
var windowtype = "permissions:" + aViewerType
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var existingWindow = wm.getMostRecentWindow(windowtype);
@ -59,7 +35,7 @@ function toPermissionsManager(aViewerType, aHost = "") {
permissionType: aViewerType,
windowType: windowtype,
windowTitle: aViewerType + ".title",
introText: aViewerType + ".text"};
introText: aViewerType + ".text" };
if (existingWindow) {
existingWindow.initWithParams(params)
@ -71,35 +47,28 @@ function toPermissionsManager(aViewerType, aHost = "") {
}
}
function toDownloadManager()
// Queries the HTTP Auth Manager and clears all sessions
function ExpireHTTPAuth()
{
//Ported extensions may only implement the Basic toolkit Interface
//and not our progress dialogs.
var dlUI = Components.classes["@mozilla.org/download-manager-ui;1"]
.getService(Components.interfaces.nsIDownloadManagerUI);
if (dlUI instanceof Components.interfaces.nsISuiteDownloadManagerUI) {
dlUI.showManager(window);
} else {
dlUI.show(window);
}
Components.classes['@mozilla.org/network/http-auth-manager;1']
.getService(Components.interfaces.nsIHttpAuthManager)
.clearAll();
}
function toDataManager(aView)
// Expires the master password
function ExpireMasterPassword()
{
var useDlg = Services.prefs.getBoolPref("suite.manager.dataman.openAsDialog");
if (useDlg) {
var url = "chrome://communicator/content/dataman/dataman.xul";
var win = toOpenWindowByType("data:manager", url, "", aView);
if (win && aView)
win.gDataman.loadView(aView);
return;
}
Components.classes["@mozilla.org/security/pk11tokendb;1"]
.createInstance(Components.interfaces.nsIPK11TokenDB)
.getInternalKeyToken()
.checkPassword("");
}
switchToTabHavingURI("about:data", true, function(browser) {
if (aView)
browser.contentWindow.wrappedJSObject.gDataman.loadView(aView);
});
function toPasswordManager()
{
toOpenWindowByType("Toolkit:PasswordManager",
"chrome://passwordmgr/content/passwordManager.xul",
"resizable");
}
function toEM(aView)
@ -121,6 +90,21 @@ function toEM(aView)
});
}
function toDownloadManager()
{
//Ported extensions may only implement the Basic toolkit Interface
//and not our progress dialogs.
var dlUI = Components.classes["@mozilla.org/download-manager-ui;1"]
.getService(Components.interfaces.nsIDownloadManagerUI);
if (dlUI instanceof Components.interfaces.nsISuiteDownloadManagerUI) {
dlUI.showManager(window);
} else {
dlUI.show(window);
}
}
function toDataManager(aView){ return; }
function toBookmarksManager()
{
toOpenWindowByType("bookmarks:manager",

@ -40,9 +40,11 @@
<!-- Tasks Menu -->
<menu id="tasksMenu" label="&tasksMenu.label;" accesskey="&tasksMenu.accesskey;">
<menupopup id="taskPopup">
<menuitem id="addonsmgr" label="&addOnsManagerCmd.label;"
<menuitem id="addonsmgr"
label="&addOnsManagerCmd.label;"
accesskey="&addOnsManagerCmd.accesskey;"
key="key_addOnsManager" oncommand="toEM();"
key="key_addOnsManager"
oncommand="toEM();"
insertafter="navBeginGlobalItems"/>
<menuitem id="downloadmgr" label="&downloadManagerCmd.label;"
accesskey="&downloadManagerCmd.accesskey;"

@ -9,7 +9,7 @@
<!DOCTYPE dialog SYSTEM "chrome://navigator/locale/permissions/cookies.dtd" >
<window id="CookiesDialog" windowtype="Navigator:Cookies"
<window id="CookiesDialog" windowtype="permissions:cookieManager"
class="windowDialog" title="&window.title;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width: &window.width;;"

@ -11,7 +11,7 @@
<!DOCTYPE dialog SYSTEM "chrome://navigator/locale/permissions/permissions.dtd" >
<window id="PermissionsDialog" class="windowDialog"
windowtype="Navigator:Permissions"
windowtype="permissions:manager"
title="&window.title;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width: &window.width;;"

@ -27,8 +27,8 @@ securityButtonTooltipInsecure=Displays security information about the current pa
# menu_close labels
tabs.closeTab.label=Close Tab
tabs.closeTab.accesskey=C
tabs.close.label=Close
tabs.close.accesskey=C
tabs.close.label=Close Window
tabs.close.accesskey=W
tabs.recentlyClosed.format=%1$S %2$S

@ -3,7 +3,7 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!-- File Menu -->
<!ENTITY tabCmd.label "Browser Tab">
<!ENTITY tabCmd.label "Tab">
<!ENTITY tabCmd.accesskey "T">
<!ENTITY tabCmd.commandkey "t">
<!ENTITY openCmd.label "Open Web Location…">
@ -136,7 +136,7 @@
<!ENTITY popupBlockCmd.label "Block Popups from This Website">
<!ENTITY popupBlockCmd.accesskey "B">
<!ENTITY popupBlockMsg.label "Popups from this website will not be shown.">
<!ENTITY popupsManage.label "Manage Popup Window Permissions">
<!ENTITY popupsManage.label "Manage Popup Permissions">
<!ENTITY popupsManage.accesskey "M">
<!ENTITY cookieCookieManager.label "Cookie Manager">

@ -4,7 +4,7 @@
<!-- extracted from tasksOverlay.xul -->
<!ENTITY navigatorCmd.label "Navigator">
<!ENTITY navigatorCmd.accesskey "B">
<!ENTITY navigatorCmd.accesskey "N">
<!ENTITY navigatorCmd.commandkey "1">
<!-- LOCALIZATION NOTE (editorCmd.label): DONT_TRANSLATE -->
<!ENTITY editorCmd.label "Composer">
@ -37,7 +37,7 @@
<!ENTITY passwordDisplayCmd.accesskey "M">
<!ENTITY passwordHTTPAuthExpireCmd.label "Clear Basic Authentication">
<!ENTITY passwordHTTPAuthExpireCmd.accesskey "l">
<!ENTITY passwordHTTPAuthExpireCmd.accesskey "A">
<!ENTITY passwordMasterExpireCmd.label "Clear Master Password">
<!ENTITY passwordMasterExpireCmd.accesskey "l">

@ -21,7 +21,7 @@
<!ENTITY newPageFromDraftCmd.accesskey "d">
<!ENTITY newNavigatorCmd.label "Navigator Window">
<!ENTITY newNavigatorCmd.key "N">
<!ENTITY newNavigatorCmd.accesskey "B">
<!ENTITY newNavigatorCmd.accesskey "a">
<!ENTITY newPrivateWindowCmd.label "Private Window">
<!ENTITY newPrivateWindowCmd.key "B">
<!ENTITY newPrivateWindowCmd.accesskey "W">

Loading…
Cancel
Save