From ace0653216f5e6e4d8f4f972cc96a0f27f147cf8 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Fri, 6 Aug 2004 15:31:18 +0000 Subject: Fix the reload workaround version checks to look for the correct versions. 2004-08-06 Christian Persch * embed/mozilla/EphyBrowser.cpp: * embed/mozilla/EphyBrowser.h: * embed/mozilla/mozilla-embed.cpp: * embed/mozilla/mozilla-version.h: Fix the reload workaround version checks to look for the correct versions. Thanks to Crispin for noticing this. --- ChangeLog | 10 ++++++++++ embed/mozilla/EphyBrowser.cpp | 2 +- embed/mozilla/EphyBrowser.h | 2 +- embed/mozilla/mozilla-embed.cpp | 4 ++-- embed/mozilla/mozilla-version.h | 3 +++ 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e35abdfa..138d23472 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-08-06 Christian Persch + + * embed/mozilla/EphyBrowser.cpp: + * embed/mozilla/EphyBrowser.h: + * embed/mozilla/mozilla-embed.cpp: + * embed/mozilla/mozilla-version.h: + + Fix the reload workaround version checks to look for the + correct versions. Thanks to Crispin for noticing this. + 2004-08-06 Christian Persch * lib/ephy-string.c: (ephy_string_parse_uri_list): diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index c9cb5a4a0..4ee1028e6 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -414,7 +414,7 @@ nsresult EphyBrowser::GoToHistoryIndex (PRInt16 index) return ContentNav->GotoIndex (index); } -#if !MOZILLA_CHECK_VERSION4 (1, 7, MOZILLA_RELEASE, 3) && !MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 3) +#if (!MOZILLA_IS_BRANCH (1, 7) || !MOZILLA_CHECK_VERSION3 (1, 7, 3)) && !MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 3) /* Workaround for broken reload with frames, see mozilla bug * http://bugzilla.mozilla.org/show_bug.cgi?id=246392 */ diff --git a/embed/mozilla/EphyBrowser.h b/embed/mozilla/EphyBrowser.h index d3472782d..52cb31d50 100644 --- a/embed/mozilla/EphyBrowser.h +++ b/embed/mozilla/EphyBrowser.h @@ -112,7 +112,7 @@ public: nsresult GetSHUrlAtIndex (PRInt32 index, nsACString &url); nsresult GoToHistoryIndex (PRInt16 index); -#if !MOZILLA_CHECK_VERSION4 (1, 7, MOZILLA_RELEASE, 3) && !MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 3) +#if (!MOZILLA_IS_BRANCH (1, 7) || !MOZILLA_CHECK_VERSION3 (1, 7, 3)) && !MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 3) enum { RELOAD_NORMAL = 0 }; enum { RELOAD_FORCE = 1 }; enum { RELOAD_ENCODING_CHANGE = 2 }; diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp index 47721ab13..4a9c0b0f0 100644 --- a/embed/mozilla/mozilla-embed.cpp +++ b/embed/mozilla/mozilla-embed.cpp @@ -502,7 +502,7 @@ static void impl_reload (EphyEmbed *embed, gboolean force) { -#if MOZILLA_CHECK_VERSION4 (1, 7, MOZILLA_RELEASE, 3) || MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 3) +#if (MOZILLA_IS_BRANCH (1,7) && MOZILLA_CHECK_VERSION3 (1, 7, 3)) || MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 3) guint32 mflags; mflags = GTK_MOZ_EMBED_FLAG_RELOADNORMAL; @@ -710,7 +710,7 @@ impl_set_encoding (EphyEmbed *embed, if (NS_FAILED (result)) return; } -#if MOZILLA_CHECK_VERSION4 (1, 7, MOZILLA_RELEASE, 3) || MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 3) +#if (MOZILLA_IS_BRANCH (1,7) && MOZILLA_CHECK_VERSION3 (1, 7, 3)) || MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 3) gtk_moz_embed_reload (GTK_MOZ_EMBED (embed), GTK_MOZ_EMBED_FLAG_RELOADCHARSETCHANGE); #else diff --git a/embed/mozilla/mozilla-version.h b/embed/mozilla/mozilla-version.h index 072c70b5c..3dc260cdf 100644 --- a/embed/mozilla/mozilla-version.h +++ b/embed/mozilla/mozilla-version.h @@ -45,6 +45,9 @@ (VERSION4(MOZILLA_MAJOR, MOZILLA_MINOR, MOZILLA_TYPE, MOZILLA_MICRO) == \ VERSION4(major, minor, type, micro)) +#define MOZILLA_IS_BRANCH(major, minor) \ + (MOZILLA_MAJOR == major && MOZILLA_MINOR == minor) + /* Use the following: * * 1.4.1 -> MOZILLA_CHECK_VERSION3 (1,4,1) -- cgit v1.2.3