mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 574188 - Add UI hooks to trigger tab candy
This commit is contained in:
parent
e30e7f9427
commit
9470533a4d
@ -208,6 +208,10 @@
|
||||
<menu id="view-menu" label="&viewMenu.label;"
|
||||
accesskey="&viewMenu.accesskey;">
|
||||
<menupopup id="menu_viewPopup">
|
||||
<menuitem id="menu_tabcandy"
|
||||
label="&showTabCandy.label;"
|
||||
key="key_tabcandy"
|
||||
command="Browser:ShowTabCandy"/>
|
||||
<menu id="viewToolbarsMenu"
|
||||
label="&viewToolbarsMenu.label;"
|
||||
accesskey="&viewToolbarsMenu.accesskey;">
|
||||
|
@ -117,6 +117,7 @@
|
||||
<command id="Browser:NextTab" oncommand="gBrowser.tabContainer.advanceSelectedTab(1, true);"/>
|
||||
<command id="Browser:PrevTab" oncommand="gBrowser.tabContainer.advanceSelectedTab(-1, true);"/>
|
||||
<command id="Browser:ShowAllTabs" oncommand="allTabs.open();"/>
|
||||
<command id="Browser:ShowTabCandy" oncommand="BrowserShowTabCandy();"/>
|
||||
<command id="cmd_fullZoomReduce" oncommand="FullZoom.reduce()"/>
|
||||
<command id="cmd_fullZoomEnlarge" oncommand="FullZoom.enlarge()"/>
|
||||
<command id="cmd_fullZoomReset" oncommand="FullZoom.reset()"/>
|
||||
@ -326,6 +327,8 @@
|
||||
|
||||
<key id="key_showAllTabs" command="Browser:ShowAllTabs" keycode="VK_TAB" modifiers="control,shift"/>
|
||||
|
||||
<key id="key_tabcandy" command="Browser:ShowTabCandy" key="&showTabCandy.commandkey;" modifiers="accel" />
|
||||
|
||||
<key id="key_switchTextDirection" key="&bidiSwitchTextDirectionItem.commandkey;" command="cmd_switchTextDirection" modifiers="accel,shift" />
|
||||
|
||||
<key id="key_privatebrowsing" command="Tools:PrivateBrowsing" key="&privateBrowsingCmd.commandkey;" modifiers="accel,shift"/>
|
||||
|
@ -1803,6 +1803,12 @@ function focusAndSelectUrlBar() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function BrowserShowTabCandy() {
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("tabcandyshow", false, false);
|
||||
dispatchEvent(event);
|
||||
}
|
||||
|
||||
function openLocation() {
|
||||
if (focusAndSelectUrlBar())
|
||||
return;
|
||||
|
@ -586,6 +586,11 @@
|
||||
ondragleave="homeButtonObserver.onDragLeave(event)"
|
||||
onclick="BrowserGoHome(event);"/>
|
||||
|
||||
<toolbarbutton id="tabcandy-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
|
||||
label="&tabCandyButton.label;" removable="true"
|
||||
command="Browser:ShowTabCandy"
|
||||
tooltiptext="&tabCandyButton.tooltip;"/>
|
||||
|
||||
<toolbaritem id="urlbar-container" align="center" flex="400" persist="width"
|
||||
title="&locationItem.title;" class="chromeclass-location" removable="true">
|
||||
<textbox id="urlbar" flex="1"
|
||||
|
@ -124,6 +124,8 @@
|
||||
|
||||
<!-- Toolbar items -->
|
||||
<!ENTITY homeButton.label "Home">
|
||||
<!ENTITY tabCandyButton.label "TabCandy">
|
||||
<!ENTITY tabCandyButton.tooltip "Open a visual tab interface.">
|
||||
|
||||
<!ENTITY bookmarksButton.label "Bookmarks">
|
||||
<!ENTITY bookmarksButton.tooltip "Display your bookmarks">
|
||||
@ -219,6 +221,8 @@
|
||||
|
||||
<!ENTITY viewMenu.label "View">
|
||||
<!ENTITY viewMenu.accesskey "V">
|
||||
<!ENTITY showTabCandy.label "TabCandy">
|
||||
<!ENTITY showTabCandy.commandkey "E">
|
||||
<!ENTITY viewToolbarsMenu.label "Toolbars">
|
||||
<!ENTITY viewToolbarsMenu.accesskey "T">
|
||||
<!ENTITY viewSidebarMenu.label "Sidebar">
|
||||
|
@ -533,6 +533,12 @@ toolbar[iconsize="small"][mode="icons"] #forward-button:-moz-locale-dir(rtl) {
|
||||
-moz-margin-end: 3px;
|
||||
}
|
||||
|
||||
/* tabcandy button */
|
||||
|
||||
#tabcandy-button {
|
||||
list-style-image: url(chrome://browser/skin/tabcandy/tabcandy.png);
|
||||
}
|
||||
|
||||
/* download manager button */
|
||||
|
||||
#downloads-button {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 397 B |
Loading…
Reference in New Issue
Block a user