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
+2007-11-16 Doug Turner <dougt@meer.net>
+
+ 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 <beidson@apple.com>
Build fix
#include "CString.h"
#include "PlatformString.h"
+#include <gtk/gtk.h>
#include <pango/pango.h>
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());
}
}