X-Git-Url: https://git.decadent.org.uk/gitweb/?p=videolink.git;a=blobdiff_plain;f=browser_widget.cpp;h=cff4a7dab2b52f8fb9362d0f74bc701036497686;hp=3b7a2d442709ccd34fa37048c0cc33ae4f18e4c5;hb=HEAD;hpb=f7b9532fdf6b345a65c4045b44edde7182d98747 diff --git a/browser_widget.cpp b/browser_widget.cpp index 3b7a2d4..cff4a7d 100644 --- a/browser_widget.cpp +++ b/browser_widget.cpp @@ -8,10 +8,13 @@ #include +#include "videolink.hpp" +#include "wchar_t_short.h" #include -#if MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR == 9 +#if MOZ_VERSION_GE(1,9,0) #include #endif +#include "wchar_t_default.h" #include "xpcom_support.hpp" @@ -528,10 +531,23 @@ Glib::ObjectBase * browser_widget::wrap_new(GObject * gobject) browser_widget::initialiser::initialiser() { -#if MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR == 9 +#if MOZ_VERSION_GE(1,9,0) static const GREVersionRange gre_versions = { +#if MOZ_VERSION_EQ(1,9,0) "1.9a", PR_TRUE, - "1.9.*", PR_TRUE + "1.9.1", PR_FALSE +#elif MOZ_VERSION_EQ(1,9,1) + "1.9.1", PR_TRUE, + "1.9.2", PR_FALSE +#elif MOZ_VERSION_EQ(2,0,-1) || MOZ_VERSION_EQ(2,0,0) + "2.0b", PR_TRUE, + "2.0.1", PR_FALSE +#elif MOZ_VERSION_EQ(2,0,1) + "2.0.1", PR_TRUE, + "2.0.2", PR_FALSE +#else +#error "version is unsupported, but you could try continuing the pattern above" +#endif }; char path[PATH_MAX]; check(GRE_GetGREPathWithProperties(&gre_versions, 1, 0, 0, @@ -558,7 +574,7 @@ browser_widget::initialiser::~initialiser() { gtk_moz_embed_pop_startup(); -#if MOZ_VERSION_MAJOR == 1 && MOZ_VERSION_MINOR == 9 +#if MOZ_VERSION_GE(1,9,0) XPCOMGlueShutdown(); #endif }