diff --git a/xpfe/appshell/macbuild/AppShell.mcp b/xpfe/appshell/macbuild/AppShell.mcp index d1d6a9da1c98..047a16de9851 100644 Binary files a/xpfe/appshell/macbuild/AppShell.mcp and b/xpfe/appshell/macbuild/AppShell.mcp differ diff --git a/xpfe/appshell/src/Makefile.in b/xpfe/appshell/src/Makefile.in index bdec98dbad52..4dbb2b3d4c02 100644 --- a/xpfe/appshell/src/Makefile.in +++ b/xpfe/appshell/src/Makefile.in @@ -41,6 +41,7 @@ CPPSRCS = \ nsSessionHistory.cpp \ nsDialogParamBlock.cpp \ nsCommonDialogs.cpp \ + nsAbout.cpp \ $(NULL) EXTRA_DSO_LDOPTS = -L$(DIST)/bin -ljsdom diff --git a/xpfe/appshell/src/makefile.win b/xpfe/appshell/src/makefile.win index 4f9844fdb6f0..133b4857636a 100644 --- a/xpfe/appshell/src/makefile.win +++ b/xpfe/appshell/src/makefile.win @@ -39,6 +39,7 @@ CPPSRCS= \ nsSessionHistory.cpp \ nsDialogParamBlock.cpp \ nsCommonDialogs.cpp \ + nsAbout.cpp \ $(NULL) CPP_OBJS= \ @@ -57,6 +58,7 @@ CPP_OBJS= \ .\$(OBJDIR)\nsSessionHistory.obj \ .\$(OBJDIR)\nsDialogParamBlock.obj \ .\$(OBJDIR)\nsCommonDialogs.obj \ + .\$(OBJDIR)\nsAbout.obj \ $(NULL) LINCS=-I$(PUBLIC)\raptor \ diff --git a/xpfe/appshell/src/nsAppShellFactory.cpp b/xpfe/appshell/src/nsAppShellFactory.cpp index f70365f8a3ff..3632c6d045d9 100644 --- a/xpfe/appshell/src/nsAppShellFactory.cpp +++ b/xpfe/appshell/src/nsAppShellFactory.cpp @@ -29,6 +29,8 @@ #include "rdf.h" #include "nsICommonDialogs.h" #include "nsIDialogParamBlock.h" +#include "nsAbout.h" +#include "nsIGenericFactory.h" /* extern the factory entry points for each component... */ nsresult NS_NewAppShellServiceFactory(nsIFactory** aFactory); nsresult NS_NewXPConnectFactoryFactory(nsIFactory** aResult); @@ -48,6 +50,7 @@ static NS_DEFINE_CID(kSessionHistoryCID, NS_SESSION_HISTORY_CID); static NS_DEFINE_CID( kCommonDialogsCID, NS_CommonDialog_CID ); static NS_DEFINE_CID( kDialogParamBlockCID, NS_DialogParamBlock_CID ); +static NS_DEFINE_CID( kAboutModuleCID, NS_ABOUT_CID); /* * Global entry point to register all components in the registry... */ @@ -68,6 +71,8 @@ NSRegisterSelf(nsISupports* serviceMgr, const char *path) path, PR_TRUE, PR_TRUE); nsComponentManager::RegisterComponent(kCommonDialogsCID, NULL, "component://netscape/appshell/commonDialogs", path, PR_TRUE, PR_TRUE); nsComponentManager::RegisterComponent(kDialogParamBlockCID, NULL, NULL, path, PR_TRUE, PR_TRUE); + + nsComponentManager::RegisterComponent(kAboutModuleCID, "about:", NS_ABOUT_MODULE_PROGID_PREFIX, path, PR_TRUE, PR_TRUE); return NS_OK; } @@ -87,7 +92,7 @@ NSUnregisterSelf(nsISupports* serviceMgr, const char *path) nsComponentManager::UnregisterComponent(kSessionHistoryCID, path); nsComponentManager::UnregisterComponent(kCommonDialogsCID, path); nsComponentManager::UnregisterComponent(kDialogParamBlockCID, path); - + nsComponentManager::UnregisterComponent(kAboutModuleCID, path); return NS_OK; } @@ -153,6 +158,12 @@ NSGetFactory(nsISupports* serviceMgr, { rv = NS_NewDialogParamBlockFactory( aFactory ); } + else if ( aClass.Equals(kAboutModuleCID ) ) + { + nsIGenericFactory* fact; + rv = NS_NewGenericFactory(&fact, nsAbout::Create); + *aFactory = fact; + } return rv; } diff --git a/xpfe/bootstrap/nsSetupRegistry.cpp b/xpfe/bootstrap/nsSetupRegistry.cpp index 1a5cce6b2dcd..d316ae21f399 100644 --- a/xpfe/bootstrap/nsSetupRegistry.cpp +++ b/xpfe/bootstrap/nsSetupRegistry.cpp @@ -40,7 +40,7 @@ #include "nsIWindowMediator.h" #include "nsICommonDialogs.h" #include "nsIDialogParamBlock.h" - +#include "nsAbout.h" static NS_DEFINE_CID(kAppCoresManagerCID, NS_APPCORESMANAGER_CID); static NS_DEFINE_CID(kToolkitCoreCID, NS_TOOLKITCORE_CID); static NS_DEFINE_CID(kDOMPropsCoreCID, NS_DOMPROPSCORE_CID); @@ -84,6 +84,7 @@ static NS_DEFINE_CID(kNetSupportDialogCID, NS_NETSUPPORTDIALOG_CID); static NS_DEFINE_CID(kProtocolHelperCID, NS_PROTOCOL_HELPER_CID); static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID); static NS_DEFINE_CID( kDialogParamBlockCID, NS_DialogParamBlock_CID ); +static NS_DEFINE_CID( kAboutModuleCID, NS_ABOUT_CID); nsresult NS_AutoregisterComponents() { nsresult rv = nsComponentManager::AutoRegister(nsIComponentManager::NS_Startup, @@ -127,7 +128,7 @@ NS_SetupRegistry_1() nsComponentManager::RegisterComponentLib(kSessionHistoryCID, NULL, NULL, APPSHELL_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponentLib(kCommonDialogsCID, NULL, "component://netscape/appshell/commonDialogs", APPSHELL_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponentLib(kDialogParamBlockCID, NULL, NULL, APPSHELL_DLL, PR_FALSE, PR_FALSE); - + nsComponentManager::RegisterComponentLib(kAboutModuleCID, "about:", NS_ABOUT_MODULE_PROGID_PREFIX, APPSHELL_DLL, PR_FALSE, PR_FALSE); // APPCORES_DLL nsComponentManager::RegisterComponentLib(kAppCoresManagerCID, NULL, NULL, APPCORES_DLL, PR_FALSE, PR_FALSE); nsComponentManager::RegisterComponentLib(kToolkitCoreCID, NULL, NULL, APPCORES_DLL, PR_FALSE, PR_FALSE); diff --git a/xpfe/global/resources/content/MANIFEST b/xpfe/global/resources/content/MANIFEST index 7a5402ae1d7b..64e9bbed54e5 100644 --- a/xpfe/global/resources/content/MANIFEST +++ b/xpfe/global/resources/content/MANIFEST @@ -8,3 +8,4 @@ dialogOverlay.js commonDialog.xul commonDialog.js strres.js +about.html \ No newline at end of file diff --git a/xpfe/global/resources/content/Makefile.in b/xpfe/global/resources/content/Makefile.in index 90c4d7fcfb26..eba927301cc2 100644 --- a/xpfe/global/resources/content/Makefile.in +++ b/xpfe/global/resources/content/Makefile.in @@ -35,6 +35,7 @@ EXPORT_RESOURCE_CONTENT = \ $(srcdir)/commonDialog.xul \ $(srcdir)/commonDialog.js \ $(srcdir)/strres.js \ + $(srcdir)/about.html \ $(NULL) install:: diff --git a/xpfe/global/resources/content/makefile.win b/xpfe/global/resources/content/makefile.win index 74f047100109..104c7b9f7e42 100644 --- a/xpfe/global/resources/content/makefile.win +++ b/xpfe/global/resources/content/makefile.win @@ -33,6 +33,7 @@ install:: $(MAKE_INSTALL) commonDialog.xul $(DISTBROWSER) $(MAKE_INSTALL) commonDialog.js $(DISTBROWSER) $(MAKE_INSTALL) strres.js $(DISTBROWSER) + $(MAKE_INSTALL) about.html $(DISTBROWSER) clobber:: rm -f $(DIST)\bin\chrome\global\content\default\*.*