From d7bdf138d37d791cf5cdf9361df787626730a965 Mon Sep 17 00:00:00 2001 From: "chuang%netscape.com" Date: Thu, 17 May 2001 03:28:44 +0000 Subject: [PATCH] bug80876 Drag and Drop doesn't work in the address book,r=naving,sr=sspitzer --- .../addrbook/resources/content/abDragDrop.js | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/mailnews/addrbook/resources/content/abDragDrop.js b/mailnews/addrbook/resources/content/abDragDrop.js index a21ef3392efb..a55ad35e0dd8 100644 --- a/mailnews/addrbook/resources/content/abDragDrop.js +++ b/mailnews/addrbook/resources/content/abDragDrop.js @@ -23,7 +23,7 @@ function debugDump(msg) { // uncomment for noise - dump(msg+"\n"); + // dump(msg+"\n"); } function GetDragService() @@ -35,15 +35,6 @@ function GetDragService() return dragService; } -function GetRDFService() -{ - var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(); - if (rdf) - rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService); - - return rdf; -} - function DragOverTree(event) { var validFlavor = false; @@ -88,15 +79,7 @@ function BeginDragResultTree(event) var tree = resultsTree; if ( event.target == tree ) return(true); // continue propagating the event - - var childWithDatabase = tree; - if ( ! childWithDatabase ) - return(false); - var database = childWithDatabase.database; - var rdf = GetRDFService(); - if ((!rdf) || (!database)) { debugDump("CAN'T GET DATABASE\n"); return(false); } - var dragStarted = false; var dragService = GetDragService(); @@ -146,7 +129,7 @@ function DropOnDirectoryTree(event) event.target.localName != "treeitem") return false; - var RDF = GetRDFService(); + var RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService().QueryInterface(Components.interfaces.nsIRDFService); if (!RDF) return(false); var treeRoot = dirTree;