aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-single.cpp
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@web.de>2004-05-07 20:42:05 +0800
committerChristian Persch <chpe@src.gnome.org>2004-05-07 20:42:05 +0800
commitd6030231393e5370d8658f47de8e9ce9d990990f (patch)
treea06572bd8707a5f1e6385fbc7945882366562c59 /embed/mozilla/mozilla-embed-single.cpp
parent1648fd61276201aaa49456ed17007b34d6d06b38 (diff)
downloadgsoc2013-epiphany-d6030231393e5370d8658f47de8e9ce9d990990f.tar
gsoc2013-epiphany-d6030231393e5370d8658f47de8e9ce9d990990f.tar.gz
gsoc2013-epiphany-d6030231393e5370d8658f47de8e9ce9d990990f.tar.bz2
gsoc2013-epiphany-d6030231393e5370d8658f47de8e9ce9d990990f.tar.lz
gsoc2013-epiphany-d6030231393e5370d8658f47de8e9ce9d990990f.tar.xz
gsoc2013-epiphany-d6030231393e5370d8658f47de8e9ce9d990990f.tar.zst
gsoc2013-epiphany-d6030231393e5370d8658f47de8e9ce9d990990f.zip
Eliminate ExternalProtocolHandlers in favor of setting prefs to make
2004-04-18 Christian Biesinger <cbiesinger@web.de> * embed/mozilla/ExternalProtocolHandlers.cpp: * embed/mozilla/ExternalProtocolHandlers.h: * embed/mozilla/Makefile.am: * embed/mozilla/MozRegisterComponents.cpp: * embed/mozilla/MozRegisterComponents.h: * embed/mozilla/mozilla-embed-single.cpp: Eliminate ExternalProtocolHandlers in favor of setting prefs to make Mozilla not handle the protocols internally. (Backported from HEAD.)
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 055f5ff80..ed93b4564 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -1,4 +1,4 @@
-/*
+/* vim:set ts=8 noet sw=8:
* Copyright (C) 2000-2003 Marco Pesenti Gritti
* Copyright (C) 2003 Christian Persch
*
@@ -104,6 +104,7 @@ static void ephy_cookie_manager_iface_init (EphyCookieManagerIface *iface);
static void ephy_password_manager_iface_init (EphyPasswordManagerIface *iface);
static void ephy_permission_manager_iface_init (EphyPermissionManagerIface *iface);
static void mozilla_embed_single_init (MozillaEmbedSingle *ges);
+static gboolean have_gnome_url_handler (const gchar *protocol);
static GObjectClass *parent_class = NULL;
@@ -220,6 +221,19 @@ mozilla_set_default_prefs (MozillaEmbedSingle *mes)
pref->SetCharPref ("general.useragent.vendor", "Epiphany");
pref->SetCharPref ("general.useragent.vendorSub", VERSION);
+ /* Make sure that Mozilla does not handle these protocols internally */
+ pref->SetBoolPref("network.protocol-handler.external.news", TRUE);
+ pref->SetBoolPref("network.protocol-handler.external.mailto", TRUE);
+ pref->SetBoolPref("network.protocol-handler.external.irc", TRUE);
+ if (have_gnome_url_handler ("ftp"))
+ {
+ pref->SetBoolPref("network.protocol-handler.external.ftp", TRUE);
+ }
+ else
+ {
+ pref->SetBoolPref("network.protocol-handler.external.ftp", FALSE);
+ }
+
return TRUE;
}
@@ -359,20 +373,6 @@ have_gnome_url_handler (const gchar *protocol)
return rv;
}
-static void
-mozilla_register_external_protocols (void)
-{
- /* FIXME register only when needed */
- if (have_gnome_url_handler ("ftp"))
- {
- mozilla_register_FtpProtocolHandler ();
- }
- else
- {
- mozilla_unregister_FtpProtocolHandler ();
- }
-}
-
static nsresult
getUILang (nsAString& aUILang)
{
@@ -467,8 +467,6 @@ init_services (MozillaEmbedSingle *single)
mozilla_register_components ();
- mozilla_register_external_protocols ();
-
mozilla_init_observer (single);
return TRUE;