зеркало из https://github.com/mozilla/pjs.git
Fix bug # 34557: choosing a new search category needs to update the list of engines. Review: waterson Approval: leaf
This commit is contained in:
Родитель
8447f4f8fd
Коммит
156f926ff9
|
@ -111,21 +111,29 @@ function SearchPanelStartup()
|
|||
tree.database.AddObserver(RDF_observer);
|
||||
}
|
||||
}
|
||||
var categoryList = document.getElementById("categoryList");
|
||||
if (categoryList)
|
||||
|
||||
var internetSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService();
|
||||
if (internetSearch) internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIInternetSearchService);
|
||||
if (internetSearch)
|
||||
{
|
||||
var internetSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService();
|
||||
if (internetSearch) internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIInternetSearchService);
|
||||
if (internetSearch)
|
||||
var catDS = internetSearch.GetCategoryDataSource();
|
||||
if (catDS) catDS = catDS.QueryInterface(Components.interfaces.nsIRDFDataSource);
|
||||
if (catDS)
|
||||
{
|
||||
var catDS = internetSearch.GetCategoryDataSource();
|
||||
if (catDS) catDS = catDS.QueryInterface(Components.interfaces.nsIRDFDataSource);
|
||||
if (catDS)
|
||||
var categoryList = document.getElementById("categoryList");
|
||||
if (categoryList)
|
||||
{
|
||||
categoryList.database.AddDataSource(catDS);
|
||||
var ref = categoryList.getAttribute("ref");
|
||||
if (ref) categoryList.setAttribute("ref", ref);
|
||||
}
|
||||
var engineTree = document.getElementById("searchengines");
|
||||
if (engineTree)
|
||||
{
|
||||
engineTree.database.AddDataSource(catDS);
|
||||
var ref = engineTree.getAttribute("ref");
|
||||
if (ref) engineTree.setAttribute("ref", ref);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче