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

git-svn-id: svn://10.0.0.236/trunk@204614 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
blakeross%telocity.com 2006-07-27 14:53:53 +00:00
parent 9c12ba09cc
commit e0752cb642
3 changed files with 27 additions and 9 deletions

View File

@ -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"

View File

@ -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>

View File

@ -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...">