From 4c11a7aa69307c43b27b958b48339dfedc7b92d8 Mon Sep 17 00:00:00 2001 From: "reed@reedloden.com" Date: Wed, 28 Nov 2007 14:47:01 -0800 Subject: [PATCH] Bug 405368 - "Allow runtime overrides by Linux version for chrome" [p=ventnor.bugzilla@yahoo.com.au (Michael Ventnor) r=bsmedberg a1.9=beltzner] --- chrome/src/Makefile.in | 8 ++++++++ chrome/src/nsChromeRegistry.cpp | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/chrome/src/Makefile.in b/chrome/src/Makefile.in index e450c132aff3..38c6c942488e 100644 --- a/chrome/src/Makefile.in +++ b/chrome/src/Makefile.in @@ -86,9 +86,17 @@ EXTRA_DSO_LDOPTS = \ $(MOZ_COMPONENT_LIBS) \ $(NULL) +ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT))) +EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS) +endif + ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) EXTRA_DSO_LDOPTS += $(TK_LIBS) endif include $(topsrcdir)/config/rules.mk +ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT))) +CXXFLAGS += $(MOZ_GTK2_CFLAGS) +endif + diff --git a/chrome/src/nsChromeRegistry.cpp b/chrome/src/nsChromeRegistry.cpp index d56438b9906e..04a3b89b434f 100644 --- a/chrome/src/nsChromeRegistry.cpp +++ b/chrome/src/nsChromeRegistry.cpp @@ -48,6 +48,8 @@ #include #elif defined(XP_MACOSX) #include +#elif defined(MOZ_WIDGET_GTK2) +#include #endif #include "nsAppDirectoryServiceDefs.h" @@ -2143,6 +2145,10 @@ nsChromeRegistry::ProcessManifestBuffer(char *buf, PRInt32 length, majorVersion, minorVersion); } +#elif defined(MOZ_WIDGET_GTK2) + nsTextFormatter::ssprintf(osVersion, NS_LITERAL_STRING("%ld.%ld").get(), + gtk_major_version, + gtk_minor_version); #endif char *token;