From 713127ce7dc45543eaced2876d573652864471a2 Mon Sep 17 00:00:00 2001 From: "alp@webkit.org" Date: Fri, 16 Nov 2007 22:27:03 +0000 Subject: [PATCH 1/1] 2007-11-16 Doug Turner Reviewed by Alp. http://bugs.webkit.org/show_bug.cgi?id=16018 build bustage when building on debian 4.0 Fix build bustage on GTK+ with older versions of Pango. Don't cache the return value since the docs say it can change. * platform/gtk/Language.cpp: (WebCore::defaultLanguage): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27858 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebCore/ChangeLog | 14 ++++++++++++++ WebCore/platform/gtk/Language.cpp | 11 ++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 93dbd07e2133..35632e0feef4 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,17 @@ +2007-11-16 Doug Turner + + Reviewed by Alp. + + http://bugs.webkit.org/show_bug.cgi?id=16018 + build bustage when building on debian 4.0 + + Fix build bustage on GTK+ with older versions of Pango. + + Don't cache the return value since the docs say it can change. + + * platform/gtk/Language.cpp: + (WebCore::defaultLanguage): + 2007-11-16 Brady Eidson Build fix diff --git a/WebCore/platform/gtk/Language.cpp b/WebCore/platform/gtk/Language.cpp index 7886d60593fd..b835cb618b6f 100644 --- a/WebCore/platform/gtk/Language.cpp +++ b/WebCore/platform/gtk/Language.cpp @@ -29,21 +29,14 @@ #include "CString.h" #include "PlatformString.h" +#include #include namespace WebCore { String defaultLanguage() { - static String defaultLanguage; - - if (!defaultLanguage.isEmpty()) - return defaultLanguage; - - PangoLanguage* pangoLanguage = pango_language_get_default(); - defaultLanguage = String(pango_language_to_string(pangoLanguage)); - - return defaultLanguage; + return pango_language_to_string(gtk_get_default_language()); } } -- 2.36.0