aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2008-04-01 08:27:48 +0800
committerChristian Persch <chpe@src.gnome.org>2008-04-01 08:27:48 +0800
commit2288a1db2389b57ba825be0539e9f0c5f3f8a7c6 (patch)
tree8845dd4b44061ff8a1cdb2f7e50a5f81f394cc2b
parentc1d5bd5d710ff5acdcd096a46b759589c535f131 (diff)
downloadgsoc2013-epiphany-2288a1db2389b57ba825be0539e9f0c5f3f8a7c6.tar
gsoc2013-epiphany-2288a1db2389b57ba825be0539e9f0c5f3f8a7c6.tar.gz
gsoc2013-epiphany-2288a1db2389b57ba825be0539e9f0c5f3f8a7c6.tar.bz2
gsoc2013-epiphany-2288a1db2389b57ba825be0539e9f0c5f3f8a7c6.tar.lz
gsoc2013-epiphany-2288a1db2389b57ba825be0539e9f0c5f3f8a7c6.tar.xz
gsoc2013-epiphany-2288a1db2389b57ba825be0539e9f0c5f3f8a7c6.tar.zst
gsoc2013-epiphany-2288a1db2389b57ba825be0539e9f0c5f3f8a7c6.zip
Try harder to fix the build with gecko 1.8
svn path=/trunk/; revision=8177
-rw-r--r--embed/mozilla/EphyBrowser.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index e9e732a65..7963d5e7b 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -825,7 +825,9 @@ EphyBrowser::EphyBrowser ()
, mDOMScrollEventListener(nsnull)
, mPopupBlockEventListener(nsnull)
, mModalAlertListener(nsnull)
+#ifdef HAVE_GECKO_1_9
, mCommandEventListener(nsnull)
+#endif
, mContextMenuListener(nsnull)
, mInitialized(PR_FALSE)
{
@@ -874,8 +876,10 @@ nsresult EphyBrowser::Init (EphyEmbed *embed)
mModalAlertListener = new EphyModalAlertEventListener (this);
if (!mModalAlertListener) return NS_ERROR_OUT_OF_MEMORY;
+#ifdef HAVE_GECKO_1_9
mCommandEventListener = new EphyCommandEventListener(this);
if (!mCommandEventListener) return NS_ERROR_OUT_OF_MEMORY;
+#endif
mContextMenuListener = new EphyContextMenuListener(this);
if (!mContextMenuListener) return NS_ERROR_OUT_OF_MEMORY;
@@ -943,8 +947,10 @@ EphyBrowser::AttachListeners(void)
mModalAlertListener, PR_TRUE, PR_FALSE);
rv |= target->AddEventListener(NS_LITERAL_STRING ("DOMModalDialogClosed"),
mModalAlertListener, PR_TRUE, PR_FALSE);
+#ifdef HAVE_GECKO_1_9
rv |= target->AddEventListener(NS_LITERAL_STRING ("command"),
mCommandEventListener, PR_FALSE, PR_FALSE);
+#endif
rv |= target->AddEventListener(NS_LITERAL_STRING ("contextmenu"),
mContextMenuListener, PR_TRUE /* capture */, PR_FALSE);
NS_ENSURE_SUCCESS (rv, rv);
@@ -972,8 +978,10 @@ EphyBrowser::DetachListeners(void)
mModalAlertListener, PR_TRUE);
rv |= mEventTarget->RemoveEventListener(NS_LITERAL_STRING ("DOMModalDialogClosed"),
mModalAlertListener, PR_TRUE);
+#ifdef HAVE_GECKO_1_9
rv |= mEventTarget->RemoveEventListener(NS_LITERAL_STRING ("command"),
mCommandEventListener, PR_FALSE);
+#endif
rv |= mEventTarget->RemoveEventListener(NS_LITERAL_STRING ("contextmenu"),
mContextMenuListener, PR_TRUE /* capture */);
NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);