Bug 444735, move search service to toolkit, r=gavin

--HG--
rename : browser/components/search/nsIBrowserSearchService.idl => toolkit/components/search/nsIBrowserSearchService.idl
rename : browser/components/search/nsSearchService.js => toolkit/components/search/nsSearchService.js
rename : browser/components/search/nsSearchSuggestions.js => toolkit/components/search/nsSearchSuggestions.js
This commit is contained in:
Neil Deakin 2008-09-13 17:01:14 -04:00
parent 515013b85e
commit 01d18dd2de
12 changed files with 88 additions and 34 deletions

View File

@ -47,18 +47,4 @@ ifdef ENABLE_TESTS
DIRS = test
endif
MODULE = browsersearch
XPIDL_MODULE = browsersearch
XPIDLSRCS = nsIBrowserSearchService.idl
EXTRA_PP_COMPONENTS = nsSearchService.js \
nsSearchSuggestions.js
ifneq (,$(BUILD_OFFICIAL)$(MOZILLA_OFFICIAL))
DEFINES += -DOFFICIAL_BUILD=1
endif
DEFINES += -DMOZ_DISTRIBUTION_ID=$(MOZ_DISTRIBUTION_ID)
include $(topsrcdir)/config/rules.mk

View File

@ -152,7 +152,7 @@ function (engineURL, iconURL)
debug(ex);
Components.utils.reportError("Invalid argument passed to window.sidebar.addSearchEngine: " + ex);
var searchBundle = srGetStrBundle("chrome://browser/locale/search.properties");
var searchBundle = srGetStrBundle("chrome://global/locale/search/search.properties");
var brandBundle = srGetStrBundle("chrome://branding/locale/brand.properties");
var brandName = brandBundle.GetStringFromName("brandShortName");
var title = searchBundle.GetStringFromName("error_invalid_engine_title");

View File

@ -66,7 +66,6 @@ bin/components/autocomplete.xpt
bin/components/autoconfig.xpt
bin/components/browsercompsbase.xpt
bin/components/browserplaces.xpt
bin/components/browsersearch.xpt
bin/components/browser-feeds.xpt
bin/components/caps.xpt
bin/components/chardet.xpt
@ -167,6 +166,7 @@ bin/components/spellchecker.xpt
bin/components/storage.xpt
bin/components/profile.xpt
bin/components/toolkitprofile.xpt
bin/components/toolkitsearch.xpt
bin/components/txtsvc.xpt
bin/components/txmgr.xpt
bin/components/uconv.xpt

View File

@ -73,7 +73,6 @@ bin\components\autocomplete.xpt
bin\components\autoconfig.xpt
bin\components\browsercompsbase.xpt
bin\components\browserplaces.xpt
bin\components\browsersearch.xpt
bin\components\browser-feeds.xpt
bin\components\caps.xpt
bin\components\chardet.xpt
@ -171,6 +170,7 @@ bin\components\saxparser.xpt
bin\components\shistory.xpt
bin\components\storage.xpt
bin\components\toolkitprofile.xpt
bin\components\toolkitsearch.xpt
bin\components\txtsvc.xpt
bin\components\txmgr.xpt
#ifdef MOZ_USE_NATIVE_UCONV

View File

@ -6,20 +6,5 @@ cmd_clearHistory_accesskey=C
cmd_showSuggestions=Show Suggestions
cmd_showSuggestions_accesskey=S
addEngineConfirmTitle=Add Search Engine
addEngineConfirmation=Add "%S" to the list of engines available in the search bar?\n\nFrom: %S
addEngineUseNowText=Start &using it right away
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.
cmd_addFoundEngine=Add "%S"
suggestion_label=Suggestions

View File

@ -89,6 +89,12 @@ ifdef MOZ_VIEW_SOURCE
DIRS += viewsource
endif
ifndef MOZ_SUITE
ifndef MOZ_THUNDERBIRD
DIRS += search
endif
endif
ifdef MOZ_THUNDERBIRD
DIRS += autocomplete/public
else

View File

@ -0,0 +1,60 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is the Browser Search Service.
#
# The Initial Developer of the Original Code is
# Google Inc.
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Ben Goodger <beng@google.com> (Original author)
# Gavin Sharp <gavin@gavinsharp.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK ***** */
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = toolkitsearch
XPIDL_MODULE = toolkitsearch
XPIDLSRCS = nsIBrowserSearchService.idl
EXTRA_PP_COMPONENTS = nsSearchService.js \
nsSearchSuggestions.js
ifneq (,$(BUILD_OFFICIAL)$(MOZILLA_OFFICIAL))
DEFINES += -DOFFICIAL_BUILD=1
endif
DEFINES += -DMOZ_DISTRIBUTION_ID=$(MOZ_DISTRIBUTION_ID)
include $(topsrcdir)/config/rules.mk

View File

@ -102,7 +102,7 @@ const MAX_ICON_SIZE = 10000;
// match previous nsInternetSearchService behavior.
const DEFAULT_QUERY_CHARSET = "ISO-8859-1";
const SEARCH_BUNDLE = "chrome://browser/locale/search.properties";
const SEARCH_BUNDLE = "chrome://global/locale/search/search.properties";
const BRAND_BUNDLE = "chrome://branding/locale/brand.properties";
const OPENSEARCH_NS_10 = "http://a9.com/-/spec/opensearch/1.0/";

View File

@ -42,7 +42,7 @@ const SEARCH_RESPONSE_SUGGESTION_JSON = "application/x-suggestions+json";
const BROWSER_SUGGEST_PREF = "browser.search.suggest.enabled";
const XPCOM_SHUTDOWN_TOPIC = "xpcom-shutdown";
const NS_PREFBRANCH_PREFCHANGE_TOPIC_ID = "nsPref:changed";
const SEARCH_BUNDLE = "chrome://browser/locale/search.properties";
const SEARCH_BUNDLE = "chrome://global/locale/search/search.properties";
const Cc = Components.classes;
const Ci = Components.interfaces;

View File

@ -0,0 +1,16 @@
addEngineConfirmTitle=Add Search Engine
addEngineConfirmation=Add "%S" to the list of engines available in the search bar?\n\nFrom: %S
addEngineUseNowText=Start &using it right away
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.
suggestion_label=Suggestions

View File

@ -116,3 +116,4 @@
#endif
% locale places @AB_CD@ %locale/@AB_CD@/places/
locale/@AB_CD@/places/places.properties (%chrome/places/places.properties)
locale/@AB_CD@/global/search/search.properties (%chrome/search/search.properties)