зеркало из https://github.com/mozilla/pjs.git
Use standards compliant RDF format. Bug 41225. r=pavlov
This commit is contained in:
Родитель
a77155fc9d
Коммит
8a0040cf00
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче