68136 - Mozilla should have a Full-screen mode, r=ben, sr=jst/jag

This commit is contained in:
hewitt%netscape.com 2006-09-14 06:03:18 +00:00
Родитель 6915a0f585
Коммит 3cc1fb86f4
5 изменённых файлов: 38 добавлений и 1 удалений

Просмотреть файл

@ -414,8 +414,14 @@ function Startup()
remoteService.addBrowserInstance(window); remoteService.addBrowserInstance(window);
} }
} }
// called when we go into full screen, even if it is
// initiated by a web page script
addEventListener("fullscreen", onFullScreen, false);
// now load bookmarks after a delay // now load bookmarks after a delay
setTimeout(LoadBookmarksCallback, 0); setTimeout(LoadBookmarksCallback, 0);
} }
function LoadBookmarksCallback() function LoadBookmarksCallback()
@ -1543,3 +1549,14 @@ function FillInPTTooltip(tipElement)
return true; // show tooltip return true; // show tooltip
} }
function BrowserFullScreen()
{
window.fullScreen = !window.fullScreen;
}
function onFullScreen()
{
FullScreen.toggle();
}

Просмотреть файл

@ -60,6 +60,7 @@ Contributor(s): ______________________________________. -->
<script type="application/x-javascript" src="chrome://global/content/nsClipboard.js"/> <script type="application/x-javascript" src="chrome://global/content/nsClipboard.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/> <script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://global/content/strres.js"/> <script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<script type="application/x-javascript" src="chrome://global/content/fullscreen.js"/>
<!-- Content Area --> <!-- Content Area -->
<script type="application/x-javascript" src="chrome://navigator/content/nsBrowserStatusHandler.js"/> <script type="application/x-javascript" src="chrome://navigator/content/nsBrowserStatusHandler.js"/>
@ -124,7 +125,7 @@ Contributor(s): ______________________________________. -->
<toolbar class="toolbar-primary chromeclass-toolbar" id="nav-bar" persist="collapsed" <toolbar class="toolbar-primary chromeclass-toolbar" id="nav-bar" persist="collapsed"
grippytooltiptext="&navigationToolbar.tooltip;" grippytooltiptext="&navigationToolbar.tooltip;"
tbalign="stretch"> tbalign="stretch" fullscreentoolbar="true">
<hbox id="nav-bar-buttons"> <hbox id="nav-bar-buttons">
<toolbarbutton id="back-button" type="menu-button" class="toolbarbutton-1" <toolbarbutton id="back-button" type="menu-button" class="toolbarbutton-1"
label="&backButton.label;" label="&backButton.label;"
@ -217,6 +218,17 @@ Contributor(s): ______________________________________. -->
<button id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')" <button id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')"
tooltiptext="&throbber.tooltip;"/> tooltiptext="&throbber.tooltip;"/>
</hbox> </hbox>
<hbox id="window-controls" hidden="true" fullscreencontrol="true">
<toolbarbutton id="minimize-button" class="toolbarbutton-1"
oncommand="window.minimize();"/>
<toolbarbutton id="restore-button" class="toolbarbutton-1"
oncommand="BrowserFullScreen();"/>
<toolbarbutton id="close-button" class="toolbarbutton-1"
oncommand="window.close();"/>
</hbox>
</toolbar> </toolbar>
<toolbar id="PersonalToolbar" class="chromeclass-directories" persist="collapsed" dragdroparea="innermostBox" <toolbar id="PersonalToolbar" class="chromeclass-directories" persist="collapsed" dragdroparea="innermostBox"

Просмотреть файл

@ -135,6 +135,7 @@
<!-- View Menu --> <!-- View Menu -->
<command id="View:PageSource" oncommand="BrowserViewSource();"/> <command id="View:PageSource" oncommand="BrowserViewSource();"/>
<command id="View:PageInfo" oncommand="BrowserPageInfo(getBrowser().contentDocument);"/> <command id="View:PageInfo" oncommand="BrowserPageInfo(getBrowser().contentDocument);"/>
<command id="View:FullScreen" oncommand="BrowserFullScreen();"/>
<!-- Search Menu --> <!-- Search Menu -->
<command id="Browser:Find" oncommand="BrowserFind();" observes="isImage"/> <command id="Browser:Find" oncommand="BrowserFind();" observes="isImage"/>
@ -226,6 +227,9 @@
<menuitem label="&componentbarCmd.label;" accesskey="&componentbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewcomponentbar"/> <menuitem label="&componentbarCmd.label;" accesskey="&componentbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewcomponentbar"/>
</menupopup> </menupopup>
</menu> </menu>
<menuitem id="menuitem_fullScreen" accesskey="&fullScreenCmd.accesskey;"
label="&fullScreenCmd.label;" key="key_fullScreen"
command="View:FullScreen" hidden="true"/>
<menuseparator /> <menuseparator />
<!-- overlayed from viewZoomOverlay.xul --> <!-- overlayed from viewZoomOverlay.xul -->

Просмотреть файл

@ -20,8 +20,10 @@
<key id="goHome" keycode="VK_HOME" command="Browser:Home" modifiers="alt"/> <key id="goHome" keycode="VK_HOME" command="Browser:Home" modifiers="alt"/>
<key id="key_fullScreen" keycode="VK_F11" command="View:FullScreen"/>
</keyset> </keyset>
<menuitem id="menuitem_fullScreen" hidden="false"/>
</overlay> </overlay>

Просмотреть файл

@ -63,6 +63,8 @@
<!ENTITY pageInfoCmd.label "Page Info"> <!ENTITY pageInfoCmd.label "Page Info">
<!ENTITY pageInfoCmd.accesskey "i"> <!ENTITY pageInfoCmd.accesskey "i">
<!ENTITY pageInfoCmd.commandkey "i"> <!ENTITY pageInfoCmd.commandkey "i">
<!ENTITY fullScreenCmd.label "Full Screen">
<!ENTITY fullScreenCmd.accesskey "f">
<!ENTITY translateMenu.label "Translate"> <!ENTITY translateMenu.label "Translate">
<!ENTITY translateMenu.accesskey "T"> <!ENTITY translateMenu.accesskey "T">
<!ENTITY translate.commandKey "t"> <!ENTITY translate.commandKey "t">