diff --git a/mozilla/mailnews/base/src/Makefile.in b/mozilla/mailnews/base/src/Makefile.in index f526859cf73..43d80e96642 100644 --- a/mozilla/mailnews/base/src/Makefile.in +++ b/mozilla/mailnews/base/src/Makefile.in @@ -46,6 +46,7 @@ MODULE = msgbase LIBRARY_NAME = msgbase_s META_COMPONENT = mail REQUIRES = xpcom \ + alerts \ xpcom_obsolete \ string \ necko \ diff --git a/mozilla/mailnews/base/src/nsMessengerWinIntegration.cpp b/mozilla/mailnews/base/src/nsMessengerWinIntegration.cpp index 4a661a0c151..787fec0e2fe 100644 --- a/mozilla/mailnews/base/src/nsMessengerWinIntegration.cpp +++ b/mozilla/mailnews/base/src/nsMessengerWinIntegration.cpp @@ -73,6 +73,7 @@ #include "nsISupportsPrimitives.h" #ifdef MOZ_THUNDERBIRD +#include "nsToolkitCompsCID.h" #define PROFILE_COMMANDLINE_ARG " -profile " #else #include "nsIProfile.h" diff --git a/mozilla/mailnews/build/Makefile.in b/mozilla/mailnews/build/Makefile.in index 083aa0c1ba8..c499c9c18bc 100644 --- a/mozilla/mailnews/build/Makefile.in +++ b/mozilla/mailnews/build/Makefile.in @@ -61,6 +61,7 @@ IS_COMPONENT = 1 MODULE_NAME = nsMailModule REQUIRES = xpcom \ + alerts \ xpcom_obsolete \ xpobsolete \ addrbook \ diff --git a/mozilla/toolkit/components/Makefile.in b/mozilla/toolkit/components/Makefile.in index 62037f3818e..465b7d82e04 100644 --- a/mozilla/toolkit/components/Makefile.in +++ b/mozilla/toolkit/components/Makefile.in @@ -42,26 +42,28 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -ifdef MOZ_THUNDERBIRD -DIRS = console filepicker printing viewsource -else ifdef MOZ_STANDALONE_COMPOSER DIRS = console filepicker printing viewsource else -DIRS = \ - autocomplete \ - console \ - cookie \ +DIRS = console \ filepicker \ + printing \ + viewsource \ + $(NULL) + +ifdef MOZ_PHOENIX + +DIRS += \ + autocomplete \ + cookie \ help \ history \ passwordmgr \ - printing \ satchel \ typeaheadfind \ viewconfig \ - viewsource \ $(NULL) +endif ifeq ($(OS_ARCH),WINNT) DIRS += alerts @@ -69,7 +71,6 @@ endif DIRS += downloads -endif endif DIRS += \ diff --git a/mozilla/toolkit/components/alerts/public/nsIAlertsService.idl b/mozilla/toolkit/components/alerts/public/nsIAlertsService.idl index a214159e201..335689d649a 100644 --- a/mozilla/toolkit/components/alerts/public/nsIAlertsService.idl +++ b/mozilla/toolkit/components/alerts/public/nsIAlertsService.idl @@ -40,7 +40,7 @@ #include "nsISupports.idl" #include "nsIObserver.idl" -[scriptable, uuid(F6D34CCE-EAC6-42BF-8F3B-9A8865493F31)] +[scriptable, uuid(647248FD-F925-4e30-93DD-CDE26D7E3A90)] interface nsIAlertsService : nsISupports { /* showAlertNotification: shows an animated alert icon @@ -55,9 +55,9 @@ interface nsIAlertsService : nsISupports alert goes away, or "alertclickcallback" when the text is clicked. Data is aAlertCookie. */ - void showAlertNotification(in string aImageUrl, in wstring aAlertTitle, - in wstring aAlertText, in boolean alertTextClickable, - in wstring aAlertCookie, + void showAlertNotification(in AString aImageUrl, in AString aAlertTitle, + in AString aAlertText, in boolean alertTextClickable, + in AString aAlertCookie, in nsIObserver aAlertListener ); }; diff --git a/mozilla/toolkit/components/alerts/src/nsAlertsService.cpp b/mozilla/toolkit/components/alerts/src/nsAlertsService.cpp index 4064e36c990..36eccd0744b 100644 --- a/mozilla/toolkit/components/alerts/src/nsAlertsService.cpp +++ b/mozilla/toolkit/components/alerts/src/nsAlertsService.cpp @@ -62,9 +62,9 @@ nsAlertsService::nsAlertsService() nsAlertsService::~nsAlertsService() {} -NS_IMETHODIMP nsAlertsService::ShowAlertNotification(const char * aImageUrl, const PRUnichar * aAlertTitle, - const PRUnichar * aAlertText, PRBool aAlertTextClickable, - const PRUnichar * aAlertCookie, +NS_IMETHODIMP nsAlertsService::ShowAlertNotification(const nsAString & aImageUrl, const nsAString & aAlertTitle, + const nsAString & aAlertText, PRBool aAlertTextClickable, + const nsAString & aAlertCookie, nsIObserver * aAlertListener) { nsCOMPtr wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID)); @@ -76,22 +76,22 @@ NS_IMETHODIMP nsAlertsService::ShowAlertNotification(const char * aImageUrl, con NS_ENSURE_SUCCESS(rv, rv); // create scriptable versions of our strings that we can store in our nsISupportsArray.... - nsCOMPtr scriptableImageUrl (do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID)); + nsCOMPtr scriptableImageUrl (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID)); NS_ENSURE_TRUE(scriptableImageUrl, NS_ERROR_FAILURE); - scriptableImageUrl->SetData(nsDependentCString(aImageUrl)); + scriptableImageUrl->SetData(aImageUrl); argsArray->AppendElement(scriptableImageUrl); nsCOMPtr scriptableAlertTitle (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID)); NS_ENSURE_TRUE(scriptableAlertTitle, NS_ERROR_FAILURE); - scriptableAlertTitle->SetData(nsDependentString(aAlertTitle)); + scriptableAlertTitle->SetData(aAlertTitle); argsArray->AppendElement(scriptableAlertTitle); nsCOMPtr scriptableAlertText (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID)); NS_ENSURE_TRUE(scriptableAlertText, NS_ERROR_FAILURE); - scriptableAlertText->SetData(nsDependentString(aAlertText)); + scriptableAlertText->SetData(aAlertText); argsArray->AppendElement(scriptableAlertText); nsCOMPtr scriptableIsClickable (do_CreateInstance(NS_SUPPORTS_PRBOOL_CONTRACTID)); @@ -103,7 +103,7 @@ NS_IMETHODIMP nsAlertsService::ShowAlertNotification(const char * aImageUrl, con nsCOMPtr scriptableAlertCookie (do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID)); NS_ENSURE_TRUE(scriptableAlertCookie, NS_ERROR_FAILURE); - scriptableAlertCookie->SetData(nsDependentString(aAlertCookie)); + scriptableAlertCookie->SetData(aAlertCookie); argsArray->AppendElement(scriptableAlertCookie); if (aAlertListener) diff --git a/mozilla/toolkit/components/build/Makefile.in b/mozilla/toolkit/components/build/Makefile.in index c6044bceee7..954ba65b2b3 100644 --- a/mozilla/toolkit/components/build/Makefile.in +++ b/mozilla/toolkit/components/build/Makefile.in @@ -109,6 +109,10 @@ SHARED_LIBRARY_LIBS = \ ../startup/src/$(LIB_PREFIX)appstartup_s.$(LIB_SUFFIX) \ $(NULL) +ifeq ($(OS_ARCH),WINNT) +SHARED_LIBRARY_LIBS += $(DIST)/lib/$(LIB_PREFIX)alerts_s.$(LIB_SUFFIX) +endif + ifneq (,$(MOZ_PHOENIX)$(MOZ_SUNBIRD)) SHARED_LIBRARY_LIBS += \ $(DIST)/lib/$(LIB_PREFIX)autocomplete_s.$(LIB_SUFFIX) \ @@ -119,10 +123,6 @@ SHARED_LIBRARY_LIBS += \ $(DIST)/lib/$(LIB_PREFIX)fastfind_s.$(LIB_SUFFIX) \ $(NULL) -ifeq ($(OS_ARCH),WINNT) -SHARED_LIBRARY_LIBS += $(DIST)/lib/$(LIB_PREFIX)alerts_s.$(LIB_SUFFIX) -endif - EXTRA_DSO_LIBS = gkgfx endif # MOZ_PHOENIX diff --git a/mozilla/toolkit/components/build/nsModule.cpp b/mozilla/toolkit/components/build/nsModule.cpp index 09301bd4864..14b4741e8b1 100644 --- a/mozilla/toolkit/components/build/nsModule.cpp +++ b/mozilla/toolkit/components/build/nsModule.cpp @@ -39,12 +39,12 @@ #include "nsAppStartup.h" #include "nsUserInfo.h" #include "nsXPFEComponentsCID.h" - -#if defined(MOZ_PHOENIX) || defined(MOZ_SUNBIRD) +#include "nsToolkitCompsCID.h" #ifdef XP_WIN #include "nsAlertsService.h" #endif -#include "nsToolkitCompsCID.h" + +#if defined(MOZ_PHOENIX) || defined(MOZ_SUNBIRD) #include "nsDocShellCID.h" #include "nsAutoCompleteController.h" #include "nsAutoCompleteMdbResult.h" @@ -63,15 +63,16 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsAppStartup, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsUserInfo) -#if defined(MOZ_PHOENIX) || defined(MOZ_SUNBIRD) #ifdef XP_WIN NS_GENERIC_FACTORY_CONSTRUCTOR(nsAlertsService) #endif + +#if defined(MOZ_PHOENIX) || defined(MOZ_SUNBIRD) NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteController) NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteMdbResult) NS_GENERIC_FACTORY_CONSTRUCTOR(nsTypeAheadFind) NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloadProxy) -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDownloadManager, Init) +NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDownloadManager, Init) NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsFormHistory, nsFormHistory::GetInstance) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFormFillController) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGlobalHistory, Init) @@ -103,14 +104,13 @@ static const nsModuleComponentInfo components[] = NS_USERINFO_CID, NS_USERINFO_CONTRACTID, nsUserInfoConstructor }, - -#if defined(MOZ_PHOENIX) || defined(MOZ_SUNBIRD) #ifdef XP_WIN { "Alerts Service", NS_ALERTSSERVICE_CID, NS_ALERTSERVICE_CONTRACTID, nsAlertsServiceConstructor }, #endif +#if defined(MOZ_PHOENIX) || defined(MOZ_SUNBIRD) { "AutoComplete Controller", NS_AUTOCOMPLETECONTROLLER_CID, NS_AUTOCOMPLETECONTROLLER_CONTRACTID, @@ -120,7 +120,7 @@ static const nsModuleComponentInfo components[] = NS_AUTOCOMPLETEMDBRESULT_CID, NS_AUTOCOMPLETEMDBRESULT_CONTRACTID, nsAutoCompleteMdbResultConstructor }, - + { "Download Manager", NS_DOWNLOADMANAGER_CID, NS_DOWNLOADMANAGER_CONTRACTID, diff --git a/mozilla/toolkit/components/downloads/src/nsDownloadManager.cpp b/mozilla/toolkit/components/downloads/src/nsDownloadManager.cpp index 3f2a3326da9..debe72aae21 100644 --- a/mozilla/toolkit/components/downloads/src/nsDownloadManager.cpp +++ b/mozilla/toolkit/components/downloads/src/nsDownloadManager.cpp @@ -2122,8 +2122,8 @@ nsDownload::OnStateChange(nsIWebProgress* aWebProgress, // there's no reason to make the text clickable because if it is, they'll // click open the download manager and the items they downloaded will have // been removed. - alerts->ShowAlertNotification(DOWNLOAD_MANAGER_ALERT_ICON, title, message, !removeWhenDone, - EmptyString().get(), mDownloadManager); + alerts->ShowAlertNotification(NS_LITERAL_STRING(DOWNLOAD_MANAGER_ALERT_ICON), title, message, !removeWhenDone, + NS_LITERAL_STRING(""), mDownloadManager); } } } diff --git a/mozilla/xpfe/components/Makefile.in b/mozilla/xpfe/components/Makefile.in index 2f364cc7a38..f56a6e7cf27 100644 --- a/mozilla/xpfe/components/Makefile.in +++ b/mozilla/xpfe/components/Makefile.in @@ -116,17 +116,19 @@ DIRS = \ intl \ find \ filepicker \ - download-manager \ autocomplete \ windowds \ - prefwindow \ console \ + download-manager \ history/public \ sidebar/public \ bookmarks/public \ - alerts \ $(NULL) +ifdef MOZ_HAVE_BROWSER +DIRS += alerts prefwindow +endif + ifeq ($(OS_ARCH),WINNT) DIRS += winhooks endif diff --git a/mozilla/xpfe/components/build2/Makefile.in b/mozilla/xpfe/components/build2/Makefile.in index b3fbd2f9ea9..c01fd680994 100644 --- a/mozilla/xpfe/components/build2/Makefile.in +++ b/mozilla/xpfe/components/build2/Makefile.in @@ -61,16 +61,15 @@ REQUIRES = xpcom \ mork \ widget \ dom \ - alerts\ - uriloader \ - mimetype \ - webbrowserpersist \ - progressDlg \ + uriloader \ + mimetype \ + webbrowserpersist \ + progressDlg \ pref \ docshell \ webshell \ appshell \ - downloadmanager \ + downloadmanager \ $(NULL) CPPSRCS = nsModule.cpp @@ -90,22 +89,20 @@ SHARED_LIBRARY_LIBS = \ LOCAL_INCLUDES = \ -I$(srcdir)/../windowds \ -I$(srcdir)/../../browser/src \ - -I$(srcdir)/../download-manager/src \ - -I$(srcdir)/../autocomplete/src \ + -I$(srcdir)/../download-manager/src \ + -I$(srcdir)/../autocomplete/src \ $(NULL) ifeq ($(OS_ARCH),WINNT) SHARED_LIBRARY_LIBS += \ - $(DIST)/lib/$(LIB_PREFIX)alerts_s.$(LIB_SUFFIX) \ $(DIST)/lib/$(LIB_PREFIX)winhooks_s.$(LIB_SUFFIX) \ $(NULL) OS_LIBS += $(call EXPAND_LIBNAME,ole32 shell32) LOCAL_INCLUDES += \ - -I$(srcdir)/../alerts/src \ -I$(srcdir)/../winhooks \ $(NULL) endif diff --git a/mozilla/xpfe/components/build2/nsModule.cpp b/mozilla/xpfe/components/build2/nsModule.cpp index 53ad8013281..79f90b94f9e 100644 --- a/mozilla/xpfe/components/build2/nsModule.cpp +++ b/mozilla/xpfe/components/build2/nsModule.cpp @@ -39,7 +39,7 @@ #include "nsIGenericFactory.h" #include "nsICategoryManager.h" - +#include "nsServiceManagerUtils.h" #include "rdf.h" #include "nsXPIDLString.h" #include "nsCharsetMenu.h" @@ -47,15 +47,12 @@ #include "nsWindowDataSource.h" #include "nsRDFCID.h" #include "nsAutoComplete.h" -#include "nsDownloadManager.h" -#include "nsDownloadProxy.h" #if defined(MOZ_LDAP_XPCOM) #include "nsLDAPAutoCompleteSession.h" #endif #if defined(XP_WIN) -#include "nsAlertsService.h" #include "nsWindowsHooks.h" #endif // Windows @@ -67,15 +64,12 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsWindowDataSource, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteItem) NS_GENERIC_FACTORY_CONSTRUCTOR(nsAutoCompleteResults) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFontPackageHandler) -NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDownloadManager, Init) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloadProxy) #if defined(MOZ_LDAP_XPCOM) NS_GENERIC_FACTORY_CONSTRUCTOR(nsLDAPAutoCompleteSession) #endif #if defined(XP_WIN) -NS_GENERIC_FACTORY_CONSTRUCTOR(nsAlertsService) NS_GENERIC_FACTORY_CONSTRUCTOR(nsWindowsHooks) #endif // Windows @@ -93,14 +87,11 @@ RegisterWindowDS(nsIComponentManager *aCompMgr, return catman->AddCategoryEntry("app-startup", "Window Data Source", "service," NS_RDF_DATASOURCE_CONTRACTID_PREFIX "window-mediator", PR_TRUE, PR_TRUE, nsnull); + return NS_OK; } static const nsModuleComponentInfo components[] = { - { "Download Manager", NS_DOWNLOADMANAGER_CID, NS_DOWNLOADMANAGER_CONTRACTID, - nsDownloadManagerConstructor }, - { "Download", NS_DOWNLOAD_CID, NS_TRANSFER_CONTRACTID, - nsDownloadProxyConstructor }, { "AutoComplete Search Results", NS_AUTOCOMPLETERESULTS_CID, NS_AUTOCOMPLETERESULTS_CONTRACTID, nsAutoCompleteResultsConstructor}, { "AutoComplete Search Item", NS_AUTOCOMPLETEITEM_CID, NS_AUTOCOMPLETEITEM_CONTRACTID, @@ -112,11 +103,6 @@ static const nsModuleComponentInfo components[] = { nsLDAPAutoCompleteSessionConstructor }, #endif -#if defined(XP_WIN) - { "nsAlertsService", NS_ALERTSSERVICE_CID, NS_ALERTSERVICE_CONTRACTID, nsAlertsServiceConstructor}, - { NS_IWINDOWSHOOKS_CLASSNAME, NS_IWINDOWSHOOKS_CID, NS_IWINDOWSHOOKS_CONTRACTID, nsWindowsHooksConstructor }, -#endif // Windows - { "nsCharsetMenu", NS_CHARSETMENU_CID, NS_RDF_DATASOURCE_CONTRACTID_PREFIX NS_CHARSETMENU_PID, NS_NewCharsetMenu },