From: alp@webkit.org Date: Fri, 16 Nov 2007 22:27:03 +0000 (+0000) Subject: 2007-11-16 Doug Turner X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=713127ce7dc45543eaced2876d573652864471a2;hp=329263e7b1861d316425be76582f2b693839a728;ds=sidebyside 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 --- 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()); } }