マルチプルタブハンドラ側のAPIによってメニューの表示・非表示を切り替えるようにした

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5688 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-01-04 01:19:56 +00:00
parent 47826d2029
commit a2dd650e44
3 changed files with 4 additions and 18 deletions

View File

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

View File

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

View File

@ -108,8 +108,6 @@ var TreeStyleTabUtils = {
kSPLITTER : 'treestyletab-splitter',
kTABBAR_TOGGLER : 'treestyletab-tabbar-toggler',
kMENUITEM_REMOVESUBTREE_SELECTION : 'multipletab-selection-item-removeTabSubtree',
/* other constant values */
kFOCUS_ALL : 0,
kFOCUS_VISIBLE : 1,