Update codes for new Multiple Tab Handler

This commit is contained in:
YUKI Hiroshi 2016-06-21 17:00:05 +09:00 committed by oonuma ryouyu
parent 95d36e08cf
commit b6f36402c3
2 changed files with 14 additions and 2 deletions

View File

@ -67,13 +67,13 @@
label="&selection.removeTabSubtree.label;" label="&selection.removeTabSubtree.label;"
accesskey="&selection.removeTabSubtree.accesskey;" accesskey="&selection.removeTabSubtree.accesskey;"
oncommand="TreeStyleTabService.removeTabSubtree(MultipleTabService.getSelectedTabs());" oncommand="TreeStyleTabService.removeTabSubtree(MultipleTabService.getSelectedTabs());"
multipletab-available="selectedTabs.length"/> multipletab-available="any-selected"/>
<menuitem id="multipletab-selection-item-createSubtree" <menuitem id="multipletab-selection-item-createSubtree"
insertafter="multipletab-selection-splitWindow" insertafter="multipletab-selection-splitWindow"
label="&selection.createSubtree.label;" label="&selection.createSubtree.label;"
accesskey="&selection.createSubtree.accesskey;" accesskey="&selection.createSubtree.accesskey;"
oncommand="TreeStyleTabService.createSubtree(MultipleTabService.getSelectedTabs());" oncommand="TreeStyleTabService.createSubtree(MultipleTabService.getSelectedTabs());"
multipletab-enabled="TreeStyleTabService.canCreateSubtree(selectedTabs)"/> multipletab-enabled="can-create-subtree"/>
</menupopup> </menupopup>
<popupset id="mainPopupSet"> <popupset id="mainPopupSet">

View File

@ -99,6 +99,18 @@ var TreeStyleTabWindowHelper = {
}; };
this.overrideExtensionsPreInit(); // windowHelperHacks.js this.overrideExtensionsPreInit(); // windowHelperHacks.js
if ('MultipleTabService' in window &&
Array.isArray(MultipleTabService.showHideMenuItemsConditionsProviders)) {
MultipleTabService.showHideMenuItemsConditionsProviders.push(
function treeProvider(aContextTabs) {
return {
'can-create-subtree' : TreeStyleTabService.canCreateSubtree(aContextTabs)
};
}
);
}
}, },
onBeforeBrowserInit : function TSTWH_onBeforeBrowserInit() onBeforeBrowserInit : function TSTWH_onBeforeBrowserInit()