From 83ae6897f308aa874edb77bcda342ecae0270b71 Mon Sep 17 00:00:00 2001 From: "rjc%netscape.com" Date: Mon, 8 May 2000 23:43:01 +0000 Subject: [PATCH] Part of fix for bug # 36037: drag&drop change. git-svn-id: svn://10.0.0.236/trunk@68747 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mailnews/addrbook/resources/content/abDragDrop.js | 2 +- mozilla/mailnews/base/resources/content/messengerdnd.js | 2 +- mozilla/mailnews/import/resources/content/fieldMapImport.js | 2 +- mozilla/widget/src/gtk/nsDragService.cpp | 3 ++- mozilla/widget/src/gtk/nsDragService.h | 3 ++- mozilla/widget/src/os2/nsDragService.cpp | 3 ++- mozilla/widget/src/os2/nsDragService.h | 3 ++- mozilla/widget/src/photon/nsDragService.cpp | 3 ++- mozilla/widget/src/photon/nsDragService.h | 2 +- mozilla/widget/src/windows/nsDragService.cpp | 2 +- mozilla/widget/src/windows/nsDragService.h | 2 +- 11 files changed, 16 insertions(+), 11 deletions(-) diff --git a/mozilla/mailnews/addrbook/resources/content/abDragDrop.js b/mozilla/mailnews/addrbook/resources/content/abDragDrop.js index 29e54483530..94dfa58d671 100644 --- a/mozilla/mailnews/addrbook/resources/content/abDragDrop.js +++ b/mozilla/mailnews/addrbook/resources/content/abDragDrop.js @@ -127,7 +127,7 @@ function BeginDragResultTree(event) } var nsIDragService = Components.interfaces.nsIDragService; - dragService.invokeDragSession ( transArray, null, nsIDragService.DRAGDROP_ACTION_COPY + + dragService.invokeDragSession ( event.target, transArray, null, nsIDragService.DRAGDROP_ACTION_COPY + nsIDragService.DRAGDROP_ACTION_MOVE ); dragStarted = true; diff --git a/mozilla/mailnews/base/resources/content/messengerdnd.js b/mozilla/mailnews/base/resources/content/messengerdnd.js index b1150c7a69c..58a3888af47 100644 --- a/mozilla/mailnews/base/resources/content/messengerdnd.js +++ b/mozilla/mailnews/base/resources/content/messengerdnd.js @@ -133,7 +133,7 @@ function BeginDragThreadTree(event) } var nsIDragService = Components.interfaces.nsIDragService; - dragService.invokeDragSession ( transArray, null, nsIDragService.DRAGDROP_ACTION_COPY + + dragService.invokeDragSession ( event.target, transArray, null, nsIDragService.DRAGDROP_ACTION_COPY + nsIDragService.DRAGDROP_ACTION_MOVE ); dragStarted = true; diff --git a/mozilla/mailnews/import/resources/content/fieldMapImport.js b/mozilla/mailnews/import/resources/content/fieldMapImport.js index 55b31d20dc8..45fa883cd0d 100644 --- a/mozilla/mailnews/import/resources/content/fieldMapImport.js +++ b/mozilla/mailnews/import/resources/content/fieldMapImport.js @@ -196,7 +196,7 @@ function BeginDrag( event) var nsIDragService = Components.interfaces.nsIDragService; top.dragStart = true; - dragService.invokeDragSession ( transArray, null, nsIDragService.DRAGDROP_ACTION_MOVE); + dragService.invokeDragSession ( event.target, transArray, null, nsIDragService.DRAGDROP_ACTION_MOVE); return( false); // don't propagate the event if a drag has begun diff --git a/mozilla/widget/src/gtk/nsDragService.cpp b/mozilla/widget/src/gtk/nsDragService.cpp index 60d48c85d6e..4a75fe2e652 100644 --- a/mozilla/widget/src/gtk/nsDragService.cpp +++ b/mozilla/widget/src/gtk/nsDragService.cpp @@ -82,7 +82,8 @@ nsDragService::~nsDragService() } // nsIDragService -NS_IMETHODIMP nsDragService::InvokeDragSession (nsISupportsArray * anArrayTransferables, +NS_IMETHODIMP nsDragService::InvokeDragSession (nsIDOMNode *aDOMNode, + nsISupportsArray * anArrayTransferables, nsIScriptableRegion * aRegion, PRUint32 aActionType) { diff --git a/mozilla/widget/src/gtk/nsDragService.h b/mozilla/widget/src/gtk/nsDragService.h index 8b34cb4e267..5f5296d0f58 100644 --- a/mozilla/widget/src/gtk/nsDragService.h +++ b/mozilla/widget/src/gtk/nsDragService.h @@ -42,7 +42,8 @@ public: NS_DECL_ISUPPORTS_INHERITED // nsIDragService - NS_IMETHOD InvokeDragSession (nsISupportsArray * anArrayTransferables, + NS_IMETHOD InvokeDragSession (nsIDOMNode *aDOMNode, + nsISupportsArray * anArrayTransferables, nsIScriptableRegion * aRegion, PRUint32 aActionType); NS_IMETHOD StartDragSession(); diff --git a/mozilla/widget/src/os2/nsDragService.cpp b/mozilla/widget/src/os2/nsDragService.cpp index 7bcfc07365f..b27b7bc0a4b 100644 --- a/mozilla/widget/src/os2/nsDragService.cpp +++ b/mozilla/widget/src/os2/nsDragService.cpp @@ -106,7 +106,8 @@ nsDragService::~nsDragService() WinDestroyWindow( mDragWnd); } -nsresult nsDragService::InvokeDragSession( nsISupportsArray *aTransArray, +nsresult nsDragService::InvokeDragSession( nsIDOMNode *aDOMNode, + nsISupportsArray *aTransArray, nsIRegion *aRegion, PRUint32 aActionType) { diff --git a/mozilla/widget/src/os2/nsDragService.h b/mozilla/widget/src/os2/nsDragService.h index 2dd9375f6f8..fd08345a5f3 100644 --- a/mozilla/widget/src/os2/nsDragService.h +++ b/mozilla/widget/src/os2/nsDragService.h @@ -42,7 +42,8 @@ class nsDragService : public nsBaseDragService virtual ~nsDragService(); // nsIDragService - NS_IMETHOD InvokeDragSession( nsISupportsArray *anArrayTransferables, + NS_IMETHOD InvokeDragSession( nsIDOMNode *aDOMNode, + nsISupportsArray *anArrayTransferables, nsIRegion *aRegion, PRUint32 aActionType); // nsIDragSession diff --git a/mozilla/widget/src/photon/nsDragService.cpp b/mozilla/widget/src/photon/nsDragService.cpp index dda415628fb..00b7d18523c 100644 --- a/mozilla/widget/src/photon/nsDragService.cpp +++ b/mozilla/widget/src/photon/nsDragService.cpp @@ -97,7 +97,8 @@ NS_IMETHODIMP nsDragService::EndDragSession() //------------------------------------------------------------------------- -NS_IMETHODIMP nsDragService::InvokeDragSession (nsISupportsArray *aTransferableArray, +NS_IMETHODIMP nsDragService::InvokeDragSession (nsIDOMNode *aDOMNode, + nsISupportsArray *aTransferableArray, nsIScriptableRegion *aRegion, PRUint32 aActionType) { diff --git a/mozilla/widget/src/photon/nsDragService.h b/mozilla/widget/src/photon/nsDragService.h index fa0e097925a..89f575cf358 100644 --- a/mozilla/widget/src/photon/nsDragService.h +++ b/mozilla/widget/src/photon/nsDragService.h @@ -41,7 +41,7 @@ public: NS_DECL_ISUPPORTS_INHERITED // nsIDragService - NS_IMETHOD InvokeDragSession (nsISupportsArray * anArrayTransferables, + NS_IMETHOD InvokeDragSession (nsIDOMNode *aDOMNode, nsISupportsArray * anArrayTransferables, nsIScriptableRegion * aRegion, PRUint32 aActionType); NS_IMETHOD GetCurrentSession (nsIDragSession ** aSession); diff --git a/mozilla/widget/src/windows/nsDragService.cpp b/mozilla/widget/src/windows/nsDragService.cpp index 3759b7bece8..bc95315768a 100644 --- a/mozilla/widget/src/windows/nsDragService.cpp +++ b/mozilla/widget/src/windows/nsDragService.cpp @@ -62,7 +62,7 @@ nsDragService::~nsDragService() //------------------------------------------------------------------------- -NS_IMETHODIMP nsDragService::InvokeDragSession (nsISupportsArray * anArrayTransferables, nsIScriptableRegion * aRegion, PRUint32 aActionType) +NS_IMETHODIMP nsDragService::InvokeDragSession (nsIDOMNode *aDOMNode, nsISupportsArray * anArrayTransferables, nsIScriptableRegion * aRegion, PRUint32 aActionType) { nsresult rv; PRUint32 cnt; diff --git a/mozilla/widget/src/windows/nsDragService.h b/mozilla/widget/src/windows/nsDragService.h index bcf407e58a2..f5fc43e3a4b 100644 --- a/mozilla/widget/src/windows/nsDragService.h +++ b/mozilla/widget/src/windows/nsDragService.h @@ -41,7 +41,7 @@ public: virtual ~nsDragService(); // nsIDragService - NS_IMETHOD InvokeDragSession (nsISupportsArray * anArrayTransferables, nsIScriptableRegion * aRegion, PRUint32 aActionType); + NS_IMETHOD InvokeDragSession (nsIDOMNode *aDOMNode, nsISupportsArray * anArrayTransferables, nsIScriptableRegion * aRegion, PRUint32 aActionType); NS_IMETHOD GetCurrentSession (nsIDragSession ** aSession); // nsIDragSession