treestyletab/content/treestyletab/treestyletab.xul

154 lines
8.0 KiB
XML

<?xml version="1.0"?>
<?xml-stylesheet href="treestyletab.css" type="text/css"?>
<?xml-stylesheet href="treestyletab-tmp.css" type="text/css"?><!-- hacks for Tab Mix Plus -->
<?xml-stylesheet href="chrome://treestyletab/skin/base.css" type="text/css"?>
<?xml-stylesheet href="chrome://treestyletab/skin/twisty/twisty.css" type="text/css"?>
<?xml-stylesheet href="chrome://treestyletab/skin/ui.css" type="text/css"?>
<?xml-stylesheet href="chrome://treestyletab/skin/tmp.css" type="text/css"?><!-- hacks for Tab Mix Plus -->
<?xml-stylesheet href="chrome://treestyletab/skin/platform-base.css" type="text/css"?>
<?xml-stylesheet href="chrome://treestyletab/skin/pseudo-tree.css" type="text/css"?>
<!DOCTYPE overlay SYSTEM "chrome://treestyletab/locale/treestyletab.dtd">
<overlay id="treestyletab-overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="res/tabsDragUtils.js" type="application/javascript"/>
<script src="treestyletab.js" type="application/javascript"/>
<script src="windowHelper.js" type="application/javascript"/>
<script src="windowHelperHacks.js" type="application/javascript"/>
<script src="bookmarksOverlay.js" type="application/javascript"/>
<script src="bookmarksOverlayEditable.js" type="application/javascript"/>
<script type="application/javascript"><![CDATA[
// for backward compatibility
var TreeStyleTabBrowserAutoHide = TreeStyleTabService.autoHideWindow;
// preload images
TreeStyleTabService.observe(
null,
'nsPref:changed',
'extensions.treestyletab.tabbar.style'
);
]]></script>
<!-- Multiple Tab Handler -->
<menupopup id="multipletab-selection-menu">
<menuitem id="multipletab-selection-item-removeTabSubtree"
insertafter="multipletab-selection-removeTabs"
label="&selection.removeTabSubtree.label;"
accesskey="&selection.removeTabSubtree.accesskey;"
oncommand="TreeStyleTabService.removeTabSubtree(MultipleTabService.getSelectedTabs());"
multipletab-available="selectedTabs.length"/>
<menuitem id="multipletab-selection-item-createSubtree"
insertafter="multipletab-selection-splitWindow"
label="&selection.createSubtree.label;"
accesskey="&selection.createSubtree.accesskey;"
oncommand="TreeStyleTabService.createSubtree(MultipleTabService.getSelectedTabs());"
multipletab-enabled="TreeStyleTabService.canCreateSubtree(selectedTabs)"/>
</menupopup>
<popupset id="mainPopupSet">
<menupopup id="multipletab-tabcontext-menu-template">
<menuitem id="context-item-reloadTabSubtree"
label="&context.reloadTabSubtree.label;"
accesskey="&context.reloadTabSubtree.accesskey;"
oncommand="TreeStyleTabService.reloadTabSubtree(TreeStyleTabService.getTabBrowserFromChild(this).mContextTab);"
onclick="if (event.button == 1 || (event.button == 0 &amp;&amp; TreeStyleTabService.isAccelKeyPressed(event))) {
TreeStyleTabService.reloadTabSubtree(TreeStyleTabService.getTabBrowserFromChild(this).mContextTab, true);
event.stopPropagation();
this.parentNode.hidePopup();
}"
multipletab-insertafter="tabContextMenu.querySelector(&quot;*[id^='context_reloadTab']&quot;)"/>
<menuitem id="context-item-reloadDescendantTabs"
label="&context.reloadDescendantTabs.label;"
accesskey="&context.reloadDescendantTabs.accesskey;"
oncommand="TreeStyleTabService.reloadTabSubtree(TreeStyleTabService.getTabBrowserFromChild(this).mContextTab, true);"
onclick="if (event.button == 1 || (event.button == 0 &amp;&amp; TreeStyleTabService.isAccelKeyPressed(event))) {
TreeStyleTabService.reloadTabSubtree(TreeStyleTabService.getTabBrowserFromChild(this).mContextTab);
event.stopPropagation();
this.parentNode.hidePopup();
}"
multipletab-insertafter="tabContextMenu.querySelector(&quot;*[id^='context-item-reloadTabSubtree']&quot;)"/>
<menuitem id="context-item-removeTabSubtree"
label="&context.removeTabSubtree.label;"
accesskey="&context.removeTabSubtree.accesskey;"
oncommand="TreeStyleTabService.removeTabSubtree(TreeStyleTabService.getTabBrowserFromChild(this).mContextTab);"
onclick="if (event.button == 1 || (event.button == 0 &amp;&amp; TreeStyleTabService.isAccelKeyPressed(event))) {
TreeStyleTabService.removeTabSubtree(TreeStyleTabService.getTabBrowserFromChild(this).mContextTab, true);
event.stopPropagation();
this.parentNode.hidePopup();
}"
multipletab-insertbefore="TreeStyleTabUtils.evaluateXPath(
&quot;(descendant::*[starts-with(@id, 'multipletab-context-removeAll') | starts-with(@id, 'context_closeTab')][1] | child::xul:menuitem[last()])/preceding-sibling::xul:menuseparator[1]&quot;
, tabContextMenu, XPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue"/>
<menuitem id="context-item-removeDescendantTabs"
label="&context.removeDescendantTabs.label;"
accesskey="&context.removeDescendantTabs.accesskey;"
oncommand="TreeStyleTabService.removeTabSubtree(TreeStyleTabService.getTabBrowserFromChild(this).mContextTab, true);"
onclick="if (event.button == 1 || (event.button == 0 &amp;&amp; TreeStyleTabService.isAccelKeyPressed(event))) {
TreeStyleTabService.removeTabSubtree(TreeStyleTabService.getTabBrowserFromChild(this).mContextTab);
event.stopPropagation();
this.parentNode.hidePopup();
}"
multipletab-insertafter="tabContextMenu.querySelector(&quot;*[id^='context-item-removeTabSubtree']&quot;)"/>
<menuitem id="context-item-removeAllTabsButThisTree"
label="&context.removeAllTabsBut.label;"
accesskey="&context.removeAllTabsBut.accesskey;"
oncommand="TreeStyleTabService.removeAllTabsBut(TreeStyleTabService.getTabBrowserFromChild(this).mContextTab);"
multipletab-insertafter="tabContextMenu.querySelector(&quot;*[id^='context_closeOtherTabs']&quot;)"/>
<menuitem id="context-item-bookmarkTabSubtree"
label="&context.bookmarkTabSubtree.label;"
accesskey="&context.bookmarkTabSubtree.accesskey;"
oncommand="TreeStyleTabBookmarksService.bookmarkTabSubtree(TreeStyleTabService.getTabBrowserFromChild(this).mContextTab);"
multipletab-insertafter="TreeStyleTabUtils.evaluateXPath(
&quot;descendant::*[starts-with(@id, 'context_bookmarkTab')][1] | descendant::*[@command='Browser:BookmarkAllTabs']/preceding-sibling[1]&quot;
, tabContextMenu, XPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue"/>
<!-- simply appended items -->
<menuseparator id="context-separator-collapseExpandAll"/>
<menuitem id="context-item-collapseAllSubtree"
label="&context.collapseAllSubtree.label;"
accesskey="&context.collapseAllSubtree.accesskey;"
oncommand="TreeStyleTabService.getTabBrowserFromChild(this).treeStyleTab.collapseExpandAllSubtree(true);"/>
<menuitem id="context-item-expandAllSubtree"
label="&context.expandAllSubtree.label;"
accesskey="&context.expandAllSubtree.accesskey;"
oncommand="TreeStyleTabService.getTabBrowserFromChild(this).treeStyleTab.collapseExpandAllSubtree(false);"/>
<menuseparator id="context-separator-toggleAutoHide"/>
<menuitem id="context-item-toggleAutoHide"
label="&context.toggleAutoHide.label.hide;"
label-hide="&context.toggleAutoHide.label.hide;"
label-shrink="&context.toggleAutoHide.label.shrink;"
accesskey="&context.toggleAutoHide.accesskey;"
type="checkbox"
autocheck="false"
oncommand="TreeStyleTabService.toggleAutoHide(TreeStyleTabService.getTabBrowserFromChild(this));"/>
<menuitem id="context-item-toggleFixed"
label="&context.toggleFixed.label;"
label-horizontal="&context.toggleFixed.label.horizontal;"
label-vertical="&context.toggleFixed.label.vertical;"
accesskey="&context.toggleFixed.accesskey;"
type="checkbox"
autocheck="false"
oncommand="TreeStyleTabService.toggleFixed(TreeStyleTabService.getTabBrowserFromChild(this));"/>
</menupopup>
<tooltip id="treestyletab-full-tree-tooltip"/>
<panel id="treestyletab-autohide-content-area-screen"
treestyletab-ignore-state="true"
onpopupshown="if ('setConsumeRollupEvent' in this.popupBoxObject) this.popupBoxObject.setConsumeRollupEvent(this.popupBoxObject.ROLLUP_NO_CONSUME || PopupBoxObject.ROLLUP_NO_CONSUME);"
onclick="this.hidePopup();"
onDOMMouseScroll="this.hidePopup()"/>
</popupset>
</overlay>