зеркало из https://github.com/mozilla/pjs.git
Rest of fix for bug 102004 and bug 102085 - move UI-specific i18n code into xpfe. r=ftang, sr=shaver
This commit is contained in:
Родитель
0bd0232834
Коммит
a77042a8e0
|
@ -33,9 +33,6 @@ REQUIRES = xpcom \
|
|||
uconv \
|
||||
unicharutil \
|
||||
necko \
|
||||
dom \
|
||||
windowwatcher \
|
||||
uriloader \
|
||||
intl \
|
||||
$(NULL)
|
||||
|
||||
|
@ -53,7 +50,6 @@ CPPSRCS = \
|
|||
nsLocale.cpp \
|
||||
nsLocaleService.cpp \
|
||||
nsFontPackageService.cpp \
|
||||
nsFontPackageHandler.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
|
|
|
@ -32,9 +32,6 @@ REQUIRES = xpcom \
|
|||
uconv \
|
||||
unicharutil \
|
||||
necko \
|
||||
dom \
|
||||
windowwatcher \
|
||||
uriloader \
|
||||
intl \
|
||||
$(NULL)
|
||||
LIBRARY_NAME = nslocale_s
|
||||
|
@ -44,7 +41,6 @@ DIRS = windows
|
|||
CPP_OBJS = .\$(OBJDIR)\nsLocale.obj \
|
||||
.\$(OBJDIR)\nsLocaleService.obj \
|
||||
.\$(OBJDIR)\nsFontPackageService.obj \
|
||||
.\$(OBJDIR)\nsFontPackageHandler.obj \
|
||||
.\$(OBJDIR)\nsLanguageAtomService.obj \
|
||||
.\$(OBJDIR)\nsScriptableDateFormat.obj \
|
||||
.\$(OBJDIR)\nsCollation.obj \
|
||||
|
|
|
@ -38,8 +38,7 @@
|
|||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsFontPackageService.h"
|
||||
#include "nsFontPackageHandler.h"
|
||||
|
||||
#include "nsIComponentManager.h"
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS2(nsFontPackageService,
|
||||
nsIFontPackageService,
|
||||
|
@ -77,10 +76,11 @@ NS_IMETHODIMP nsFontPackageService::FontPackageHandled(PRBool aSuccess, PRBool a
|
|||
NS_IMETHODIMP nsFontPackageService::NeedFontPackage(const char *aFontPackID)
|
||||
{
|
||||
if (!mHandler) {
|
||||
nsresult rv;
|
||||
|
||||
// create default handler
|
||||
mHandler = new nsFontPackageHandler;
|
||||
if (!mHandler)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
mHandler = do_CreateInstance("@mozilla.org/locale/default-font-package-handler;1", &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
return mHandler->NeedFontPackage(aFontPackID);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ REQUIRES = xpcom \
|
|||
locale \
|
||||
chardet \
|
||||
necko \
|
||||
rdf \
|
||||
pref \
|
||||
$(NULL)
|
||||
|
||||
|
@ -58,7 +57,6 @@ CPPSRCS = \
|
|||
nsCharsetAliasImp.cpp \
|
||||
nsURLProperties.cpp \
|
||||
nsMappingCache.cpp \
|
||||
nsCharsetMenu.cpp \
|
||||
nsUConvModule.cpp \
|
||||
nsISO88591ToUnicode.cpp \
|
||||
nsCP1252ToUnicode.cpp \
|
||||
|
|
|
@ -27,7 +27,6 @@ REQUIRES = xpcom \
|
|||
locale \
|
||||
chardet \
|
||||
necko \
|
||||
rdf \
|
||||
pref \
|
||||
$(NULL)
|
||||
include <$(DEPTH)/config/config.mak>
|
||||
|
@ -47,7 +46,6 @@ CPPSRCS = \
|
|||
nsUConvModule.cpp \
|
||||
nsMappingCache.cpp \
|
||||
nsURLProperties.cpp \
|
||||
nsCharsetMenu.cpp \
|
||||
nsISO88591ToUnicode.cpp \
|
||||
nsCP1252ToUnicode.cpp \
|
||||
nsMacRomanToUnicode.cpp \
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
#include "nsITextToSubURI.h"
|
||||
#include "nsTextToSubURI.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCharsetMenu.h"
|
||||
#include "rdf.h"
|
||||
#include "nsUConvDll.h"
|
||||
|
||||
|
@ -60,7 +59,6 @@
|
|||
|
||||
static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kCharsetMenuCID, NS_CHARSETMENU_CID);
|
||||
static NS_DEFINE_CID(kTextToSubURICID, NS_TEXTTOSUBURI_CID);
|
||||
|
||||
PRInt32 g_InstanceCount = 0;
|
||||
|
@ -155,17 +153,6 @@ extern "C" NS_EXPORT nsresult NSGetFactory(nsISupports* aServMgr,
|
|||
return res;
|
||||
}
|
||||
|
||||
if (aClass.Equals(kCharsetMenuCID)) {
|
||||
nsIFactory *factory = new nsCharsetMenuFactory();
|
||||
nsresult res = factory->QueryInterface(kIFactoryIID, (void**) aFactory);
|
||||
if (NS_FAILED(res)) {
|
||||
*aFactory = NULL;
|
||||
delete factory;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
if (aClass.Equals(kTextToSubURICID)) {
|
||||
nsIFactory *factory = NEW_TEXTTOSUBURI_FACTORY();
|
||||
nsresult res = factory->QueryInterface(kIFactoryIID, (void**) aFactory);
|
||||
|
@ -193,12 +180,6 @@ extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports* aServMgr, const char *
|
|||
(nsISupports**)&compMgr);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = compMgr->RegisterComponent(kCharsetMenuCID,
|
||||
NS_CHARSETMENU_PID,
|
||||
NS_RDF_DATASOURCE_CONTRACTID_PREFIX NS_CHARSETMENU_PID,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
if(NS_FAILED(rv) && (NS_ERROR_FACTORY_EXISTS != rv)) goto done;
|
||||
|
||||
rv = compMgr->RegisterComponent(kUnicodeDecodeHelperCID,
|
||||
"Unicode Decode Helper",
|
||||
NS_UNICODEDECODEHELPER_CONTRACTID,
|
||||
|
|
|
@ -66,10 +66,6 @@ NS_IMETHODIMP
|
|||
NS_NewCharsetAlias(nsISupports* aOuter, const nsIID& aIID,
|
||||
void** aResult);
|
||||
|
||||
NS_IMETHODIMP
|
||||
NS_NewCharsetMenu(nsISupports* aOuter, const nsIID& aIID,
|
||||
void** aResult);
|
||||
|
||||
NS_IMETHODIMP
|
||||
NS_NewTextToSubURI(nsISupports* aOuter, const nsIID& aIID,
|
||||
void** aResult);
|
||||
|
|
|
@ -48,8 +48,6 @@
|
|||
#include "nsICharsetAlias.h"
|
||||
#include "nsITextToSubURI.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCharsetMenu.h"
|
||||
#include "rdf.h"
|
||||
#include "nsUConvDll.h"
|
||||
#include "nsFileSpec.h"
|
||||
#include "nsIFile.h"
|
||||
|
@ -178,10 +176,6 @@ static nsModuleComponentInfo gComponents[] = {
|
|||
{ "Charset Alias Information", NS_CHARSETALIAS_CID,
|
||||
NS_CHARSETALIAS_CONTRACTID, NS_NewCharsetAlias },
|
||||
|
||||
{ NS_CHARSETMENU_PID, NS_CHARSETMENU_CID,
|
||||
NS_RDF_DATASOURCE_CONTRACTID_PREFIX NS_CHARSETMENU_PID,
|
||||
NS_NewCharsetMenu},
|
||||
|
||||
{ "Text To Sub URI Helper", NS_TEXTTOSUBURI_CID,
|
||||
NS_ITEXTTOSUBURI_CONTRACTID, NS_NewTextToSubURI },
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ REQUIRES = xpcom \
|
|||
necko \
|
||||
timer \
|
||||
intl \
|
||||
locale \
|
||||
mork \
|
||||
widget \
|
||||
dom \
|
||||
|
@ -59,6 +60,7 @@ SHARED_LIBRARY_LIBS = \
|
|||
$(DIST)/lib/libbookmarks_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libdirectory_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libhistory_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libappcompintl_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/librelated_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libsearch_s.$(LIB_SUFFIX) \
|
||||
$(DIST)/lib/libtimebomb_s.$(LIB_SUFFIX) \
|
||||
|
|
|
@ -30,6 +30,7 @@ REQUIRES = xpcom \
|
|||
necko \
|
||||
timer \
|
||||
intl \
|
||||
locale \
|
||||
mork \
|
||||
widget \
|
||||
dom \
|
||||
|
@ -61,6 +62,7 @@ SUB_LIBRARIES= \
|
|||
$(DIST)\lib\bookmarks_s.lib \
|
||||
$(DIST)\lib\directory_s.lib \
|
||||
$(DIST)\lib\history_s.lib \
|
||||
$(DIST)\lib\appcompintl_s.lib \
|
||||
$(DIST)\lib\related_s.lib \
|
||||
$(DIST)\lib\search_s.lib \
|
||||
$(DIST)\lib\timebomb_s.lib \
|
||||
|
|
|
@ -40,12 +40,15 @@
|
|||
#include "nsBookmarksService.h"
|
||||
#include "nsDirectoryViewer.h"
|
||||
#include "nsGlobalHistory.h"
|
||||
#include "rdf.h"
|
||||
#include "nsLocalSearchService.h"
|
||||
#include "nsInternetSearchService.h"
|
||||
#include "nsRelatedLinksHandlerImpl.h"
|
||||
#include "nsTimeBomb.h"
|
||||
#include "nsUrlbarHistory.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsCharsetMenu.h"
|
||||
#include "nsFontPackageHandler.h"
|
||||
#if defined(XP_WIN)
|
||||
#include "nsUrlWidget.h"
|
||||
#include "nsWindowsHooks.h"
|
||||
|
@ -66,6 +69,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(InternetSearchDataSource, Init)
|
|||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(RelatedLinksHandlerImpl, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsTimeBomb)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUrlbarHistory)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontPackageHandler)
|
||||
#if defined(XP_WIN)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsUrlWidget, Init)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsHooks)
|
||||
|
@ -149,6 +153,12 @@ static nsModuleComponentInfo components[] = {
|
|||
NS_URLBARHISTORY_CONTRACTID, nsUrlbarHistoryConstructor },
|
||||
{ "nsUrlbarHistory", NS_URLBARHISTORY_CID,
|
||||
NS_URLBARAUTOCOMPLETE_CONTRACTID, nsUrlbarHistoryConstructor },
|
||||
{ "nsCharsetMenu", NS_CHARSETMENU_CID,
|
||||
NS_RDF_DATASOURCE_CONTRACTID_PREFIX NS_CHARSETMENU_PID,
|
||||
NS_NewCharsetMenu },
|
||||
{ "nsFontPackageHandler", NS_FONTPACKAGEHANDLER_CID,
|
||||
"@mozilla.org/locale/default-font-package-handler;1",
|
||||
nsFontPackageHandlerConstructor },
|
||||
#if defined(XP_WIN)
|
||||
{ NS_IURLWIDGET_CLASSNAME, NS_IURLWIDGET_CID, NS_IURLWIDGET_CONTRACTID,
|
||||
nsUrlWidgetConstructor },
|
||||
|
|
Загрузка…
Ссылка в новой задаче