From 672ebfc5d0e7285bfaaec8785d858149e2d8a1ee Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Mon, 24 Jul 2006 18:17:47 +0000 Subject: [PATCH] Backing my last checkin out, since the tree is closed --- browser/components/search/nsSearchService.js | 24 ++++--------------- .../en-US/chrome/browser/search.properties | 2 -- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/browser/components/search/nsSearchService.js b/browser/components/search/nsSearchService.js index 1b673244264..7a1620aa2af 100755 --- a/browser/components/search/nsSearchService.js +++ b/browser/components/search/nsSearchService.js @@ -1124,7 +1124,7 @@ Engine.prototype = { * Handle an error during the load of an engine by prompting the user to * notify him that the load failed. */ - function onError(aErrorString, aTitleString) { + function onError() { if (aEngine._engineToUpdate) { // We're in an update, so just fail quietly LOG("updating " + aEngine._engineToUpdate.name + " failed"); @@ -1132,15 +1132,11 @@ Engine.prototype = { } var sbs = Cc["@mozilla.org/intl/stringbundle;1"]. getService(Ci.nsIStringBundleService); - + var searchBundle = sbs.createBundle(SEARCH_BUNDLE); var brandBundle = sbs.createBundle(BRAND_BUNDLE); var brandName = brandBundle.GetStringFromName("brandShortName"); - - var searchBundle = sbs.createBundle(SEARCH_BUNDLE); - var msgStringName = aErrorString || "error_loading_engine_msg2"; - var titleStringName = aTitleString || "error_loading_engine_title"; - var title = searchBundle.GetStringFromName(titleStringName); - var text = searchBundle.formatStringFromName(msgStringName, + var title = searchBundle.GetStringFromName("error_loading_engine_title"); + var text = searchBundle.formatStringFromName("error_loading_engine_msg2", [brandName, aEngine._location], 2); @@ -1196,18 +1192,6 @@ Engine.prototype = { return; } - // Check to see if this is a duplicate engine. If we're confirming the - // engine load, then we display a "this is a duplicate engine" prompt, - // otherwise we fail silently. - var ss = Cc["@mozilla.org/browser/search-service;1"]. - getService(Ci.nsIBrowserSearchService); - if (ss.getEngineByName(aEngine.name)) { - if (aEngine._confirm) - onError("error_duplicate_engine_msg", "error_invalid_engine_title"); - LOG("_onLoad: duplicate engine found, bailing"); - return; - } - // If requested, confirm the addition now that we have the title. if (aEngine._confirm) { var confirmation = aEngine._confirmAddEngine(); diff --git a/browser/locales/en-US/chrome/browser/search.properties b/browser/locales/en-US/chrome/browser/search.properties index aa3c73a4d99..4dee9a38b58 100755 --- a/browser/locales/en-US/chrome/browser/search.properties +++ b/browser/locales/en-US/chrome/browser/search.properties @@ -14,8 +14,6 @@ addEngineAddButtonLabel=Add error_loading_engine_title=Download Error # LOCALIZATION NOTE (error_loading_engine_msg2): %1$S = brandShortName, %2$S = location error_loading_engine_msg2=%S could not download the search plugin from:\n%S -error_duplicate_engine_msg=%S could not install the search plugin from "%S" because an engine with the same name already exists. - error_invalid_engine_title=Install Error # LOCALIZATION NOTE (error_invalid_engine_msg): %S = brandShortName error_invalid_engine_msg=This search engine isn't supported by %S and can't be installed.