タブバーを固定したらドラッグ&ドロップでの移動も禁止するようにした

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5001 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-08-25 10:35:53 +00:00
parent 80b1224c46
commit 47de5a0e95
11 changed files with 34 additions and 27 deletions

View File

@ -1413,7 +1413,7 @@ var TreeStyleTabService = {
aObserver._onDragStart.toSource().replace(
'if (target.localName == "tab"',
<![CDATA[
if (aEvent.shiftKey) {
if (aEvent.shiftKey && this.getAttribute(this.treeStyleTab.kFIXED) != 'true') {
let dt = aEvent.dataTransfer;
dt.mozSetDataAt(this.treeStyleTab.kDRAG_TYPE_TABBAR, Date.now(), 0);
dt.mozCursor = 'move';
@ -1435,7 +1435,12 @@ var TreeStyleTabService = {
eval('aObserver.onDragStart = '+
aObserver.onDragStart.toSource().replace(
'aEvent.target.localName == "tab"',
'(!aEvent.shiftKey && $&)'
<![CDATA[
(
(!aEvent.shiftKey || this.getAttribute(this.treeStyleTab.kFIXED) == 'true') &&
$&
)
]]>
)
);
}
@ -1896,8 +1901,8 @@ catch(e) {
contentAreaDNDObserver.onDrop.toSource().replace(
'var types = aEvent.dataTransfer.types;',
<![CDATA[$&
if (gBrowser.treeStyleTab.panelDNDObserver.canDrop(aEvent, aDragSession)) {
return gBrowser.treeStyleTab.panelDNDObserver.onDrop(aEvent);
if (gBrowser.treeStyleTab.panelDNDObserver.canDrop(aEvent, gBrowser.treeStyleTab.getCurrentDragSession())) {
return gBrowser.treeStyleTab.panelDNDObserver.onDrop(aEvent, null, gBrowser.treeStyleTab.getCurrentDragSession());
}
]]>
)

View File

@ -2333,6 +2333,8 @@ TreeStyleTabBrowser.prototype = {
if (!tabbar || (tab && !aEvent.shiftKey))
return false;
if (sv.mTabBrowser.getAttribute(sv.kFIXED) == 'true') return;
aTransferData.data = new TransferData();
aTransferData.data.addDataForFlavour(sv.kDRAG_TYPE_TABBAR, Date.now());
sv.mTabBrowser.setAttribute(sv.kDROP_POSITION, 'unknown');

View File

@ -170,9 +170,9 @@
<!ENTITY context.expandAllSubtree.accesskey "e">
<!ENTITY context.toggleAutoHide.label "Tableiste verstecken">
<!ENTITY context.toggleAutoHide.accesskey "h">
<!ENTITY context.toggleFixed.label "Feste Größe der Tableiste">
<!ENTITY context.toggleFixed.label.horizontal "Feste Höhe der Tableiste">
<!ENTITY context.toggleFixed.label.vertical "Feste Breite der Tableiste">
<!ENTITY context.toggleFixed.label "Feste Position und Größe der Tableiste">
<!ENTITY context.toggleFixed.label.horizontal "Feste Position und Höhe der Tableiste">
<!ENTITY context.toggleFixed.label.vertical "Feste Position und Breite der Tableiste">
<!ENTITY context.toggleFixed.accesskey "f">
<!ENTITY context.tabbarPosition.label "Position">
<!ENTITY context.tabbarPosition.accesskey "p">

View File

@ -169,9 +169,9 @@
<!ENTITY context.expandAllSubtree.accesskey "e">
<!ENTITY context.toggleAutoHide.label "Auto hide tab bar">
<!ENTITY context.toggleAutoHide.accesskey "h">
<!ENTITY context.toggleFixed.label "Fix width/height of tab bar">
<!ENTITY context.toggleFixed.label.horizontal "Fix height of tab bar">
<!ENTITY context.toggleFixed.label.vertical "Fix width of tab bar">
<!ENTITY context.toggleFixed.label "Fix position and width/height of tab bar">
<!ENTITY context.toggleFixed.label.horizontal "Fix position and height of tab bar">
<!ENTITY context.toggleFixed.label.vertical "Fix position and width of tab bar">
<!ENTITY context.toggleFixed.accesskey "f">
<!ENTITY context.tabbarPosition.label "Position">
<!ENTITY context.tabbarPosition.accesskey "p">

View File

@ -173,8 +173,8 @@
<!ENTITY context.expandAllSubtree.accesskey "e">
<!ENTITY context.toggleAutoHide.label "Auto-ocultar la barra de pestañas">
<!ENTITY context.toggleAutoHide.accesskey "h">
<!ENTITY context.toggleFixed.label "Fix width/height of tab bar">
<!ENTITY context.toggleFixed.label.horizontal "Fix height of tab bar">
<!ENTITY context.toggleFixed.label "Fix position and width/height of tab bar">
<!ENTITY context.toggleFixed.label.horizontal "Fix position and height of tab bar">
<!ENTITY context.toggleFixed.label.vertical "Anclar la barra de pestañas">
<!ENTITY context.toggleFixed.accesskey "f">
<!ENTITY context.tabbarPosition.label "Posición">

View File

@ -173,8 +173,8 @@
<!ENTITY context.expandAllSubtree.accesskey "E">
<!ENTITY context.toggleAutoHide.label "Nascondi automaticamente la barra delle schede">
<!ENTITY context.toggleAutoHide.accesskey "b">
<!ENTITY context.toggleFixed.label "Fix width/height of tab bar">
<!ENTITY context.toggleFixed.label.horizontal "Fix height of tab bar">
<!ENTITY context.toggleFixed.label "Fix position and width/height of tab bar">
<!ENTITY context.toggleFixed.label.horizontal "Fix position and height of tab bar">
<!ENTITY context.toggleFixed.label.vertical "Blocca larghezza della barra delle schede">
<!ENTITY context.toggleFixed.accesskey "h">
<!ENTITY context.tabbarPosition.label "Posiziona">

View File

@ -169,9 +169,9 @@
<!ENTITY context.expandAllSubtree.accesskey "e">
<!ENTITY context.toggleAutoHide.label "タブバーを自動的に隠す">
<!ENTITY context.toggleAutoHide.accesskey "h">
<!ENTITY context.toggleFixed.label "タブバーの幅/高さを固定">
<!ENTITY context.toggleFixed.label.horizontal "タブバーの高さを固定">
<!ENTITY context.toggleFixed.label.vertical "タブバーの幅を固定">
<!ENTITY context.toggleFixed.label "タブバーの位置と幅/高さを固定">
<!ENTITY context.toggleFixed.label.horizontal "タブバーの位置と高さを固定">
<!ENTITY context.toggleFixed.label.vertical "タブバーの位置と幅を固定">
<!ENTITY context.toggleFixed.accesskey "f">
<!ENTITY context.tabbarPosition.label "タブバーの位置">
<!ENTITY context.tabbarPosition.accesskey "p">

View File

@ -172,8 +172,8 @@
<!ENTITY context.expandAllSubtree.accesskey "R">
<!ENTITY context.toggleAutoHide.label "Ukrywaj pasek kart">
<!ENTITY context.toggleAutoHide.accesskey "U">
<!ENTITY context.toggleFixed.label "Fix width/height of tab bar">
<!ENTITY context.toggleFixed.label.horizontal "Fix height of tab bar">
<!ENTITY context.toggleFixed.label "Fix position and width/height of tab bar">
<!ENTITY context.toggleFixed.label.horizontal "Fix position and height of tab bar">
<!ENTITY context.toggleFixed.label.vertical "Stała szerokość paska kart">
<!ENTITY context.toggleFixed.accesskey "S">
<!ENTITY context.tabbarPosition.label "Położenie paska kart">

View File

@ -173,8 +173,8 @@
<!ENTITY context.expandAllSubtree.accesskey "e">
<!ENTITY context.toggleAutoHide.label "Автоскрытие панели вкладок">
<!ENTITY context.toggleAutoHide.accesskey "h">
<!ENTITY context.toggleFixed.label "Fix width/height of tab bar">
<!ENTITY context.toggleFixed.label.horizontal "Fix height of tab bar">
<!ENTITY context.toggleFixed.label "Fix position and width/height of tab bar">
<!ENTITY context.toggleFixed.label.horizontal "Fix position and height of tab bar">
<!ENTITY context.toggleFixed.label.vertical "Зафиксировать ширину панели вкладок">
<!ENTITY context.toggleFixed.accesskey "f">
<!ENTITY context.tabbarPosition.label "Позиция">

View File

@ -173,9 +173,9 @@
<!ENTITY context.expandAllSubtree.accesskey "e">
<!ENTITY context.toggleAutoHide.label "自动隐藏标签栏">
<!ENTITY context.toggleAutoHide.accesskey "h">
<!ENTITY context.toggleFixed.label "固定标签栏高/宽度">
<!ENTITY context.toggleFixed.label.horizontal "固定标签栏高度">
<!ENTITY context.toggleFixed.label.vertical "固定标签栏宽度">
<!ENTITY context.toggleFixed.label "固定标签栏位置/高/宽度">
<!ENTITY context.toggleFixed.label.horizontal "固定标签栏位置/高度">
<!ENTITY context.toggleFixed.label.vertical "固定标签栏位置/宽度">
<!ENTITY context.toggleFixed.accesskey "f">
<!ENTITY context.tabbarPosition.label "标签栏位置">
<!ENTITY context.tabbarPosition.accesskey "p">

View File

@ -169,9 +169,9 @@
<!ENTITY context.expandAllSubtree.accesskey "e">
<!ENTITY context.toggleAutoHide.label "自動隱藏分頁工具列">
<!ENTITY context.toggleAutoHide.accesskey "h">
<!ENTITY context.toggleFixed.label "固定分頁工具列的寬高">
<!ENTITY context.toggleFixed.label.horizontal "固定分頁工具列的高度">
<!ENTITY context.toggleFixed.label.vertical "固定分頁工具列的寬度">
<!ENTITY context.toggleFixed.label "固定分頁工具列的位置/寬高">
<!ENTITY context.toggleFixed.label.horizontal "固定分頁工具列的位置/高度">
<!ENTITY context.toggleFixed.label.vertical "固定分頁工具列的位置/寬度">
<!ENTITY context.toggleFixed.accesskey "f">
<!ENTITY context.tabbarPosition.label "分頁工具列的位置">
<!ENTITY context.tabbarPosition.accesskey "p">