mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +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://global/content/strres.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaUtils.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/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/nsJSSupportsUtils.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.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/nsTransferable.js"/>
|
||||||
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
|
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
|
||||||
|
|
||||||
<popupset id="aTooltipSet" />
|
<popupset id="aTooltipSet">
|
||||||
<popupset id="editorContentContextSet"/>
|
<popupset id="editorContentContextSet"/>
|
||||||
|
<popup id="sidebarPopup"/>
|
||||||
|
</popupset>
|
||||||
|
|
||||||
<commandset id="tasksCommands">
|
<commandset id="tasksCommands">
|
||||||
<commandset id="globalEditMenuItems"/>
|
<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/widgetglue.js"/>
|
||||||
<script language="JavaScript" src="chrome://messenger/content/addressbook/addressbook.js"/>
|
<script language="JavaScript" src="chrome://messenger/content/addressbook/addressbook.js"/>
|
||||||
<script language="JavaScript" src="chrome://messenger/content/addressbook/abCommon.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/addressbook/abDragDrop.js"/>
|
||||||
<script language="JavaScript" src="chrome://messenger/content/msgPrintEngine.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"/>
|
<key id="key_CardProperties" key="&cardPropertiesCmd.key;" command="cmd_CardProperties" modifiers="accel"/>
|
||||||
</keyset>
|
</keyset>
|
||||||
|
|
||||||
<popupset id="aTooltipSet"/>
|
<popupset id="aTooltipSet">
|
||||||
|
<popup id="sidebarPopup"/>
|
||||||
|
</popupset>
|
||||||
|
|
||||||
<toolbox class="toolbox-top">
|
<toolbox class="toolbox-top">
|
||||||
<menubar id="ab-menubar">
|
<menubar id="ab-menubar">
|
||||||
|
@ -100,8 +100,7 @@ Rights Reserved.
|
|||||||
<keyset id="tasksKeys"/>
|
<keyset id="tasksKeys"/>
|
||||||
</keyset>
|
</keyset>
|
||||||
|
|
||||||
<popupset>
|
<popupset id="aTooltipSet">
|
||||||
|
|
||||||
<popup id="threadPaneContext"/>
|
<popup id="threadPaneContext"/>
|
||||||
<popup id="folderPaneContext"/>
|
<popup id="folderPaneContext"/>
|
||||||
|
|
||||||
@ -123,9 +122,7 @@ Rights Reserved.
|
|||||||
</popup>
|
</popup>
|
||||||
|
|
||||||
<popup id="messagePaneContext"/>
|
<popup id="messagePaneContext"/>
|
||||||
</popupset>
|
<popup id="sidebarPopup"/>
|
||||||
|
|
||||||
<popupset id="aTooltipSet">
|
|
||||||
<popup id="folderTooltip"/>
|
<popup id="folderTooltip"/>
|
||||||
</popupset>
|
</popupset>
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ Rights Reserved.
|
|||||||
<keyset id="tasksKeys"/>
|
<keyset id="tasksKeys"/>
|
||||||
</keyset>
|
</keyset>
|
||||||
|
|
||||||
<popupset>
|
<popupset id="aTooltipSet">
|
||||||
|
|
||||||
<popup id="threadPaneContext"/>
|
<popup id="threadPaneContext"/>
|
||||||
<popup id="folderPaneContext"/>
|
<popup id="folderPaneContext"/>
|
||||||
@ -125,10 +125,8 @@ Rights Reserved.
|
|||||||
</popup>
|
</popup>
|
||||||
|
|
||||||
<popup id="messagePaneContext"/>
|
<popup id="messagePaneContext"/>
|
||||||
</popupset>
|
|
||||||
|
|
||||||
<popupset id="aTooltipSet">
|
|
||||||
<popup id="folderTooltip"/>
|
<popup id="folderTooltip"/>
|
||||||
|
<popup id="sidebarPopup"/>
|
||||||
</popupset>
|
</popupset>
|
||||||
|
|
||||||
<toolbox id="mailToolbarToolbox" class="toolbox-top">
|
<toolbox id="mailToolbarToolbox" class="toolbox-top">
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
xmlns="http://www.mozilla.org/xbl"
|
xmlns="http://www.mozilla.org/xbl"
|
||||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
|
|
||||||
<binding id="sidebar-tab">
|
<binding id="sidebar-tab" extends="xul:button">
|
||||||
<content>
|
<content>
|
||||||
<xul:image class="box-texttab-left"/>
|
<xul:image class="box-texttab-left"/>
|
||||||
<xul:box class="box-texttab-text-container" autostretch="never" flex="1">
|
<xul:box class="box-texttab-text-container" autostretch="never" flex="1">
|
||||||
|
@ -104,25 +104,21 @@ Contributor(s): ______________________________________. -->
|
|||||||
<key id="showHideSidebar"/>
|
<key id="showHideSidebar"/>
|
||||||
</keyset>
|
</keyset>
|
||||||
|
|
||||||
<!-- XXX-TEMP this needs to move into an XBL binding for browser!!! -->
|
|
||||||
|
|
||||||
<popupset id="aHTMLTooltipSet">
|
<popupset id="aHTMLTooltipSet">
|
||||||
<popup id="aHTMLTooltip" class="tooltip" oncreate="return FillInHTMLTooltip(document.tooltipNode);" >
|
<popup id="aHTMLTooltip" class="tooltip" oncreate="return FillInHTMLTooltip(document.tooltipNode);" >
|
||||||
<box id="HTML_TOOLTIP_tooltipBox" orient="vertical"/>
|
<box id="HTML_TOOLTIP_tooltipBox" orient="vertical"/>
|
||||||
</popup>
|
</popup>
|
||||||
</popupset>
|
|
||||||
|
|
||||||
<popupset id="popupset">
|
|
||||||
<popup id="backMenu" oncreate="BrowserBackMenu(event);" oncommand="gotoHistoryIndex(event);"/>
|
<popup id="backMenu" oncreate="BrowserBackMenu(event);" oncommand="gotoHistoryIndex(event);"/>
|
||||||
<popup id="forwardMenu" oncreate="BrowserForwardMenu(event);" oncommand="gotoHistoryIndex(event);"/>
|
<popup id="forwardMenu" oncreate="BrowserForwardMenu(event);" oncommand="gotoHistoryIndex(event);"/>
|
||||||
|
<popup id="sidebarPopup"/>
|
||||||
|
|
||||||
|
<!-- context menu -->
|
||||||
|
<popupset id="contentAreaContextSet"/>
|
||||||
|
|
||||||
|
<!-- tooltips -->
|
||||||
|
<popupset id="aTooltipSet"/>
|
||||||
</popupset>
|
</popupset>
|
||||||
|
|
||||||
<!-- context menu -->
|
|
||||||
<popupset id="contentAreaContextSet"/>
|
|
||||||
|
|
||||||
<!-- tooltips -->
|
|
||||||
<popupset id="aTooltipSet"/>
|
|
||||||
|
|
||||||
<script type="application/x-javascript">
|
<script type="application/x-javascript">
|
||||||
var gBookmarkPopup = null;
|
var gBookmarkPopup = null;
|
||||||
</script>
|
</script>
|
||||||
|
@ -98,9 +98,10 @@ function createUBHistoryMenu( aParent )
|
|||||||
// '(Nothing Available)' item.
|
// '(Nothing Available)' item.
|
||||||
deleteHistoryItems(aParent);
|
deleteHistoryItems(aParent);
|
||||||
if (!entries.hasMoreElements()) {
|
if (!entries.hasMoreElements()) {
|
||||||
//Create the "Nothing Available" Menu item
|
//Create the "Nothing Available" Menu item and disable it.
|
||||||
var na = gNavigatorBundle.getString("nothingAvailable");
|
var na = gNavigatorBundle.getString("nothingAvailable");
|
||||||
createMenuItem(aParent, "nothing_available", na);
|
createMenuItem(aParent, "nothing_available", na);
|
||||||
|
aParent.firstChild.setAttribute("disabled", "true");
|
||||||
}
|
}
|
||||||
|
|
||||||
while (entries.hasMoreElements() && (i-- > 0)) {
|
while (entries.hasMoreElements() && (i-- > 0)) {
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
</popup>
|
</popup>
|
||||||
</popupset>
|
</popupset>
|
||||||
|
|
||||||
<vbox flex="1" context="">
|
<vbox flex="1">
|
||||||
<vbox class="box-padded">
|
<vbox class="box-padded">
|
||||||
<box autostretch="never">
|
<box autostretch="never">
|
||||||
<textbox id="sidebar-search-text" flex="1"
|
<textbox id="sidebar-search-text" flex="1"
|
||||||
|
@ -23,7 +23,12 @@
|
|||||||
<!ENTITY sidebar.panels.label "My Sidebar">
|
<!ENTITY sidebar.panels.label "My Sidebar">
|
||||||
<!ENTITY sidebar.reload.label "Reload">
|
<!ENTITY sidebar.reload.label "Reload">
|
||||||
<!ENTITY sidebar.picker.label "Tabs">
|
<!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.label "My Sidebar">
|
||||||
<!ENTITY sidebarCmd.accesskey "m">
|
<!ENTITY sidebarCmd.accesskey "m">
|
||||||
<!ENTITY sidebar.loading.label "Loading...">
|
<!ENTITY sidebar.loading.label "Loading...">
|
||||||
|
@ -27,8 +27,21 @@
|
|||||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||||
|
|
||||||
|
|
||||||
<command id="toggleSidebar" oncommand="SidebarShowHide();"/>
|
<command id="toggleSidebar" oncommand="SidebarShowHide();"/>
|
||||||
<key id="showHideSidebar" keycode="VK_F9" command="toggleSidebar"/>
|
<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 -->
|
<!-- Overlay the sidebar panels -->
|
||||||
<box id="sidebar-box" orient="vertical" persist="hidden width collapsed">
|
<box id="sidebar-box" orient="vertical" persist="hidden width collapsed">
|
||||||
@ -75,10 +88,10 @@
|
|||||||
</action>
|
</action>
|
||||||
</rule>
|
</rule>
|
||||||
</template>
|
</template>
|
||||||
<menuitem label="&sidebar.customize.label;"
|
<menuitem label="&sidebar.customize.label;" accesskey="&sidebar.customize.accesskey;"
|
||||||
oncommand="SidebarCustomize();" />
|
oncommand="SidebarCustomize();" />
|
||||||
<menuitem label="&sidebar.sbDirectory.label;"
|
<menuitem label="&sidebar.sbDirectory.label;"
|
||||||
oncommand="BrowseMorePanels();" />
|
oncommand="BrowseMorePanels();" />
|
||||||
<menuseparator />
|
<menuseparator />
|
||||||
</menupopup>
|
</menupopup>
|
||||||
</menubutton>
|
</menubutton>
|
||||||
@ -108,8 +121,8 @@
|
|||||||
</bindings>
|
</bindings>
|
||||||
<action>
|
<action>
|
||||||
<box uri="?panel" class="box-texttab texttab-sidebar"
|
<box uri="?panel" class="box-texttab texttab-sidebar"
|
||||||
onclick="SidebarSelectPanel(this,false,false)" align="left"
|
oncommand="SidebarSelectPanel(this,false,false)" align="left"
|
||||||
hidden="true" label="?title" exclude="?exclude" />
|
hidden="true" label="?title" exclude="?exclude" context="sidebarPopup" />
|
||||||
<box uri="?panel" flex='1*' hidden="true" orient="vertical"
|
<box uri="?panel" flex='1*' hidden="true" orient="vertical"
|
||||||
loadstate="never loaded">
|
loadstate="never loaded">
|
||||||
<box flex='1' orient="vertical" class="iframe-panel loadarea">
|
<box flex='1' orient="vertical" class="iframe-panel loadarea">
|
||||||
@ -125,7 +138,7 @@
|
|||||||
<iframe class="iframe-panel" flex='1*' src="about:blank"
|
<iframe class="iframe-panel" flex='1*' src="about:blank"
|
||||||
hidden="true" collapsed="true" content="?content" context="contentAreaContextMenu"/>
|
hidden="true" collapsed="true" content="?content" context="contentAreaContextMenu"/>
|
||||||
<iframe class="iframe-panel" flex='1*' src="about:blank"
|
<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>
|
</box>
|
||||||
</action>
|
</action>
|
||||||
</rule>
|
</rule>
|
||||||
|
Loading…
Reference in New Issue
Block a user