gecko/mobile/chrome/content/browser.xul

482 lines
24 KiB
XML

<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Mobile Browser.
-
- The Initial Developer of the Original Code is
- Mozilla Corporation.
- Portions created by the Initial Developer are Copyright (C) 2008
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Brad Lassey <blassey@mozilla.com>
- Mark Finkle <mfinkle@mozila.com>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://browser/skin/platform.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/browser.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/browser.css" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
%browserDTD;
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
%brandDTD;
<!ENTITY % prefsDTD SYSTEM "chrome://browser/locale/preferences.dtd">
%prefsDTD;
]>
<window id="main-window"
onload="Browser.startup();"
onunload="Browser.shutdown();"
windowtype="navigator:browser"
title="&brandShortName;"
#ifdef WINCE
sizemode="fullscreen"
#elifdef MOZ_PLATFORM_HILDON
sizemode="fullscreen"
#else
width="800"
height="500"
#endif
onkeypress="onDebugKeyPress(event);"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:html="http://www.w3.org/1999/xhtml">
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/>
<script type="application/x-javascript" src="chrome://global/content/inlineSpellCheckUI.js"/>
<script type="application/x-javascript" src="chrome://browser/content/commandUtil.js"/>
<script type="application/x-javascript" src="chrome://browser/content/browser.js"/>
<script type="application/x-javascript" src="chrome://browser/content/browser-ui.js"/>
<script type="application/x-javascript" src="chrome://browser/content/sanitize.js"/>
<script type="application/x-javascript" src="chrome://browser/content/preferences.js"/>
<script type="application/x-javascript" src="chrome://browser/content/extensions.js"/>
<script type="application/x-javascript" src="chrome://browser/content/downloads.js"/>
<script type="application/x-javascript" src="chrome://browser/content/console.js"/>
<script type="application/x-javascript" src="chrome://browser/content/Util.js"/>
<script type="application/x-javascript" src="chrome://browser/content/InputHandler.js"/>
<script type="application/x-javascript" src="chrome://browser/content/TileManager.js"/>
<script type="application/x-javascript" src="chrome://browser/content/BrowserView.js"/>
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_browser" src="chrome://browser/locale/browser.properties"/>
<stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
</stringbundleset>
<commandset id="mainCommandSet">
<!-- basic navigation -->
<command id="cmd_back" label="&back.label;" disabled="true" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_forward" label="&forward.label;" disabled="true" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_reload" label="&reload.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_stop" label="&stop.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_search" label="&search.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_go" label="&go.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_openLocation" label="&openLocation.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<!-- tabs -->
<command id="cmd_newTab" label="&newtab.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_closeTab" label="&closetab.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<!-- bookmarking -->
<command id="cmd_star" label="&star.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<!-- misc -->
<command id="cmd_close" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_quit" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_menu" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_fullscreen" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_actions" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_panel" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_sanitize" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_zoomin" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_zoomout" oncommand="CommandUpdater.doCommand(this.id);"/>
<!-- scrolling -->
<command id="cmd_scrollPageUp" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_scrollPageDown" oncommand="CommandUpdater.doCommand(this.id);"/>
<!-- editing -->
<command id="cmd_cut" label="&cut.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_copy" label="&copy.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_copylink" label="&copylink.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_paste" label="&paste.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_delete" label="&delete.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<command id="cmd_selectAll" label="&selectAll.label;" oncommand="CommandUpdater.doCommand(this.id);"/>
<!-- find -->
<command id="cmd_find" oncommand="Browser.openFind(FINDSTATE_FIND);"/>
<command id="cmd_findAgain" oncommand="Browser.openFind(FINDSTATE_FIND_AGAIN);"/>
<command id="cmd_findPrevious" oncommand="Browser.openFind(FINDSTATE_FIND_PREVIOUS);"/>
</commandset>
<keyset id="mainKeyset">
<!-- basic navigation -->
<key id="key_back" keycode="VK_LEFT" command="cmd_back" modifiers="control"/>
<key id="key_forward" keycode="VK_RIGHT" command="cmd_forward" modifiers="control"/>
<key id="key_back2" keycode="VK_BACK" command="cmd_back"/>
<key id="key_forward2" keycode="VK_BACK" command="cmd_forward" modifiers="shift"/>
#ifndef MOZ_PLATFORM_HILDON
<key id="key_reload" keycode="VK_F5" command="cmd_reload"/>
#else
<!-- F5 on maemo is "home" which is a task switching key -->
#endif
<key id="key_focusURL" key="l" modifiers="accel" command="cmd_openLocation"/>
<!-- scrolling -->
<key id="key_pageUp" keycode="VK_UP" command="cmd_scrollPageUp" modifiers="shift"/>
<key id="key_pageDown" keycode="VK_DOWN" command="cmd_scrollPageDown" modifiers="shift"/>
<!-- misc -->
#ifndef WINCE
<key id="key_quit" key="q" modifiers="accel" command="cmd_quit"/>
<key id="key_menu" keycode="VK_F4" command="cmd_menu"/>
<key id="key_fullscreen" keycode="VK_F6" command="cmd_fullscreen"/>
<key id="key_zoomin" keycode="VK_F7" command="cmd_zoomin"/>
<key id="key_zoomout" keycode="VK_F8" command="cmd_zoomout"/>
#else
<key id="key_zoomin" keycode="VK_F1" command="cmd_zoomin"/>
<key id="key_zoomout" keycode="VK_F2" command="cmd_zoomout"/>
<key id="key_quit" keycode="VK_F4" command="cmd_quit"/>
#endif
<!-- tabs -->
<key id="key_newTab" key="t" modifiers="accel" command="cmd_newTab"/>
<key id="key_closeTab" key="w" modifiers="accel" command="cmd_closeTab"/>
<!-- find -->
<key id="key_find" key="&findOnCmd.commandkey;" command="cmd_find" modifiers="accel"/>
<key id="key_findAgain" key="&findAgainCmd.commandkey;" command="cmd_findAgain" modifiers="accel"/>
<key id="key_findPrevious" key="&findAgainCmd.commandkey;" command="cmd_findPrevious" modifiers="accel shift"/>
<key keycode="&findAgainCmd.commandkey2;" command="cmd_findAgain"/>
<key keycode="&findAgainCmd.commandkey2;" command="cmd_findPrevious" modifiers="shift"/>
</keyset>
<popupset id="mainPopupSet">
</popupset>
<stack flex="1" id="stack">
<scrollbox id="controls-scrollbox" style="overflow: hidden; -moz-box-orient: horizontal; position: relative;" flex="1">
<vbox class="panel-dark">
<spacer class="toolbar-height"/>
<!-- Left toolbar -->
<vbox id="tabs-container" class="panel-dark" flex="1">
<vbox id="tabs" onselect="BrowserUI.selectTab(this);" onclosetab="BrowserUI.closeTab(this)" flex="1"/>
<hbox id="tabs-controls">
<toolbarbutton id="newtab-button" class="button-image" command="cmd_newTab"/>
</hbox>
</vbox>
</vbox>
<!-- Content Area -->
<scrollbox id="tile-container-container" class="window-width window-height" style="overflow: hidden;">
<vbox>
<!-- Main Toolbar -->
<box id="toolbar-container" class="panel-dark toolbar-height">
<box id="toolbar-moveable-container">
<toolbar id="toolbar-main" class="panel-dark window-width">
#ifdef MOZ_PLATFORM_HILDON
<toolbarbutton id="tool-app-switch" class="button-image" oncommand="BrowserUI.switchTask();"/>
#endif
<hbox id="urlbar-container" flex="1">
<box id="identity-box"
onclick="getIdentityHandler().handleIdentityButtonEvent(event);"
onkeypress="getIdentityHandler().handleIdentityButtonEvent(event);">
<box id="urlbar-image-box">
<image id="urlbar-throbber"/>
<image id="urlbar-favicon" hidden="true"/>
</box>
</box>
<hbox id="urlbar-editarea" flex="1">
<textbox id="urlbar-edit"
type="autocomplete"
autocompletesearch="history"
autocompletepopup="popup_autocomplete"
enablehistory="false"
maxrows="6"
completeselectedindex="true"
minresultsforpopup="0"
flex="1"
ontextentered="BrowserUI.goToURI();"
clickSelectsAll="true"/>
</hbox>
<hbox id="urlbar-icons" mode="view">
<toolbarbutton id="tool-reload" class="urlbar-cap-button" command="cmd_reload"/>
<toolbarbutton id="tool-stop" class="urlbar-cap-button" command="cmd_stop"/>
<toolbarbutton id="tool-go" class="urlbar-cap-button" command="cmd_go"/>
</hbox>
</hbox>
<toolbarbutton id="tool-app-close" class="urlbar-button button-image" command="cmd_close"/>
</toolbar>
</box>
</box>
<notificationbox id="notifications"/>
<!-- Content viewport -->
<html:div id="tile-container" style="overflow: hidden;"/>
</vbox>
</scrollbox>
<!-- Right toolbar -->
<vbox class="panel-dark">
<spacer class="toolbar-height"/>
<vbox id="browser-controls" style="overflow: -moz-hidden-unscrollable;" class="panel-dark" flex="1">
<toolbarbutton id="tool-star" class="browser-control-button button-image" command="cmd_star"/>
<toolbarbutton id="tool-back" class="browser-control-button button-image" command="cmd_back"/>
<toolbarbutton id="tool-forward" class="browser-control-button button-image" command="cmd_forward"/>
<toolbarspring/>
<toolbarbutton id="tool-panel-open" class="page-button button-image" command="cmd_panel"/>
</vbox>
</vbox>
</scrollbox>
<!-- popup for find toolbar -->
<hbox id="findbar-container" hidden="true" class="window-width" top="0" left="0">
<findbar id="findbar" flex="1"/>
</hbox>
<!-- popup for site identity information -->
<vbox id="identity-container" hidden="true" class="panel-dark window-width" mode="unknownIdentity">
<hbox id="identity-popup-container" flex="1" align="top">
<image id="identity-popup-icon"/>
<vbox id="identity-popup-content-box" flex="1">
<hbox flex="1">
<label id="identity-popup-connectedToLabel" value="&identity.connectedTo2;"/>
<label id="identity-popup-connectedToLabel2" flex="1">&identity.unverifiedsite2;</label>
<description id="identity-popup-content-host" flex="1"/>
</hbox>
<hbox id="identity-popup-runBy-box">
<label id="identity-popup-runByLabel" value="&identity.runBy2;"/>
<description id="identity-popup-content-owner"/>
<description id="identity-popup-content-supplemental"/>
</hbox>
<description id="identity-popup-content-verifier"/>
</vbox>
<vbox align="center" pack="start">
<image id="identity-popup-encryption-icon"/>
<description id="identity-popup-encryption-label"/>
</vbox>
</hbox>
<hbox id="search-container" align="center" flex="1">
<label id="search-engine-label-add" value="&searchEngine.addSearch;"/>
</hbox>
</vbox>
<vbox id="newtab-popup" hidden="true" class="panel-dark" onclick="NewTabPopup.selectTab()" align="center" left="21">
<label/>
</vbox>
<vbox id="bookmark-popup" hidden="true" class="panel-dark" oncommand="BookmarkPopup.hide()" align="center">
<label value="&bookmarkPopup.label;"/>
<vbox>
<button id="bookmark-popup-edit" label="&bookmarkEdit.label;" oncommand="BookmarkHelper.edit(); BrowserUI.hideControls();"/>
<button id="bookmark-popup-remove" label="&bookmarkRemove.label;" oncommand="removeBookmarksForURI(getBrowser().currentURI);"/>
</vbox>
</vbox>
<vbox id="bookmark-container" hidden="true" class="panel-dark window-width">
<hbox id="bookmark-form" align="start">
<image id="bookmark-image" src="chrome://browser/skin/images/starred-default-64.png"/>
</hbox>
</vbox>
<box id="panel-container" hidden="true" class="panel-dark">
<box id="panel-controls" oncommand="BrowserUI.switchPane(event.target.getAttribute('linkedpanel'));">
<toolbarbutton id="tool-panel-close" class="page-button button-image" command="cmd_panel"/>
<toolbarbutton id="tool-addons" type="radio" group="1" class="panel-button button-image" linkedpanel="addons-container"/>
<toolbarbutton id="tool-downloads" type="radio" group="1" class="panel-button button-image" linkedpanel="downloads-container"/>
<toolbarbutton id="tool-preferences" type="radio" group="1" checked="true" class="panel-button button-image" linkedpanel="prefs-container"/>
<toolbarbutton id="tool-console" type="radio" group="1" hidden="true" class="panel-button button-image" linkedpanel="console-container"/>
</box>
<deck id="panel-items" selectedIndex="2" flex="1">
<vbox id="addons-container" flex="1">
<hbox id="addons-header" class="panel-header">
<label value="&addonsHeader.label;"/>
</hbox>
<notificationbox id="addons-messages" flex="1">
<richlistbox id="addons-list" flex="1" onselect="ExtensionsView.hideOptions()">
<richlistitem id="addons-local" class="section-header" align="center">
<label value="&addonsLocal.label;" flex="1"/>
<spacer flex="1"/>
<button id="addons-update-all" class="button-dark" label="&addonsUpdate.label;"
oncommand="ExtensionsView.updateAll();"/>
</richlistitem>
<richlistitem id="addons-repo" class="section-header">
<label value="&addonsRepo.label;" flex="1"/>
<textbox id="addons-search-text" emptytext="&addonsSearch2.emptytext;" type="search" searchbutton="false"
oncommand="ExtensionsView.getAddonsFromRepo(this.value);"/>
</richlistitem>
</richlistbox>
</notificationbox>
</vbox>
<vbox id="downloads-container" flex="1">
<hbox id="downloads-header" class="panel-header">
<label value="&downloadsHeader.label;" flex="1"/>
</hbox>
<richlistbox id="downloads-list" flex="1"/>
</vbox>
<vbox id="prefs-container" flex="1">
<hbox id="prefs-header" class="panel-header">
<label value="&prefsHeader.label;"/>
</hbox>
<notificationbox id="prefs-messages" flex="1">
<richlistbox id="prefs-list" seltype="single" flex="1">
<setting title="&about.title;" type="control">
&about.description;
<button id="prefs-about-button" label="&about.button;"
#ifdef MOZ_OFFICIAL_BRANDING
# these two point to the same page, this just matters for what shows up in the
# URL bar
oncommand="BrowserUI.newTab('about:firefox', true);"/>
#else
oncommand="BrowserUI.newTab('about:fennec', true);"/>
#endif
</setting>
<setting id="prefs-uilanguage" title="&language.title;" type="control">
&language.description;
<menulist id="prefs-languages" onchange="PreferencesView.updateLocale();">
<menupopup>
<menuitem label="&language.auto;" value="auto"/>
</menupopup>
</menulist>
</setting>
<settings id="prefs-content" label="&content.title;">
<setting pref="permissions.default.image" title="&showImages.title;" type="boolint" on="1" off="2"/>
<setting pref="javascript.enabled" type="bool" title="&enableJavaScript.title;">
&enableJavaScript.description;
</setting>
<setting pref="plugins.enabled" type="bool" title="&enablePlugins.title;" onsynctopreference="Browser.setPluginState(this.value);">
&enablePlugins.description;
</setting>
</settings>
<settings id="prefs-privacy" label="&privacy.title;">
<setting pref="network.cookie.cookieBehavior" title="&allowCookies.title;" type="boolint" on="0" off="2">
&allowCookies.description;
</setting>
<setting pref="signon.rememberSignons" title="&rememberPasswords.title;" type="bool"/>
<setting title="&clearPrivateData.title;" type="control">
&clearPrivateData.description;
<button id="prefs-clear-data" label="&clearPrivateData.button;" command="cmd_sanitize"/>
</setting>
</settings>
</richlistbox>
</notificationbox>
</vbox>
<vbox id="console-container" flex="1">
<vbox id="console-header" class="panel-header">
<label value="&consoleHeader.label;"/>
<hbox align="center">
<label value="&consoleCodeEval.label;" control="console-eval-textbox"/>
<textbox id="console-eval-textbox" class="toolbar" value="" onkeypress="ConsoleView.onEvalKeyPress(event)" flex="1"/>
<button id="console-button-eval" class="button-dark show-text" label="&consoleEvaluate.label;" oncommand="ConsoleView.evaluateTypein()"/>
</hbox>
<hbox align="center" pack="end">
<radiogroup id="console-filter" class="toggle-dark" oncommand="ConsoleView.changeMode();">
<radio id="console-filter-all" label="&consoleAll.label;" value="all" selected="true"/>
<radio id="console-filter-messages" label="&consoleMessages.label;" value="message"/>
<radio id="console-filter-warnings" label="&consoleWarnings.label;" value="warning"/>
<radio id="console-filter-errors" label="&consoleErrors.label;" value="error"/>
</radiogroup>
<button id="console-clear" class="button-dark show-text" oncommand="ConsoleView.clearConsole();" label="&consoleClear.label;"/>
</hbox>
</vbox>
<richlistbox id="console-box" class="console-box" flex="1"/>
</vbox>
</deck>
</box>
<!-- titlebar autocomplete results -->
<vbox id="popup_autocomplete" class="panel-dark" hidden="true">
<arrowscrollbox id="autocomplete_navbuttons"
align="center"
flex="1"
orient="horizontal">
<image class="tool-search"/>
<radiogroup id="search-buttons" class="toggle-dark" onclick="BrowserUI.doButtonSearch(event.target);">
</radiogroup>
</arrowscrollbox>
</vbox>
<!-- options dialog for select form field -->
<vbox id="select-container" hidden="true">
<vbox id="select-container-inner" class="panel-dark" flex="1">
<scrollbox id="select-list" flex="1" orient="vertical"/>
<hbox id="select-buttons">
<button id="select-buttons-done" class="button-dark" label="&selectListDone.label;" oncommand="SelectHelper.close();"/>
</hbox>
</vbox>
</vbox>
<!-- bookmark window -->
<vbox id="bookmarklist-container" class="panel-dark" hidden="true">
<hbox id="bookmarklist-header">
<description flex="1">&bookmarksHeader.label;</description>
<toolbarbutton id="tool-bookmarks-manage" class="urlbar-button show-text button-dark" type="checkbox" autocheck="true"
label="&bookmarksManage.label;" oncommand="BookmarkList.toggleManage();"/>
<toolbarbutton id="tool-bookmarks-close" class="urlbar-button button-image" command="cmd_close"/>
</hbox>
<placelist id="bookmark-items" type="bookmarks" flex="1" onopen="BookmarkList.openBookmark();"/>
</vbox>
<!-- save/open dialog -->
<vbox id="helperapp-container" class="dialog-dark" hidden="true" align="center" top="0" left="0">
<label id="helperapp-prompt" value="&helperApp.prompt;"/>
<label id="helperapp-target" value="" crop="center"/>
<separator/>
<hbox pack="center">
<button id="helperapp-open" class="button-dark" label="&helperApp.open;" oncommand="HelperAppDialog.open();"/>
<button id="helperapp-save" class="button-dark" label="&helperApp.save;" oncommand="HelperAppDialog.save();"/>
<button id="helperapp-nothing" class="button-dark" label="&helperApp.nothing;" oncommand="HelperAppDialog.close();"/>
</hbox>
</vbox>
<!-- alerts for content -->
<hbox id="alerts-container" hidden="true" align="start" top="0" left="0" width="200"
onclick="AlertsHelper.click(event);">
<image id="alerts-image"/>
<vbox flex="1">
<label id="alerts-title" value=""/>
<description id="alerts-text" flex="1"/>
</vbox>
</hbox>
</stack>
<box>
<html:div style="position: relative; overflow: -moz-hidden-unscrollable; max-width: 0px; max-height: 0px; visibility: hidden;">
<html:div id="browsers" style="position: absolute;"/>
</html:div>
</box>
</window>