aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--embed/mozilla/MozRegisterComponents.cpp64
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp2
3 files changed, 15 insertions, 58 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f25255d1..6e47818ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-11-24 Marco Pesenti Gritti <marco@gnome.org>
+
+ * embed/mozilla/MozRegisterComponents.cpp:
+ * embed/mozilla/mozilla-embed-single.cpp:
+
+ No need to handle mailto registration separately.
+
2003-11-24 Christian Persch <chpe@cvs.gnome.org>
* data/glade/epiphany.glade:
diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp
index 1b81702a6..1ddc46978 100644
--- a/embed/mozilla/MozRegisterComponents.cpp
+++ b/embed/mozilla/MozRegisterComponents.cpp
@@ -52,6 +52,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(GPrintingPromptService)
NS_GENERIC_FACTORY_CONSTRUCTOR(GIRCProtocolHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR(GFtpProtocolHandler)
NS_GENERIC_FACTORY_CONSTRUCTOR(GNewsProtocolHandler)
+NS_GENERIC_FACTORY_CONSTRUCTOR(GMailtoProtocolHandler)
#if MOZILLA_SNAPSHOT < 12
NS_GENERIC_FACTORY_CONSTRUCTOR(GExternalProtocolService)
@@ -181,21 +182,7 @@ static const nsModuleComponentInfo sAppComps[] = {
EPHY_ABOUT_REDIRECTOR_CID,
EPHY_ABOUT_REDIRECTOR_MARCO_CONTRACTID,
EphyAboutRedirectorConstructor
- }
-};
-
-static const int sNumAppComps = sizeof(sAppComps) / sizeof(nsModuleComponentInfo);
-
-static const nsModuleComponentInfo sFtpComps = {
- G_FTP_PROTOCOL_CLASSNAME,
- G_FTP_PROTOCOL_CID,
- G_FTP_PROTOCOL_CONTRACTID,
- GFtpProtocolHandlerConstructor
-};
-
-NS_GENERIC_FACTORY_CONSTRUCTOR(GMailtoProtocolHandler)
-
-static const nsModuleComponentInfo sMailtoComps[] = {
+ },
{
G_MAILTO_PROTOCOL_CLASSNAME,
G_MAILTO_PROTOCOL_CID,
@@ -210,14 +197,13 @@ static const nsModuleComponentInfo sMailtoComps[] = {
}
};
-static const int sNumMailtoComps = sizeof(sMailtoComps) / sizeof(nsModuleComponentInfo);
+static const int sNumAppComps = sizeof(sAppComps) / sizeof(nsModuleComponentInfo);
-static const nsModuleComponentInfo sModuleComps[] = {
- {
- G_EXTERNALPROTOCOLSERVICE_CLASSNAME,
- G_EXTERNALPROTOCOLSERVICE_CID,
- NS_EXTERNALPROTOCOLSERVICE_CONTRACTID
- }
+static const nsModuleComponentInfo sFtpComps = {
+ G_FTP_PROTOCOL_CLASSNAME,
+ G_FTP_PROTOCOL_CID,
+ G_FTP_PROTOCOL_CONTRACTID,
+ GFtpProtocolHandlerConstructor
};
static NS_DEFINE_CID(knsFtpProtocolHandlerCID, NS_FTPPROTOCOLHANDLER_CID);
@@ -318,37 +304,3 @@ mozilla_unregister_FtpProtocolHandler (void)
ftpRegistered = PR_FALSE;
return NS_SUCCEEDED (rv) ? TRUE : FALSE;
}
-
-/**
- * mozilla_register_MailtoProtocolHandler: Register Mailto Protocol Handler
- */
-gboolean
-mozilla_register_MailtoProtocolHandler (void)
-{
- gboolean retVal = TRUE;
- nsresult rv;
-
- nsCOMPtr<nsIComponentRegistrar> cr;
- rv = NS_GetComponentRegistrar(getter_AddRefs(cr));
- if (NS_FAILED(rv) || !cr) return FALSE;
-
- for (int i = 0; i < sNumMailtoComps; i++)
- {
- nsCOMPtr<nsIGenericFactory> componentFactory;
- rv = NS_NewGenericFactory(getter_AddRefs(componentFactory),
- &(sMailtoComps[i]));
- if (NS_FAILED(rv))
- {
- retVal = FALSE;
- continue; // don't abort registering other components
- }
-
- rv = cr->RegisterFactory(sMailtoComps[i].mCID,
- sMailtoComps[i].mDescription,
- sMailtoComps[i].mContractID,
- componentFactory);
- if (NS_FAILED(rv))
- retVal = FALSE;
- }
- return retVal;
-}
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 8b41666e6..7d9fe5070 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -368,8 +368,6 @@ mozilla_register_external_protocols (void)
{
mozilla_unregister_FtpProtocolHandler ();
}
-
- mozilla_register_MailtoProtocolHandler ();
}
static nsresult