зеркало из https://github.com/mozilla/gecko-dev.git
bug 441794: fix a mis-merge, and also make a few tweaks to my code to match the shifting main ui.
This commit is contained in:
Родитель
71aed3f6e7
Коммит
ee973bcca8
|
@ -575,7 +575,7 @@ var BrowserUI = {
|
|||
this.showBookmarks();
|
||||
break;
|
||||
case "cmd_shortcuts":
|
||||
this._showMode(PANELMODE_SHORTCUTLIST);
|
||||
this.show(PANELMODE_NONE);
|
||||
Shortcuts.edit();
|
||||
break;
|
||||
case "cmd_menu":
|
||||
|
|
|
@ -62,19 +62,20 @@
|
|||
<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;version=1.8" src="chrome://browser/content/shortcuts.js"/>
|
||||
|
||||
<stringbundleset id="stringbundleset">
|
||||
<stringbundle id="bundle_browser" src="chrome://browser/locale/browser.properties"/>
|
||||
<stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
|
||||
<stringbundle id="bundle_browser" src="chrome://browser/locale/browser.properties"/>
|
||||
<stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
|
||||
<stringbundle id="bundle-keys" src="chrome://global/locale/keys.properties"/>
|
||||
<stringbundle id="bundle-platformKeys" src="chrome://global-platform/locale/platformKeys.properties"/>
|
||||
</stringbundleset>
|
||||
|
||||
<stringbundleset id="stringbundleset">
|
||||
<stringbundle id="bundle_browser" src="chrome://browser/locale/browser.properties"/>
|
||||
<stringbundleset id="shortcut-bundles">
|
||||
<stringbundle src="chrome://browser/locale/shortcuts.properties"/>
|
||||
</stringbundleset>
|
||||
|
||||
<script type="application/x-javascript;version=1.8" src="chrome://browser/content/shortcuts.js"/>
|
||||
|
||||
<commandset id="cmdset_main">
|
||||
<!-- basic navigation -->
|
||||
<command id="cmd_back" label="&back.label;" disabled="true" oncommand="CommandUpdater.doCommand(this.id);"/>
|
||||
|
@ -186,8 +187,29 @@
|
|||
</panel>
|
||||
</popupset>
|
||||
|
||||
<toolbox id="toolbox-main">
|
||||
<toolbar id="toolbar-main">
|
||||
<stack id="browser-container" flex="1" style="overflow: hidden;">
|
||||
<vbox id="browser">
|
||||
<notificationbox id="notifications" flex="1">
|
||||
<deckbrowser id="content" autocompletepopup="popup_autocomplete_content" flex="1"
|
||||
onnewtab="CommandUpdater.doCommand('cmd_newTab');"/>
|
||||
</notificationbox>
|
||||
</vbox>
|
||||
|
||||
<vbox id="browser-controls" style="-moz-stack-sizing: ignore; width: 80px;" top="60" left="0">
|
||||
<toolbarbutton id="tool-back" class="browser-control-button" command="cmd_back"/>
|
||||
<toolbarbutton id="tool-forward" class="browser-control-button" command="cmd_forward"/>
|
||||
<toolbarbutton id="tool-star" class="browser-control-button" command="cmd_star"/>
|
||||
<toolbarbutton id="tool-bookmarks" class="browser-control-button" command="cmd_bookmarks"/>
|
||||
<toolbarbutton id="tool-actions" class="browser-control-button" command="cmd_actions"/>
|
||||
<toolbarbutton id="tool-shortcuts" class="browser-control-button" command="cmd_shortcuts"/>
|
||||
</vbox>
|
||||
|
||||
<vbox id="tab-list-container" style="-moz-stack-sizing: ignore;" top="60" left="0">
|
||||
<richlistbox id="tab-list" onselect="BrowserUI.selectTab(this.selectedItem);"/>
|
||||
<button id="newtab-button" label="+" command="cmd_newTab"/>
|
||||
</vbox>
|
||||
|
||||
<toolbar id="toolbar-main" style="-moz-stack-sizing: ignore; height: 60px;" top="0" left="0">
|
||||
<hbox id="urlbar-container" flex="1">
|
||||
<box id="identity-box"
|
||||
onclick="getIdentityHandler().handleIdentityButtonEvent(event);"
|
||||
|
@ -217,24 +239,6 @@
|
|||
<toolbarbutton id="tool-go" class="urlbar-icon-button" command="cmd_go"/>
|
||||
</hbox>
|
||||
</toolbar>
|
||||
</toolbox>
|
||||
|
||||
<stack flex="1">
|
||||
<hbox id="browser-container" flex="1">
|
||||
<vbox id="browser" flex="1">
|
||||
<notificationbox id="notifications" flex="1">
|
||||
<deckbrowser id="content" autocompletepopup="popup_autocomplete_content" flex="1"/>
|
||||
</notificationbox>
|
||||
</vbox>
|
||||
<vbox id="browser-controls" collapsed="true">
|
||||
<toolbarbutton id="tool-back" class="browser-control-button" command="cmd_back"/>
|
||||
<toolbarbutton id="tool-forward" class="browser-control-button" command="cmd_forward"/>
|
||||
<toolbarbutton id="tool-star" class="browser-control-button" command="cmd_star"/>
|
||||
<toolbarbutton id="tool-bookmarks" class="browser-control-button" command="cmd_bookmarks"/>
|
||||
<toolbarbutton id="tool-actions" class="browser-control-button" command="cmd_actions"/>
|
||||
<toolbarbutton id="tool-shortcuts" class="browser-control-button" command="cmd_shortcuts"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
|
||||
<vbox id="urllist-container" hidden="true" style="-moz-stack-sizing: ignore;" top="60" left="0">
|
||||
<hbox id="urllist-items-container" flex="1">
|
||||
|
|
|
@ -307,13 +307,14 @@ function ShortcutEditor()
|
|||
|
||||
// first, we need to look up the right names of the various modifier keys.
|
||||
var platformBundle = document.getElementById("bundle-platformKeys");
|
||||
function doGetString(n) { try { return platformBundle.getString(n); } catch (ex) { dump(">>"+ex+"\n"); return undefined; } };
|
||||
var platformKeys = {
|
||||
shift: platformBundle.getString("VK_SHIFT"),
|
||||
meta: platformBundle.getString("VK_META"),
|
||||
alt: platformBundle.getString("VK_ALT"),
|
||||
control: platformBundle.getString("VK_CONTROL")
|
||||
shift: doGetString("VK_SHIFT") || "Shift",
|
||||
meta: doGetString("VK_META") || "Meta",
|
||||
alt: doGetString("VK_ALT") || "Alt",
|
||||
control: doGetString("VK_CONTROL") || "Ctrl"
|
||||
};
|
||||
var modifierSeparator = platformBundle.getString("MODIFIER_SEPARATOR");
|
||||
var modifierSeparator = doGetString("MODIFIER_SEPARATOR") || "+";
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
var accelKey = Components.interfaces.nsIDOMKeyEvent.DOM_VK_META;
|
||||
|
@ -410,7 +411,7 @@ function ShortcutEditor()
|
|||
{
|
||||
tree = document.getElementById("shortcuts");
|
||||
|
||||
var nodes = document.getElementById("ui-stack").childNodes;
|
||||
var nodes = document.getElementById("browser-container").childNodes;
|
||||
Array.forEach(nodes, function(n) { if (n.getAttribute("id") != "browser-container") n.hidden = true; });
|
||||
document.getElementById("shortcuts-container").hidden = false;
|
||||
fillShortcutList();
|
||||
|
|
Загрузка…
Ссылка в новой задаче