aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/ContentHandler.cpp
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-04-27 17:07:36 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-04-27 17:07:36 +0800
commit6fadfbe07379b55695a43687c6b7d935bff80133 (patch)
tree0e9c207847091df0505b4e08caca7e0d899f2a31 /embed/mozilla/ContentHandler.cpp
parente88e7018c298131a4024415d0a2dbff9b7046960 (diff)
downloadgsoc2013-epiphany-6fadfbe07379b55695a43687c6b7d935bff80133.tar
gsoc2013-epiphany-6fadfbe07379b55695a43687c6b7d935bff80133.tar.gz
gsoc2013-epiphany-6fadfbe07379b55695a43687c6b7d935bff80133.tar.bz2
gsoc2013-epiphany-6fadfbe07379b55695a43687c6b7d935bff80133.tar.lz
gsoc2013-epiphany-6fadfbe07379b55695a43687c6b7d935bff80133.tar.xz
gsoc2013-epiphany-6fadfbe07379b55695a43687c6b7d935bff80133.tar.zst
gsoc2013-epiphany-6fadfbe07379b55695a43687c6b7d935bff80133.zip
Nice mess of defines to support 1.8a. Damn.
2004-04-27 Marco Pesenti Gritti <marco@gnome.org> * configure.in: * embed/mozilla/ContentHandler.cpp: * embed/mozilla/ContentHandler.h: * embed/mozilla/EphyHeaderSniffer.cpp: * embed/mozilla/EventContext.h: * embed/mozilla/FilePicker.cpp: * embed/mozilla/MozDownload.cpp: * embed/mozilla/MozDownload.h: * embed/mozilla/mozilla-download.cpp: * embed/mozilla/mozilla-embed-persist.cpp: Nice mess of defines to support 1.8a. Damn.
Diffstat (limited to 'embed/mozilla/ContentHandler.cpp')
-rw-r--r--embed/mozilla/ContentHandler.cpp40
1 files changed, 38 insertions, 2 deletions
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index 460d9a937..489ab72ae 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -58,16 +58,25 @@ class GContentHandler;
NS_IMPL_ISUPPORTS1(GContentHandler, nsIHelperAppLauncherDialog)
+#if MOZILLA_SNAPSHOT < 16
GContentHandler::GContentHandler() : mMimeType(nsnull)
{
LOG ("GContentHandler ctor (%p)", this)
}
+#else
+GContentHandler::GContentHandler()
+{
+ LOG ("GContentHandler ctor (%p)", this)
+}
+#endif
GContentHandler::~GContentHandler()
{
LOG ("GContentHandler dtor (%p)", this)
+#if MOZILLA_SNAPSHOT < 16
nsMemory::Free (mMimeType);
+#endif
}
////////////////////////////////////////////////////////////////////////////////
@@ -89,9 +98,14 @@ NS_IMETHODIMP GContentHandler::Show(nsIHelperAppLauncher *aLauncher,
NS_ENSURE_SUCCESS (rv, rv);
single = EPHY_EMBED_SINGLE (ephy_embed_shell_get_embed_single (embed_shell));
+#if MOZILLA_SNAPSHOT < 16
g_signal_emit_by_name (single, "handle_content", mMimeType,
mUrl.get(), &handled);
-
+#else
+ g_signal_emit_by_name (single, "handle_content", mMimeType.get(),
+ mUrl.get(), &handled);
+#endif
+
if (!handled)
{
MIMEDoAction ();
@@ -214,7 +228,11 @@ NS_METHOD GContentHandler::Init (void)
mLauncher->GetMIMEInfo (getter_AddRefs(MIMEInfo));
NS_ENSURE_TRUE (MIMEInfo, NS_ERROR_FAILURE);
+#if MOZILLA_SNAPSHOT < 16
rv = MIMEInfo->GetMIMEType (&mMimeType);
+#else
+ rv = MIMEInfo->GetMIMEType (mMimeType);
+#endif
mLauncher->GetTargetFile (getter_AddRefs(mTempFile));
@@ -329,9 +347,18 @@ NS_METHOD GContentHandler::MIMEDoAction (void)
auto_downloads = eel_gconf_get_boolean (CONF_AUTO_DOWNLOADS);
- mHelperApp = gnome_vfs_mime_get_default_application (mMimeType);
+#if MOZILLA_SNAPSHOT < 16
+ mHelperApp = gnome_vfs_mime_get_default_application (mMimeType);
+#else
+ mHelperApp = gnome_vfs_mime_get_default_application (mMimeType.get());
+#endif
CheckAppSupportScheme ();
+
+#if MOZILLA_SNAPSHOT < 16
mPermission = ephy_embed_shell_check_mime (embed_shell, mMimeType);
+#else
+ mPermission = ephy_embed_shell_check_mime (embed_shell, mMimeType.get());
+#endif
if (auto_downloads)
{
@@ -361,12 +388,21 @@ NS_METHOD GContentHandler::MIMEDoAction (void)
/* HACK we use the application description to ask
MozDownload to open the file when download
is finished */
+#if MOZILLA_SNAPSHOT < 16
mimeInfo->SetApplicationDescription
(NS_LITERAL_STRING ("gnome-default").get());
+#else
+ mimeInfo->SetApplicationDescription
+ (NS_LITERAL_STRING ("gnome-default"));
+#endif
}
else
{
+#if MOZILLA_SNAPSHOT < 16
mimeInfo->SetApplicationDescription (nsnull);
+#else
+ mimeInfo->SetApplicationDescription (NS_LITERAL_STRING (""));
+#endif
}
if (mAction == CONTENT_ACTION_OPEN)