isCopyAction()
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6579 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
fcd691abc9
commit
e6e0529367
@ -2928,8 +2928,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
info.canDrop = true;
|
||||
info.source = tab;
|
||||
if (tab) {
|
||||
var isCopy = this.isAccelKeyPressed(aEvent) ||
|
||||
(aEvent.dataTransfer && aEvent.dataTransfer.dropEffect == 'copy');
|
||||
var isCopy = this.isCopyAction(aEvent);
|
||||
if (isCopy && 'duplicateTab' in this.mTabBrowser) {
|
||||
info.action |= this.kACTION_DUPLICATE;
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ TreeStyleTabBrowserTabbarDNDObserver.prototype = {
|
||||
if (dropAction.action & this.kACTION_NEWTAB) {
|
||||
dt.effectAllowed = dt.dropEffect = (
|
||||
!dropAction.source ? 'link' :
|
||||
sv.isAccelKeyPressed(aEvent) ? 'copy' :
|
||||
sv.isCopyAction(aEvent) ? 'copy' :
|
||||
'move'
|
||||
);
|
||||
}
|
||||
|
@ -451,6 +451,12 @@ var TreeStyleTabUtils = {
|
||||
(aEvent.ctrlKey || (aEvent.keyCode == Ci.nsIDOMKeyEvent.DOM_VK_CONTROL)) ;
|
||||
},
|
||||
|
||||
isCopyAction : function TSTUtils_isCopyAction(aEvent)
|
||||
{
|
||||
return this.isAccelKeyPressed(aEvent) ||
|
||||
(aEvent.dataTransfer && aEvent.dataTransfer.dropEffect == 'copy');
|
||||
},
|
||||
|
||||
isEventFiredOnClosebox : function TSTUtils_isEventFiredOnClosebox(aEvent)
|
||||
{
|
||||
return this.evaluateXPath(
|
||||
|
Loading…
x
Reference in New Issue
Block a user