Bug 799001 - Part 1: Hook up the menu item for opening a new private browsing window; r=dao ui-r=madhava

This commit is contained in:
Ehsan Akhgari 2012-10-07 23:15:41 -04:00
parent 9eb0f1d1a6
commit 46749778df
4 changed files with 26 additions and 2 deletions

View File

@ -27,6 +27,12 @@
label="&newNavigatorCmd.label;"
command="cmd_newNavigator"
key="key_newNavigator"/>
#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
<menuitem id="appmenu_newPrivateWindow"
label="&newPrivateWindow.label;"
command="Tools:PrivateBrowsing"
key="key_privatebrowsing"/>
#endif
<menuseparator/>
<menuitem id="appmenu_openFile"
label="&openFileCmd.label;"
@ -34,6 +40,7 @@
key="openFileKb"/>
</menupopup>
</splitmenu>
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
<menuitem id="appmenu_privateBrowsing"
class="menuitem-iconic menuitem-iconic-tooltip"
label="&privateBrowsingCmd.start.label;"
@ -41,6 +48,7 @@
stoplabel="&privateBrowsingCmd.stop.label;"
command="Tools:PrivateBrowsing"
key="key_privatebrowsing"/>
#endif
<menuitem label="&goOfflineCmd.label;"
id="appmenu_offlineModeRecovery"
type="checkbox"

View File

@ -22,6 +22,13 @@
accesskey="&newNavigatorCmd.accesskey;"
key="key_newNavigator"
command="cmd_newNavigator"/>
#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
<menuitem id="menu_newPrivateWindow"
label="&newPrivateWindow.label;"
accesskey="&newPrivateWindow.accesskey;"
command="Tools:PrivateBrowsing"
key="key_privatebrowsing"/>
#endif
<menuitem id="menu_openLocation"
class="show-only-for-keyboard"
label="&openLocationCmd.label;"
@ -541,6 +548,7 @@
#endif
command="View:PageInfo"/>
<menuseparator id="sanitizeSeparator"/>
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
<menuitem id="privateBrowsingItem"
label="&privateBrowsingCmd.start.label;"
accesskey="&privateBrowsingCmd.start.accesskey;"
@ -550,6 +558,7 @@
stopaccesskey="&privateBrowsingCmd.stop.accesskey;"
key="key_privatebrowsing"
command="Tools:PrivateBrowsing"/>
#endif
<menuitem id="sanitizeItem"
accesskey="&clearRecentHistory.accesskey;"
label="&clearRecentHistory.label;"

View File

@ -102,7 +102,12 @@
<command id="Tools:ErrorConsole" oncommand="toJavaScriptConsole()" hidden="true"/>
<command id="Tools:Sanitize"
oncommand="Cc['@mozilla.org/browser/browserglue;1'].getService(Ci.nsIBrowserGlue).sanitize(window);"/>
<command id="Tools:PrivateBrowsing" oncommand="gPrivateBrowsingUI.toggleMode();"/>
<command id="Tools:PrivateBrowsing"
#ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
oncommand="OpenBrowserWindow({private: true});"/>
#else
oncommand="gPrivateBrowsingUI.toggleMode();"/>
#endif
<command id="History:UndoCloseTab" oncommand="undoCloseTab();"/>
<command id="History:UndoCloseWindow" oncommand="undoCloseWindow();"/>
<command id="Browser:ToggleAddonBar" oncommand="toggleAddonBar();"/>

View File

@ -63,7 +63,7 @@ can reach it easily. -->
<!ENTITY printCmd.commandkey "p">
<!ENTITY goOfflineCmd.label "Work Offline">
<!ENTITY goOfflineCmd.accesskey "w">
<!ENTITY goOfflineCmd.accesskey "k">
<!ENTITY menubarCmd.label "Menu Bar">
<!ENTITY menubarCmd.accesskey "M">
@ -277,6 +277,8 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY newNavigatorCmd.label "New Window">
<!ENTITY newNavigatorCmd.key "N">
<!ENTITY newNavigatorCmd.accesskey "N">
<!ENTITY newPrivateWindow.label "New Private Window">
<!ENTITY newPrivateWindow.accesskey "W">
<!ENTITY editMenu.label "Edit">
<!ENTITY editMenu.accesskey "E">