mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Adding context menu to sidebar panel headers to silence whiny c|net reporter, only change panels on left-click, optimizing nsMenuFrame::OnCreate by reducing number of necessary nsAutoString ctor's (60071). r=kerz sr=ben
This commit is contained in:
parent
5b29cd31ca
commit
a7442ad546
@ -63,13 +63,16 @@
|
||||
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaUtils.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaClick.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsJSSupportsUtils.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
|
||||
|
||||
<popupset id="aTooltipSet" />
|
||||
<popupset id="editorContentContextSet"/>
|
||||
<popupset id="aTooltipSet">
|
||||
<popupset id="editorContentContextSet"/>
|
||||
<popup id="sidebarPopup"/>
|
||||
</popupset>
|
||||
|
||||
<commandset id="tasksCommands">
|
||||
<commandset id="globalEditMenuItems"/>
|
||||
|
@ -52,6 +52,7 @@ Rights Reserved.
|
||||
<script language="JavaScript" src="chrome://messenger/content/widgetglue.js"/>
|
||||
<script language="JavaScript" src="chrome://messenger/content/addressbook/addressbook.js"/>
|
||||
<script language="JavaScript" src="chrome://messenger/content/addressbook/abCommon.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaClick.js"/>
|
||||
<script language="JavaScript" src="chrome://messenger/content/addressbook/abDragDrop.js"/>
|
||||
<script language="JavaScript" src="chrome://messenger/content/msgPrintEngine.js"/>
|
||||
|
||||
@ -98,7 +99,9 @@ Rights Reserved.
|
||||
<key id="key_CardProperties" key="&cardPropertiesCmd.key;" command="cmd_CardProperties" modifiers="accel"/>
|
||||
</keyset>
|
||||
|
||||
<popupset id="aTooltipSet"/>
|
||||
<popupset id="aTooltipSet">
|
||||
<popup id="sidebarPopup"/>
|
||||
</popupset>
|
||||
|
||||
<toolbox class="toolbox-top">
|
||||
<menubar id="ab-menubar">
|
||||
|
@ -100,8 +100,7 @@ Rights Reserved.
|
||||
<keyset id="tasksKeys"/>
|
||||
</keyset>
|
||||
|
||||
<popupset>
|
||||
|
||||
<popupset id="aTooltipSet">
|
||||
<popup id="threadPaneContext"/>
|
||||
<popup id="folderPaneContext"/>
|
||||
|
||||
@ -123,9 +122,7 @@ Rights Reserved.
|
||||
</popup>
|
||||
|
||||
<popup id="messagePaneContext"/>
|
||||
</popupset>
|
||||
|
||||
<popupset id="aTooltipSet">
|
||||
<popup id="sidebarPopup"/>
|
||||
<popup id="folderTooltip"/>
|
||||
</popupset>
|
||||
|
||||
|
@ -102,7 +102,7 @@ Rights Reserved.
|
||||
<keyset id="tasksKeys"/>
|
||||
</keyset>
|
||||
|
||||
<popupset>
|
||||
<popupset id="aTooltipSet">
|
||||
|
||||
<popup id="threadPaneContext"/>
|
||||
<popup id="folderPaneContext"/>
|
||||
@ -125,10 +125,8 @@ Rights Reserved.
|
||||
</popup>
|
||||
|
||||
<popup id="messagePaneContext"/>
|
||||
</popupset>
|
||||
|
||||
<popupset id="aTooltipSet">
|
||||
<popup id="folderTooltip"/>
|
||||
<popup id="sidebarPopup"/>
|
||||
</popupset>
|
||||
|
||||
<toolbox id="mailToolbarToolbox" class="toolbox-top">
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
<binding id="sidebar-tab">
|
||||
<binding id="sidebar-tab" extends="xul:button">
|
||||
<content>
|
||||
<xul:image class="box-texttab-left"/>
|
||||
<xul:box class="box-texttab-text-container" autostretch="never" flex="1">
|
||||
@ -13,5 +13,5 @@
|
||||
<xul:image class="box-texttab-right"/>
|
||||
</content>
|
||||
</binding>
|
||||
|
||||
</bindings>
|
||||
|
||||
</bindings>
|
||||
|
@ -91,7 +91,7 @@ Contributor(s): ______________________________________. -->
|
||||
<commandset id="globalEditMenuItems"/>
|
||||
<commandset id="selectEditMenuItems"/>
|
||||
<commandset id="undoEditMenuItems"/>
|
||||
<commandset id="clipboardEditMenuItems"/>
|
||||
<commandset id="clipboardEditMenuItems"/>
|
||||
<!-- <command id="cmd_pageSetup"/> -->
|
||||
<command id="toggleSidebar"/>
|
||||
</commandset>
|
||||
@ -104,24 +104,20 @@ Contributor(s): ______________________________________. -->
|
||||
<key id="showHideSidebar"/>
|
||||
</keyset>
|
||||
|
||||
<!-- XXX-TEMP this needs to move into an XBL binding for browser!!! -->
|
||||
|
||||
<popupset id="aHTMLTooltipSet">
|
||||
<popup id="aHTMLTooltip" class="tooltip" oncreate="return FillInHTMLTooltip(document.tooltipNode);" >
|
||||
<box id="HTML_TOOLTIP_tooltipBox" orient="vertical"/>
|
||||
</popup>
|
||||
</popupset>
|
||||
|
||||
<popupset id="popupset">
|
||||
<popup id="backMenu" oncreate="BrowserBackMenu(event);" oncommand="gotoHistoryIndex(event);"/>
|
||||
<popup id="forwardMenu" oncreate="BrowserForwardMenu(event);" oncommand="gotoHistoryIndex(event);"/>
|
||||
</popupset>
|
||||
<popup id="sidebarPopup"/>
|
||||
|
||||
<!-- context menu -->
|
||||
<popupset id="contentAreaContextSet"/>
|
||||
<!-- context menu -->
|
||||
<popupset id="contentAreaContextSet"/>
|
||||
|
||||
<!-- tooltips -->
|
||||
<popupset id="aTooltipSet"/>
|
||||
<!-- tooltips -->
|
||||
<popupset id="aTooltipSet"/>
|
||||
</popupset>
|
||||
|
||||
<script type="application/x-javascript">
|
||||
var gBookmarkPopup = null;
|
||||
|
@ -98,9 +98,10 @@ function createUBHistoryMenu( aParent )
|
||||
// '(Nothing Available)' item.
|
||||
deleteHistoryItems(aParent);
|
||||
if (!entries.hasMoreElements()) {
|
||||
//Create the "Nothing Available" Menu item
|
||||
//Create the "Nothing Available" Menu item and disable it.
|
||||
var na = gNavigatorBundle.getString("nothingAvailable");
|
||||
createMenuItem(aParent, "nothing_available", na);
|
||||
aParent.firstChild.setAttribute("disabled", "true");
|
||||
}
|
||||
|
||||
while (entries.hasMoreElements() && (i-- > 0)) {
|
||||
|
@ -48,7 +48,7 @@
|
||||
</popup>
|
||||
</popupset>
|
||||
|
||||
<vbox flex="1" context="">
|
||||
<vbox flex="1">
|
||||
<vbox class="box-padded">
|
||||
<box autostretch="never">
|
||||
<textbox id="sidebar-search-text" flex="1"
|
||||
|
@ -23,7 +23,12 @@
|
||||
<!ENTITY sidebar.panels.label "My Sidebar">
|
||||
<!ENTITY sidebar.reload.label "Reload">
|
||||
<!ENTITY sidebar.picker.label "Tabs">
|
||||
<!ENTITY sidebar.customize.label "Customize My Sidebar...">
|
||||
<!ENTITY sidebar.customize.label "Customize Sidebar...">
|
||||
<!ENTITY sidebar.customize.accesskey "u">
|
||||
<!ENTITY sidebar.hide.label "Hide Panel">
|
||||
<!ENTITY sidebar.hide.accesskey "H">
|
||||
<!ENTITY sidebar.switch.label "Switch to Panel">
|
||||
<!ENTITY sidebar.switch.accesskey "S">
|
||||
<!ENTITY sidebarCmd.label "My Sidebar">
|
||||
<!ENTITY sidebarCmd.accesskey "m">
|
||||
<!ENTITY sidebar.loading.label "Loading...">
|
||||
|
@ -27,8 +27,21 @@
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
|
||||
|
||||
<command id="toggleSidebar" oncommand="SidebarShowHide();"/>
|
||||
<key id="showHideSidebar" keycode="VK_F9" command="toggleSidebar"/>
|
||||
<popup id="sidebarPopup" oncreate="if (sidebarObj.panels.get_panel_from_header_node(document.popupNode).is_selected())
|
||||
this.firstChild.setAttribute('collapsed', 'true');
|
||||
else
|
||||
this.firstChild.removeAttribute('collapsed');">
|
||||
<menuitem label="&sidebar.switch.label;" accesskey="&sidebar.switch.accesskey;"
|
||||
default="true" oncommand="SidebarSelectPanel(document.popupNode, false, false);"/>
|
||||
<menuitem label="&sidebar.hide.label;" accesskey="&sidebar.hide.accesskey;"
|
||||
oncommand="SidebarTogglePanel(document.popupNode);"/>
|
||||
<menuseparator/>
|
||||
<menuitem label="&sidebar.customize.label;" accesskey="&sidebar.customize.accesskey;"
|
||||
oncommand="SidebarCustomize();"/>
|
||||
</popup>
|
||||
|
||||
<!-- Overlay the sidebar panels -->
|
||||
<box id="sidebar-box" orient="vertical" persist="hidden width collapsed">
|
||||
@ -75,10 +88,10 @@
|
||||
</action>
|
||||
</rule>
|
||||
</template>
|
||||
<menuitem label="&sidebar.customize.label;"
|
||||
oncommand="SidebarCustomize();" />
|
||||
<menuitem label="&sidebar.sbDirectory.label;"
|
||||
oncommand="BrowseMorePanels();" />
|
||||
<menuitem label="&sidebar.customize.label;" accesskey="&sidebar.customize.accesskey;"
|
||||
oncommand="SidebarCustomize();" />
|
||||
<menuitem label="&sidebar.sbDirectory.label;"
|
||||
oncommand="BrowseMorePanels();" />
|
||||
<menuseparator />
|
||||
</menupopup>
|
||||
</menubutton>
|
||||
@ -108,8 +121,8 @@
|
||||
</bindings>
|
||||
<action>
|
||||
<box uri="?panel" class="box-texttab texttab-sidebar"
|
||||
onclick="SidebarSelectPanel(this,false,false)" align="left"
|
||||
hidden="true" label="?title" exclude="?exclude" />
|
||||
oncommand="SidebarSelectPanel(this,false,false)" align="left"
|
||||
hidden="true" label="?title" exclude="?exclude" context="sidebarPopup" />
|
||||
<box uri="?panel" flex='1*' hidden="true" orient="vertical"
|
||||
loadstate="never loaded">
|
||||
<box flex='1' orient="vertical" class="iframe-panel loadarea">
|
||||
@ -125,7 +138,7 @@
|
||||
<iframe class="iframe-panel" flex='1*' src="about:blank"
|
||||
hidden="true" collapsed="true" content="?content" context="contentAreaContextMenu"/>
|
||||
<iframe class="iframe-panel" flex='1*' src="about:blank"
|
||||
hidden="true" collapsed="true" content="?content" type="content" context="contentAreaContextMenu"/>
|
||||
hidden="true" collapsed="true" content="?content" type="content"/>
|
||||
</box>
|
||||
</action>
|
||||
</rule>
|
||||
|
Loading…
Reference in New Issue
Block a user