マルチプルタブハンドラ側の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() {
|
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
|
// Selection Links
|
||||||
// https://addons.mozilla.org/firefox/addon/8644
|
// https://addons.mozilla.org/firefox/addon/8644
|
||||||
if ('selectionlinks' in window &&
|
if ('selectionlinks' in window &&
|
||||||
|
@ -37,18 +37,20 @@
|
|||||||
]]></script>
|
]]></script>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Multiple Tab Handler -->
|
||||||
<menupopup id="multipletab-selection-menu">
|
<menupopup id="multipletab-selection-menu">
|
||||||
<menuitem id="multipletab-selection-item-removeTabSubtree"
|
<menuitem id="multipletab-selection-item-removeTabSubtree"
|
||||||
insertafter="multipletab-selection-removeTabs"
|
insertafter="multipletab-selection-removeTabs"
|
||||||
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"/>
|
||||||
<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(MultipleTabService.getSelectedTabs())"/>
|
multipletab-enabled="TreeStyleTabService.canCreateSubtree(selectedTabs)"/>
|
||||||
</menupopup>
|
</menupopup>
|
||||||
|
|
||||||
<popupset id="mainPopupSet">
|
<popupset id="mainPopupSet">
|
||||||
|
@ -108,8 +108,6 @@ var TreeStyleTabUtils = {
|
|||||||
kSPLITTER : 'treestyletab-splitter',
|
kSPLITTER : 'treestyletab-splitter',
|
||||||
kTABBAR_TOGGLER : 'treestyletab-tabbar-toggler',
|
kTABBAR_TOGGLER : 'treestyletab-tabbar-toggler',
|
||||||
|
|
||||||
kMENUITEM_REMOVESUBTREE_SELECTION : 'multipletab-selection-item-removeTabSubtree',
|
|
||||||
|
|
||||||
/* other constant values */
|
/* other constant values */
|
||||||
kFOCUS_ALL : 0,
|
kFOCUS_ALL : 0,
|
||||||
kFOCUS_VISIBLE : 1,
|
kFOCUS_VISIBLE : 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user