add a new pain (experimental)

This commit is contained in:
Piro / SHIMODA Hiroshi 2011-01-26 01:01:19 +09:00
parent 9c0a063edf
commit 1eacd02cbc
4 changed files with 174 additions and 120 deletions

View File

@ -321,20 +321,10 @@ function onTabbarTransparencyScaleChange()
}
var gUndoCloseTabSetRadioSet;
function initTreePane()
{
syncEnabledState('extensions.treestyletab.closeParentBehavior-radiogroup', 'this.value == 0');
gUndoCloseTabSetRadioSet = new RadioSet(
'extensions.treestyletab.undoCloseTabSet.behavior',
'undoCloseTabSet-radiogroup',
'undoCloseTabSet-check',
'undoCloseTabSet-deck',
1
);
var focusMode = document.getElementById('extensions.treestyletab.focusMode-check');
var focusModePref = document.getElementById('extensions.treestyletab.focusMode');
if (focusModePref.value != focusModePref.defaultValue)
@ -344,7 +334,8 @@ function initTreePane()
}
var gBookmarkDroppedTabsRadioSet;
var gBookmarkDroppedTabsRadioSet,
gUndoCloseTabSetRadioSet;
function initAdvancedPane()
{
@ -354,6 +345,14 @@ function initAdvancedPane()
'bookmarkDroppedTabs-check',
'bookmarkDroppedTabs-deck'
);
gUndoCloseTabSetRadioSet = new RadioSet(
'extensions.treestyletab.undoCloseTabSet.behavior',
'undoCloseTabSet-radiogroup',
'undoCloseTabSet-check',
'undoCloseTabSet-deck',
1
);
}

View File

