mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
bug80876 Drag and Drop doesn't work in the address book,r=naving,sr=sspitzer
This commit is contained in:
parent
d0b42c2fd5
commit
d7bdf138d3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user