Fix bug # 34557: choosing a new search category needs to update the list of engines. Review: waterson Approval: leaf

This commit is contained in:
rjc%netscape.com 2000-04-05 23:16:22 +00:00
Родитель 8447f4f8fd
Коммит 156f926ff9
1 изменённых файлов: 16 добавлений и 8 удалений

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

@ -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);
}
}
}