@ -334,6 +334,38 @@
</prefpane>
<prefpane id="prefpane-attach" label="&config.tabs.attach;">
<preferences>
<preference id="extensions.treestyletab.autoAttach.newTabCommand"
name="extensions.treestyletab.autoAttach.newTabCommand"
type="int"/>
<preference id="extensions.treestyletab.autoAttach.searchResult"
name="extensions.treestyletab.autoAttach.searchResult"
type="int"/>
</preferences>
<groupbox>
<caption label="&config.autoAttach.newTabCommand.caption;"/>
<radiogroup id="extensions.treestyletab.autoAttach.newTabCommand-radiogroup"
orient="vertical"
preference="extensions.treestyletab.autoAttach.newTabCommand">
<radio value="0" label="&config.autoAttach.newTabCommand.ignore;"/>
<radio value="1" label="&config.autoAttach.newTabCommand.current;"/>
<radio value="2" label="&config.autoAttach.newTabCommand.parent;"/>
</radiogroup>
</groupbox>
<groupbox>
<caption label="&config.autoAttach.searchResult.caption;"/>
<radiogroup id="extensions.treestyletab.autoAttach.searchResult-radiogroup"
orient="vertical"
preference="extensions.treestyletab.autoAttach.searchResult">
<radio value="0" label="&config.autoAttach.searchResult.ignore;"/>
<radio value="1" label="&config.autoAttach.searchResult.selected;"/>
<radio value="2" label="&config.autoAttach.searchResult.always;"/>
</radiogroup>
</groupbox>
</prefpane>
<prefpane id="prefpane-tab" label="&config.tabs.tab;"
onpaneload="initTabPane();">
<preferences>
@ -422,6 +454,89 @@
</prefpane>
<prefpane id="prefpane-tree" label="&config.tabs.tree;"
onpaneload="initTreePane();">
<preferences>
<preference id="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect"
name="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect"
type="bool"/>
<preference id="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove"
name="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove"
type="bool"
inverted="true"/>
<preference id="extensions.treestyletab.collapseExpandSubtree.dblclick"
name="extensions.treestyletab.collapseExpandSubtree.dblclick"
type="bool"/>
<!--preference id="extensions.treestyletab.autoExpandSubtreeOnAppendChild"
name="extensions.treestyletab.autoExpandSubtreeOnAppendChild"
type="bool"/-->
<preference id="extensions.treestyletab.focusMode"
name="extensions.treestyletab.focusMode"
type="int"/>
<preference id="extensions.treestyletab.closeParentBehavior"
name="extensions.treestyletab.closeParentBehavior"
type="int"/>
<preference id="extensions.treestyletab.closeRootBehavior"
name="extensions.treestyletab.closeRootBehavior"
type="int"/>
<preference id="extensions.treestyletab.insertNewChildAt"
name="extensions.treestyletab.insertNewChildAt"
type="int"/>
</preferences>
<checkbox id="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect-check"
preference="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect"
label="&config.autoCollapseExpandSubtreeOnSelect;"/>
<hbox align="center">
<spacer style="width:1em;"/>
<checkbox id="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove-check"
label="&config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove;"
preference="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove"/>
</hbox>
<checkbox id="extensions.treestyletab.focusMode-check"
preference="extensions.treestyletab.focusMode"
label="&config.focusMode;"
onsyncfrompreference="return document.getElementById('extensions.treestyletab.focusMode').value == 0;"
onsynctopreference="return document.getElementById('extensions.treestyletab.focusMode-check').checked ? 0 : 1 ;"/>
<checkbox id="extensions.treestyletab.collapseExpandSubtree.dblclick-check"
preference="extensions.treestyletab.collapseExpandSubtree.dblclick"
label="&config.collapseExpandSubtree.dblclick;"/>
<!--checkbox id="extensions.treestyletab.autoExpandSubtreeOnAppendChild-check"
preference="extensions.treestyletab.autoExpandSubtreeOnAppendChild"
label="&config.autoExpandSubtreeOnAppendChild;"/-->
<groupbox>
<caption label="&config.closeParentBehavior.caption;"/>
<radiogroup id="extensions.treestyletab.closeParentBehavior-radiogroup"
preference="extensions.treestyletab.closeParentBehavior"
orient="vertical"
oncommand="syncEnabledState(this, this.value == 0);"
sync-enabled-state-targets="extensions.treestyletab.closeRootBehavior-check">
<radio value="2" label="&config.closeParentBehavior.close;"/>
<radio value="3" label="&config.closeParentBehavior.promoteFirst;"/>
<radio value="0" label="&config.closeParentBehavior.promoteAll;"/>
<hbox align="center">
<spacer style="width:1em;"/>
<checkbox id="extensions.treestyletab.closeRootBehavior-check"
label="&config.closeRootBehavior.promoteFirst;"
preference="extensions.treestyletab.closeRootBehavior"
onsyncfrompreference="return document.getElementById('extensions.treestyletab.closeRootBehavior').value == 3;"
onsynctopreference="return document.getElementById('extensions.treestyletab.closeRootBehavior-check').checked ? 3 : 1 ;"/>
</hbox>
<radio value="1" label="&config.closeParentBehavior.detach;"/>
</radiogroup>
</groupbox>
<groupbox>
<caption label="&config.insertNewChildAt.caption;"/>
<radiogroup id="extensions.treestyletab.insertNewChildAt-radiogroup"
preference="extensions.treestyletab.insertNewChildAt"
orient="horizontal">
<radio value="0" label="&config.insertNewChildAt.first;"/>
<radio value="1" label="&config.insertNewChildAt.last;"/>
</radiogroup>
</groupbox>
</prefpane>
<prefpane id="prefpane-autohide" label="&config.tabs.autohide;"
onpaneload="initAutoHidePane();">
<preferences>
@ -602,112 +717,6 @@
</prefpane>
<prefpane id="prefpane-tree" label="&config.tabs.tree;"
onpaneload="initTreePane();">
<preferences>
<preference id="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect"
name="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect"
type="bool"/>
<preference id="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove"
name="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove"
type="bool"
inverted="true"/>
<preference id="extensions.treestyletab.collapseExpandSubtree.dblclick"
name="extensions.treestyletab.collapseExpandSubtree.dblclick"
type="bool"/>
<!--preference id="extensions.treestyletab.autoExpandSubtreeOnAppendChild"
name="extensions.treestyletab.autoExpandSubtreeOnAppendChild"
type="bool"/-->
<preference id="extensions.treestyletab.focusMode"
name="extensions.treestyletab.focusMode"
type="int"/>
<preference id="extensions.treestyletab.closeParentBehavior"
name="extensions.treestyletab.closeParentBehavior"
type="int"/>
<preference id="extensions.treestyletab.closeRootBehavior"
name="extensions.treestyletab.closeRootBehavior"
type="int"/>
<preference id="extensions.treestyletab.insertNewChildAt"
name="extensions.treestyletab.insertNewChildAt"
type="int"/>
<preference id="extensions.treestyletab.undoCloseTabSet.behavior"
name="extensions.treestyletab.undoCloseTabSet.behavior"
type="int"/>
</preferences>
<checkbox id="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect-check"
preference="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect"
label="&config.autoCollapseExpandSubtreeOnSelect;"/>
<hbox align="center">
<spacer style="width:1em;"/>
<checkbox id="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove-check"
label="&config.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove;"
preference="extensions.treestyletab.autoCollapseExpandSubtreeOnSelect.onCurrentTabRemove"/>
</hbox>
<checkbox id="extensions.treestyletab.focusMode-check"
preference="extensions.treestyletab.focusMode"
label="&config.focusMode;"
onsyncfrompreference="return document.getElementById('extensions.treestyletab.focusMode').value == 0;"
onsynctopreference="return document.getElementById('extensions.treestyletab.focusMode-check').checked ? 0 : 1 ;"/>
<checkbox id="extensions.treestyletab.collapseExpandSubtree.dblclick-check"
preference="extensions.treestyletab.collapseExpandSubtree.dblclick"
label="&config.collapseExpandSubtree.dblclick;"/>
<!--checkbox id="extensions.treestyletab.autoExpandSubtreeOnAppendChild-check"
preference="extensions.treestyletab.autoExpandSubtreeOnAppendChild"
label="&config.autoExpandSubtreeOnAppendChild;"/-->
<groupbox>
<caption label="&config.closeParentBehavior.caption;"/>
<radiogroup id="extensions.treestyletab.closeParentBehavior-radiogroup"
preference="extensions.treestyletab.closeParentBehavior"
orient="vertical"
oncommand="syncEnabledState(this, this.value == 0);"
sync-enabled-state-targets="extensions.treestyletab.closeRootBehavior-check">
<radio value="2" label="&config.closeParentBehavior.close;"/>
<radio value="3" label="&config.closeParentBehavior.promoteFirst;"/>
<radio value="0" label="&config.closeParentBehavior.promoteAll;"/>
<hbox align="center">
<spacer style="width:1em;"/>
<checkbox id="extensions.treestyletab.closeRootBehavior-check"
label="&config.closeRootBehavior.promoteFirst;"
preference="extensions.treestyletab.closeRootBehavior"
onsyncfrompreference="return document.getElementById('extensions.treestyletab.closeRootBehavior').value == 3;"
onsynctopreference="return document.getElementById('extensions.treestyletab.closeRootBehavior-check').checked ? 3 : 1 ;"/>
</hbox>
<radio value="1" label="&config.closeParentBehavior.detach;"/>
</radiogroup>
</groupbox>
<groupbox>
<caption label="&config.insertNewChildAt.caption;"/>
<radiogroup id="extensions.treestyletab.insertNewChildAt-radiogroup"
preference="extensions.treestyletab.insertNewChildAt"
orient="horizontal">
<radio value="0" label="&config.insertNewChildAt.first;"/>
<radio value="1" label="&config.insertNewChildAt.last;"/>
</radiogroup>
</groupbox>
<groupbox>
<caption label="&config.undoCloseTabSet.caption;"/>
<hbox>
<checkbox id="undoCloseTabSet-check"
label="&config.undoCloseTabSet.ask;"
oncommand="gUndoCloseTabSetRadioSet.onChange();"/>
</hbox>
<deck id="undoCloseTabSet-deck">
<spacer flex="1"/>
<vbox>
<separator class="hr"/>
<radiogroup id="undoCloseTabSet-radiogroup"
preference="extensions.treestyletab.undoCloseTabSet.behavior"
orient="horizontal">
<radio value="2" label="&config.undoCloseTabSet.set;"/>
<radio value="0" label="&config.undoCloseTabSet.separate;"/>
</radiogroup>
</vbox>
</deck>
</groupbox>
</prefpane>
<prefpane id="prefpane-advanced" label="&config.tabs.advanced;"
onpaneload="initAdvancedPane();">
<preferences>
@ -720,6 +729,9 @@
<preference id="extensions.treestyletab.bookmarkDroppedTabs.behavior"
name="extensions.treestyletab.bookmarkDroppedTabs.behavior"
type="int"/>
<preference id="extensions.treestyletab.undoCloseTabSet.behavior"
name="extensions.treestyletab.undoCloseTabSet.behavior"
type="int"/>
</preferences>
<checkbox id="extensions.treestyletab.animation.enabled-check"
@ -750,6 +762,26 @@
</vbox>
</deck>
</groupbox>
<groupbox>
<caption label="&config.undoCloseTabSet.caption;"/>
<hbox>
<checkbox id="undoCloseTabSet-check"
label="&config.undoCloseTabSet.ask;"
oncommand="gUndoCloseTabSetRadioSet.onChange();"/>
</hbox>
<deck id="undoCloseTabSet-deck">
<spacer flex="1"/>
<vbox>
<separator class="hr"/>
<radiogroup id="undoCloseTabSet-radiogroup"
preference="extensions.treestyletab.undoCloseTabSet.behavior"
orient="horizontal">
<radio value="2" label="&config.undoCloseTabSet.set;"/>
<radio value="0" label="&config.undoCloseTabSet.separate;"/>
</radiogroup>
</vbox>
</deck>
</groupbox>
</prefpane>
<script src="config.js" type="application/javascript"/>

