diff --git a/suite/browser/src/nsInternetSearchService.cpp b/suite/browser/src/nsInternetSearchService.cpp index f8d764fd38f..bd29980feca 100755 --- a/suite/browser/src/nsInternetSearchService.cpp +++ b/suite/browser/src/nsInternetSearchService.cpp @@ -229,6 +229,7 @@ private: static nsIRDFResource *kNC_Child; static nsIRDFResource *kNC_Data; static nsIRDFResource *kNC_Name; + static nsIRDFResource *kNC_Description; static nsIRDFResource *kNC_URL; static nsIRDFResource *kRDF_InstanceOf; static nsIRDFResource *kRDF_type; @@ -305,6 +306,7 @@ nsIRDFResource *InternetSearchDataSource::kNC_Ref; nsIRDFResource *InternetSearchDataSource::kNC_Child; nsIRDFResource *InternetSearchDataSource::kNC_Data; nsIRDFResource *InternetSearchDataSource::kNC_Name; +nsIRDFResource *InternetSearchDataSource::kNC_Description; nsIRDFResource *InternetSearchDataSource::kNC_URL; nsIRDFResource *InternetSearchDataSource::kRDF_InstanceOf; nsIRDFResource *InternetSearchDataSource::kRDF_type; @@ -346,6 +348,7 @@ InternetSearchDataSource::InternetSearchDataSource(void) gRDFService->GetResource(NC_NAMESPACE_URI "child", &kNC_Child); gRDFService->GetResource(NC_NAMESPACE_URI "data", &kNC_Data); gRDFService->GetResource(NC_NAMESPACE_URI "Name", &kNC_Name); + gRDFService->GetResource(NC_NAMESPACE_URI "Description", &kNC_Description); gRDFService->GetResource(NC_NAMESPACE_URI "URL", &kNC_URL); gRDFService->GetResource(RDF_NAMESPACE_URI "instanceOf", &kRDF_InstanceOf); gRDFService->GetResource(RDF_NAMESPACE_URI "type", &kRDF_type); @@ -375,6 +378,7 @@ InternetSearchDataSource::~InternetSearchDataSource (void) NS_IF_RELEASE(kNC_Child); NS_IF_RELEASE(kNC_Data); NS_IF_RELEASE(kNC_Name); + NS_IF_RELEASE(kNC_Description); NS_IF_RELEASE(kNC_URL); NS_IF_RELEASE(kRDF_InstanceOf); NS_IF_RELEASE(kRDF_type); @@ -1147,7 +1151,14 @@ InternetSearchDataSource::FindInternetSearchResults(const char *url) nsAutoString action; if (NS_FAILED(rv = GetData(data, "search", "action", action))) continue; + if (shortURL.EqualsIgnoreCase(action)) + { + foundEngine = PR_TRUE; + break; + } + // extension for engines which can have multiple "actions" + if (NS_FAILED(rv = GetData(data, "browser", "alsomatch", action))) continue; if (shortURL.EqualsIgnoreCase(action)) { foundEngine = PR_TRUE; @@ -1906,6 +1917,18 @@ InternetSearchDataSource::GetSearchEngineList(nsFileSpec nativeDir, PRBool check mInner->Assert(searchRes, kNC_Name, nameLiteral, PR_TRUE); } } + + // save description of search engine (if specified) + nsAutoString descValue; + if (NS_SUCCEEDED(rv = GetData(data, "search", "description", descValue))) + { + nsCOMPtr descLiteral; + if (NS_SUCCEEDED(rv = gRDFService->GetLiteral(descValue.GetUnicode(), + getter_AddRefs(descLiteral)))) + { + mInner->Assert(searchRes, kNC_Description, descLiteral, PR_TRUE); + } + } // save icon url (if we have one) if (iconURL.Length() > 0) diff --git a/xpfe/components/search/datasets/Netscape_Open_Directory.src b/xpfe/components/search/datasets/Netscape_Open_Directory.src index a41d3e9887d..e7fb49e49fa 100755 --- a/xpfe/components/search/datasets/Netscape_Open_Directory.src +++ b/xpfe/components/search/datasets/Netscape_Open_Directory.src @@ -18,3 +18,7 @@ bannerEnd="" > + + diff --git a/xpfe/components/search/resources/internet.xul b/xpfe/components/search/resources/internet.xul index 9efc7218ec7..ef0428455e4 100644 --- a/xpfe/components/search/resources/internet.xul +++ b/xpfe/components/search/resources/internet.xul @@ -50,6 +50,7 @@ +