From 1044f92a19ab225a74e7829561cfe1733aee6913 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 12 May 2003 18:04:58 +0000 Subject: Use new gnome vfs show_url api. 2003-05-12 Marco Pesenti Gritti * embed/mozilla/ExternalProtocolService.cpp: Use new gnome vfs show_url api. * embed/mozilla/MozRegisterComponents.cpp: Register external protocols ! * embed/mozilla/mozilla-embed-single.cpp: Check that the ftp handler is not epiphany, to avoid infinite loop. --- embed/mozilla/ExternalProtocolService.cpp | 6 +++--- embed/mozilla/MozRegisterComponents.cpp | 7 +++++++ embed/mozilla/mozilla-embed-single.cpp | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) (limited to 'embed') diff --git a/embed/mozilla/ExternalProtocolService.cpp b/embed/mozilla/ExternalProtocolService.cpp index 9d9a7368c..e5213c971 100644 --- a/embed/mozilla/ExternalProtocolService.cpp +++ b/embed/mozilla/ExternalProtocolService.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include @@ -100,7 +100,7 @@ NS_IMETHODIMP GExternalProtocolService::LoadUrl(nsIURI *aURL) char *result = eel_gconf_get_string(key.get()); if (result) { - gnome_url_show(cSpec.get(), NULL); + gnome_vfs_url_show(cSpec.get()); g_free (result); return NS_OK; } @@ -141,7 +141,7 @@ NS_IMETHODIMP GExternalProtocolService::LoadUrl(nsIURI *aURL) if (ret == 0) { - gnome_url_show(cSpec.get(), NULL); + gnome_vfs_url_show(cSpec.get()); return NS_OK; } else diff --git a/embed/mozilla/MozRegisterComponents.cpp b/embed/mozilla/MozRegisterComponents.cpp index e35a88d3a..cd68b8c4d 100644 --- a/embed/mozilla/MozRegisterComponents.cpp +++ b/embed/mozilla/MozRegisterComponents.cpp @@ -48,8 +48,15 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(MozGlobalHistory) NS_GENERIC_FACTORY_CONSTRUCTOR(GPrintingPromptService) NS_GENERIC_FACTORY_CONSTRUCTOR(GIRCProtocolHandler) NS_GENERIC_FACTORY_CONSTRUCTOR(GFtpProtocolHandler) +NS_GENERIC_FACTORY_CONSTRUCTOR(GExternalProtocolService) static const nsModuleComponentInfo sAppComps[] = { + { + G_EXTERNALPROTOCOLSERVICE_CLASSNAME, + G_EXTERNALPROTOCOLSERVICE_CID, + NS_EXTERNALPROTOCOLSERVICE_CONTRACTID, + GExternalProtocolServiceConstructor + }, { G_PROGRESSDIALOG_CLASSNAME, G_PROGRESSDIALOG_CID, diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index d65a4fffa..aa7daee03 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -236,7 +236,7 @@ have_gnome_url_handler (const gchar *protocol) cmd = eel_gconf_get_string (key); g_free (key); - rv = (cmd != NULL); + rv = (cmd != NULL && strstr (cmd, "epiphany") == NULL); g_free (cmd); if (!rv) return rv; -- cgit v1.2.3