マルチプルタブハンドラ側のAPIによってメニューの表示・非表示を切り替えるようにした
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5688 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
47826d2029
commit
a2dd650e44
@ -306,20 +306,6 @@ TreeStyleTabService.overrideExtensionsOnInitBefore = function TSTService_overrid
|
||||
|
||||
TreeStyleTabService.overrideExtensionsOnInitAfter = function TSTService_overrideExtensionsOnInitAfter() {
|
||||
|
||||
// Multiple Tab Handler
|
||||
if ('MultipleTabService' in window) {
|
||||
eval('MultipleTabService.showHideMenuItems = '+
|
||||
MultipleTabService.showHideMenuItems.toSource().replace(
|
||||
'var separators = ',
|
||||
<![CDATA[
|
||||
if (aPopup.id == 'multipletab-selection-menu') {
|
||||
TreeStyleTabService.showHideSubtreeMenuItem(document.getElementById(TreeStyleTabService.kMENUITEM_REMOVESUBTREE_SELECTION), MultipleTabService.getSelectedTabs());
|
||||
}
|
||||
$&]]>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// Selection Links
|
||||
// https://addons.mozilla.org/firefox/addon/8644
|
||||
if ('selectionlinks' in window &&
|
||||
|
@ -37,18 +37,20 @@
|
||||
]]></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());"/>
|
||||
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(MultipleTabService.getSelectedTabs())"/>
|
||||
multipletab-enabled="TreeStyleTabService.canCreateSubtree(selectedTabs)"/>
|
||||
</menupopup>
|
||||
|
||||
<popupset id="mainPopupSet">
|
||||
|
@ -107,8 +107,6 @@ var TreeStyleTabUtils = {
|
||||
kCOUNTER_CONTAINER : 'treestyletab-counter-container',
|
||||
kSPLITTER : 'treestyletab-splitter',
|
||||
kTABBAR_TOGGLER : 'treestyletab-tabbar-toggler',
|
||||
|
||||
kMENUITEM_REMOVESUBTREE_SELECTION : 'multipletab-selection-item-removeTabSubtree',
|
||||
|
||||
/* other constant values */
|
||||
kFOCUS_ALL : 0,
|
||||
|
Loading…
Reference in New Issue
Block a user