bug80876 Drag and Drop doesn't work in the address book,r=naving,sr=sspitzer

This commit is contained in:
chuang%netscape.com 2001-05-17 03:28:44 +00:00
parent d0b42c2fd5
commit d7bdf138d3

View File

@ -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;
@ -89,14 +80,6 @@ function BeginDragResultTree(event)
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;