Use standards compliant RDF format. Bug 41225. r=pavlov

This commit is contained in:
slamm%netscape.com 2007-09-25 00:37:44 +00:00
Родитель a77155fc9d
Коммит 8a0040cf00
1 изменённых файлов: 13 добавлений и 7 удалений

Просмотреть файл

@ -99,13 +99,19 @@ function (aTitle, aContentURL, aCustomizeURL)
throw Components.results.NS_ERROR_NOT_INITIALIZED;
}
/* Create a "container" wrapper around the
* "urn:sidebar:current-panel-list" object. This makes it easier
* to manipulate the RDF:Seq correctly. */
var container =
Components.classes[CONTAINER_PROGID].createInstance(nsIRDFContainer);
container.Init(this.datasource, this.rdf.GetResource(this.resource));
// Create a "container" wrapper around the current panels to
// manipulate the RDF:Seq more easily.
var panel_list = this.datasource.GetTarget(this.rdf.GetResource(this.resource), this.rdf.GetResource(nsSidebar.prototype.nc+"panel-list"), true);
if (panel_list) {
panel_list.QueryInterface(Components.interfaces.nsIRDFResource);
} else {
// Datasource is busted. Start over.
debug("Sidebar datasource is busted\n");
}
var container = Components.classes[CONTAINER_PROGID].createInstance(nsIRDFContainer);
container.Init(this.datasource, panel_list);
/* Create a resource for the new panel and add it to the list */
var panel_resource =
this.rdf.GetResource("urn:sidebar:3rdparty-panel:" + aContentURL);