View File

@ -47,10 +47,20 @@
<!ENTITY config.show.tabContextMenu.caption "Add following items to the context menu on tabs">
<!ENTITY config.tabs.tab "New Tabs">
<!ENTITY config.tabs.attach "Attach">
<!ENTITY config.tabs.bookmark.tab "Bookmarks">
<!ENTITY config.tabs.dragdrop.tab "Drag &amp; Drop to tabs">
<!ENTITY config.autoAttach.newTabCommand.caption "When a new blank tab is opened manually">
<!ENTITY config.autoAttach.newTabCommand.ignore "Open as a root tab">
<!ENTITY config.autoAttach.newTabCommand.current "Open as a child of the current tab">
<!ENTITY config.autoAttach.newTabCommand.parent "Open as a sibling of the current tab">
<!ENTITY config.autoAttach.searchResult.caption "When the search result is opened in a tab">
<!ENTITY config.autoAttach.searchResult.ignore "Do nothing">
<!ENTITY config.autoAttach.searchResult.selected "Open as a child if the search term is selected in the current page">
<!ENTITY config.autoAttach.searchResult.always "Always open as a child">
<!ENTITY config.tabs.tab "New Tabs">
<!ENTITY config.openGroupBookmark.caption "Behavior of &quot;Open All in Tabs&quot; for bookmark folders">
<!ENTITY config.openGroupBookmark.ask "Ask me always">

View File

@ -47,6 +47,19 @@
<!ENTITY config.show.tabContextMenu.caption "タブのコンテキストメニューに以下の項目を追加する">
<!ENTITY config.tabs.attach "タブのツリー化">
<!ENTITY config.autoAttach.newTabCommand.caption "新しい空のタブを開いた時">
<!ENTITY config.autoAttach.newTabCommand.ignore "独立したタブとして開く">
<!ENTITY config.autoAttach.newTabCommand.current "現在のタブの子として開く">
<!ENTITY config.autoAttach.newTabCommand.parent "現在のタブと同階層に開く">
<!ENTITY config.autoAttach.searchResult.caption "検索結果がタブで開かれた時">
<!ENTITY config.autoAttach.searchResult.ignore "何もしない">
<!ENTITY config.autoAttach.searchResult.selected "現在のページで選択されている語句を検索した時は子タブとして開く">
<!ENTITY config.autoAttach.searchResult.always "常に現在のタブの子として開く">
<!ENTITY config.tabs.tab "新しいタブ">
<!ENTITY config.tabs.bookmark.tab "ブックマーク">