リンクから自動的にタブを開く機能について設定UIをscaleにしてみた

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4805 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-07-24 09:37:22 +00:00
parent 6837a5a50a
commit b8347e24f7
11 changed files with 69 additions and 41 deletions

View File

@ -9,8 +9,10 @@ function init()
} }
var gOuterLinkCheck, var gOpenLinkInNewTabScale,
gAnyLinkCheck, gOpenLinkInNewTabLabels,
gOuterLinkPref,
gAnyLinkPref,
gGroupBookmarkRadio, gGroupBookmarkRadio,
gGroupBookmarkTree, gGroupBookmarkTree,
gGroupBookmarkReplace, gGroupBookmarkReplace,
@ -19,9 +21,14 @@ var gTabbarPlacePositionInitialized = false;
function initTabPane() function initTabPane()
{ {
gOuterLinkCheck = document.getElementById('extensions.treestyletab.openOuterLinkInNewTab-check'); gOuterLinkPref = document.getElementById('extensions.treestyletab.openOuterLinkInNewTab');
gAnyLinkCheck = document.getElementById('extensions.treestyletab.openAnyLinkInNewTab-check'); gAnyLinkPref = document.getElementById('extensions.treestyletab.openAnyLinkInNewTab');
gOuterLinkCheck.disabled = gAnyLinkCheck.checked; gOpenLinkInNewTabScale = document.getElementById('openLinkInNewTab-scale');
gOpenLinkInNewTabLabels = document.getElementById('openLinkInNewTab-labels');
gOpenLinkInNewTabScale.value = gAnyLinkPref.value ? 2 :
gOuterLinkPref.value ? 1 :
0 ;
gOpenLinkInNewTabLabels.selectedIndex = gOpenLinkInNewTabScale.value;
gGroupBookmarkRadio = document.getElementById('openGroupBookmarkAsTabSubTree-radiogroup'); gGroupBookmarkRadio = document.getElementById('openGroupBookmarkAsTabSubTree-radiogroup');
gGroupBookmarkTree = document.getElementById('extensions.treestyletab.openGroupBookmarkAsTabSubTree'); gGroupBookmarkTree = document.getElementById('extensions.treestyletab.openGroupBookmarkAsTabSubTree');
@ -57,6 +64,13 @@ function initTabPane()
gLastStateIsVertical = gLastStateIsVertical == 'left' || gLastStateIsVertical == 'right'; gLastStateIsVertical = gLastStateIsVertical == 'left' || gLastStateIsVertical == 'right';
} }
function onOpenLinkInNewTabScaleChange()
{
gOuterLinkPref.value = gOpenLinkInNewTabScale.value == 1;
gAnyLinkPref.value = gOpenLinkInNewTabScale.value == 2;
gOpenLinkInNewTabLabels.selectedIndex = gOpenLinkInNewTabScale.value;
}
function onChangeGroupBookmarkRadio() function onChangeGroupBookmarkRadio()
{ {
gGroupBookmarkTree.value = gGroupBookmarkRadio.value == 'subtree'; gGroupBookmarkTree.value = gGroupBookmarkRadio.value == 'subtree';

View File

@ -351,15 +351,18 @@
<tabpanel orient="vertical"> <tabpanel orient="vertical">
<groupbox> <groupbox>
<caption label="&config.link.caption;"/> <caption label="&config.link.caption;"/>
<vbox> <hbox align="center">
<checkbox id="extensions.treestyletab.openOuterLinkInNewTab-check" <scale id="openLinkInNewTab-scale"
preference="extensions.treestyletab.openOuterLinkInNewTab" orient="horizontal"
label="&config.openOuterLinkInNewTab;"/> min="0"
<checkbox id="extensions.treestyletab.openAnyLinkInNewTab-check" max="2"
preference="extensions.treestyletab.openAnyLinkInNewTab" onchange="onOpenLinkInNewTabScaleChange()"/>
label="&config.openAnyLinkInNewTab;" <deck id="openLinkInNewTab-labels">
oncommand="gOuterLinkCheck.disabled = gAnyLinkCheck.checked;"/> <label value="&config.link.none;" control="openLinkInNewTab-scale"/>
</vbox> <label value="&config.link.outer;" control="openLinkInNewTab-scale"/>
<label value="&config.link.any;" control="openLinkInNewTab-scale"/>
</deck>
</hbox>
</groupbox> </groupbox>
<groupbox> <groupbox>
<caption label="&config.urlbar.caption;"/> <caption label="&config.urlbar.caption;"/>

View File

@ -44,9 +44,11 @@
<!ENTITY config.tabs.context.tab "Tabs abhängig vom Kontext öffnen"> <!ENTITY config.tabs.context.tab "Tabs abhängig vom Kontext öffnen">
<!ENTITY config.link.caption "Links">
<!ENTITY config.openOuterLinkInNewTab "Links auf andere Webseiten in einem neuen Tab öffnen"> <!ENTITY config.link.caption "Automatic New Tab Level for Links">
<!ENTITY config.openAnyLinkInNewTab "Jeden Link in einem neuen Tab öffnen"> <!ENTITY config.link.none "Nothing (Firefox default)">
<!ENTITY config.link.outer "Links auf andere Webseiten in einem neuen Tab öffnen">
<!ENTITY config.link.any "Jeden Link in einem neuen Tab öffnen">
<!ENTITY config.urlbar.caption "Verhalten beim Eingeben einer URL in die Adresszeile"> <!ENTITY config.urlbar.caption "Verhalten beim Eingeben einer URL in die Adresszeile">
<!ENTITY config.urlbar.loadDifferentDomainToNewTab "In neuem Tab laden, falls es eine andere Webseite ist"> <!ENTITY config.urlbar.loadDifferentDomainToNewTab "In neuem Tab laden, falls es eine andere Webseite ist">

View File

@ -44,9 +44,10 @@
<!ENTITY config.tabs.context.tab "Open tabs contextually"> <!ENTITY config.tabs.context.tab "Open tabs contextually">
<!ENTITY config.link.caption "Links"> <!ENTITY config.link.caption "Automatic New Tab Level for Links">
<!ENTITY config.openOuterLinkInNewTab "Open links to different website in new tab"> <!ENTITY config.link.none "Nothing (Firefox default)">
<!ENTITY config.openAnyLinkInNewTab "Open any link in new tab"> <!ENTITY config.link.outer "Open links to different website in new tab">
<!ENTITY config.link.any "Open any link in new tab">
<!ENTITY config.urlbar.caption "Action for entering URI to the location bar"> <!ENTITY config.urlbar.caption "Action for entering URI to the location bar">
<!ENTITY config.urlbar.loadDifferentDomainToNewTab "Load into new tab if it is a different website"> <!ENTITY config.urlbar.loadDifferentDomainToNewTab "Load into new tab if it is a different website">

View File

@ -44,9 +44,10 @@
<!ENTITY config.tabs.context.tab "Abrir pestañas contextualmente"> <!ENTITY config.tabs.context.tab "Abrir pestañas contextualmente">
<!ENTITY config.link.caption "Enlaces"> <!ENTITY config.link.caption "Automatic New Tab Level for Links">
<!ENTITY config.openOuterLinkInNewTab "Abrir enlaces a un diferente sitio en una nueva pestaña"> <!ENTITY config.link.none "Nothing (Firefox default)">
<!ENTITY config.openAnyLinkInNewTab "Abrir cualquier enlace en una nueva pestaña"> <!ENTITY config.link.outer "Abrir enlaces a un diferente sitio en una nueva pestaña">
<!ENTITY config.link.any "Abrir cualquier enlace en una nueva pestaña">
<!ENTITY config.urlbar.caption "Acción al ingresar una URI a la barra de ubicación"> <!ENTITY config.urlbar.caption "Acción al ingresar una URI a la barra de ubicación">
<!ENTITY config.urlbar.loadDifferentDomainToNewTab "Cargar en una nueva pestaña si es un sitio diferente al actual"> <!ENTITY config.urlbar.loadDifferentDomainToNewTab "Cargar en una nueva pestaña si es un sitio diferente al actual">

View File

@ -44,9 +44,10 @@
<!ENTITY config.tabs.context.tab "Schede"> <!ENTITY config.tabs.context.tab "Schede">
<!ENTITY config.link.caption "Collegamenti"> <!ENTITY config.link.caption "Automatic New Tab Level for Links">
<!ENTITY config.openOuterLinkInNewTab "Apri i collegamenti a siti esterni in una nuova scheda"> <!ENTITY config.link.none "Nothing (Firefox default)">
<!ENTITY config.openAnyLinkInNewTab "Apri tutti i collegamenti in una nuova scheda"> <!ENTITY config.link.outer "Apri i collegamenti a siti esterni in una nuova scheda">
<!ENTITY config.link.any "Apri tutti i collegamenti in una nuova scheda">
<!ENTITY config.urlbar.caption "L&apos;inserimento di un indirizzo nella barra degli indirizzi"> <!ENTITY config.urlbar.caption "L&apos;inserimento di un indirizzo nella barra degli indirizzi">
<!ENTITY config.urlbar.loadDifferentDomainToNewTab "apre una nuova scheda se appartiene a un sito web differente"> <!ENTITY config.urlbar.loadDifferentDomainToNewTab "apre una nuova scheda se appartiene a un sito web differente">

View File

@ -44,9 +44,10 @@
<!ENTITY config.tabs.context.tab "場合に応じてタブを開く"> <!ENTITY config.tabs.context.tab "場合に応じてタブを開く">
<!ENTITY config.link.caption "リンク"> <!ENTITY config.link.caption "リンクから自動的にタブを開くレベル">
<!ENTITY config.openOuterLinkInNewTab "異なるサイトへのリンクを新しいタブで開く"> <!ENTITY config.link.none "なしFirefox初期状態">
<!ENTITY config.openAnyLinkInNewTab "すべてのリンクを新しいタブで開く"> <!ENTITY config.link.outer "異なるサイトへのリンクをタブで開く">
<!ENTITY config.link.any "すべてのリンクをタブで開く">
<!ENTITY config.urlbar.caption "ロケーションバーへの入力"> <!ENTITY config.urlbar.caption "ロケーションバーへの入力">
<!ENTITY config.urlbar.loadDifferentDomainToNewTab "異なるサイトのURIを新しいタブで開く"> <!ENTITY config.urlbar.loadDifferentDomainToNewTab "異なるサイトのURIを新しいタブで開く">

View File

@ -44,9 +44,10 @@
<!ENTITY config.tabs.context.tab "Kontekstowe otwieranie kart"> <!ENTITY config.tabs.context.tab "Kontekstowe otwieranie kart">
<!ENTITY config.link.caption "Odnośniki"> <!ENTITY config.link.caption "Automatic New Tab Level for Links">
<!ENTITY config.openOuterLinkInNewTab "Otwieraj odnośniki do innej witryny w nowych kartach"> <!ENTITY config.link.none "Nothing (Firefox default)">
<!ENTITY config.openAnyLinkInNewTab "Otwieraj wszystkie odnośniki w nowych kartach"> <!ENTITY config.link.outer "Otwieraj odnośniki do innej witryny w nowych kartach">
<!ENTITY config.link.any "Otwieraj wszystkie odnośniki w nowych kartach">
<!ENTITY config.urlbar.caption "Działanie po wprowadzeniu adresu URI do pasku adresu"> <!ENTITY config.urlbar.caption "Działanie po wprowadzeniu adresu URI do pasku adresu">
<!ENTITY config.urlbar.loadDifferentDomainToNewTab "Jeśli jest to inna witryna, otwórz w nowej karcie"> <!ENTITY config.urlbar.loadDifferentDomainToNewTab "Jeśli jest to inna witryna, otwórz w nowej karcie">

View File

@ -44,9 +44,10 @@
<!ENTITY config.tabs.context.tab "Действия при открытии вкладок"> <!ENTITY config.tabs.context.tab "Действия при открытии вкладок">
<!ENTITY config.link.caption "Ссылки"> <!ENTITY config.link.caption "Automatic New Tab Level for Links">
<!ENTITY config.openOuterLinkInNewTab "Открывать ссылки на другой сайт в новой вкладке"> <!ENTITY config.link.none "Nothing (Firefox default)">
<!ENTITY config.openAnyLinkInNewTab "Открывать все ссылки в новой вкладке"> <!ENTITY config.link.outer "Открывать ссылки на другой сайт в новой вкладке">
<!ENTITY config.link.any "Открывать все ссылки в новой вкладке">
<!ENTITY config.urlbar.caption "Действие для введенного URI в строке адреса"> <!ENTITY config.urlbar.caption "Действие для введенного URI в строке адреса">
<!ENTITY config.urlbar.loadDifferentDomainToNewTab "Загружать в новой вкладке если ведут на другой сайт"> <!ENTITY config.urlbar.loadDifferentDomainToNewTab "Загружать в новой вкладке если ведут на другой сайт">

View File

@ -44,9 +44,10 @@
<!ENTITY config.tabs.context.tab "打开标签"> <!ENTITY config.tabs.context.tab "打开标签">
<!ENTITY config.link.caption "链接"> <!ENTITY config.link.caption "Automatic New Tab Level for Links">
<!ENTITY config.openOuterLinkInNewTab "在新标签中打开外部网站的链接"> <!ENTITY config.link.none "Nothing (Firefox default)">
<!ENTITY config.openAnyLinkInNewTab "在新标签中打开所有链接"> <!ENTITY config.link.outer "在新标签中打开外部网站的链接">
<!ENTITY config.link.any "在新标签中打开所有链接">
<!ENTITY config.urlbar.caption "在地址栏中输入URI后"> <!ENTITY config.urlbar.caption "在地址栏中输入URI后">
<!ENTITY config.urlbar.loadDifferentDomainToNewTab "如果是不同网站,在新标签中加载"> <!ENTITY config.urlbar.loadDifferentDomainToNewTab "如果是不同网站,在新标签中加载">

View File

@ -42,9 +42,11 @@
<!ENTITY config.tabs.tab "分頁操作"> <!ENTITY config.tabs.tab "分頁操作">
<!ENTITY config.tabs.context.tab "依情況開啟分頁"> <!ENTITY config.tabs.context.tab "依情況開啟分頁">
<!ENTITY config.link.caption "鏈結">
<!ENTITY config.openOuterLinkInNewTab "用新分頁開啟通往不同網站的鏈結"> <!ENTITY config.link.caption "Automatic New Tab Level for Links">
<!ENTITY config.openAnyLinkInNewTab "用新分頁開啟所有鏈結"> <!ENTITY config.link.none "Nothing (Firefox default)">
<!ENTITY config.link.outer "用新分頁開啟通往不同網站的鏈結">
<!ENTITY config.link.any "用新分頁開啟所有鏈結">
<!ENTITY config.urlbar.caption "在網址列輸入時"> <!ENTITY config.urlbar.caption "在網址列輸入時">
<!ENTITY config.urlbar.loadDifferentDomainToNewTab "用新分頁開啟通往不同網站的 URL"> <!ENTITY config.urlbar.loadDifferentDomainToNewTab "用新分頁開啟通往不同網站的 URL">