diff options
author | Havoc Pennington <hp@redhat.com> | 2000-06-21 20:41:15 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2000-06-21 20:41:15 +0000 |
commit | 443e8c395e9f45d89f669c944366055eead5d021 (patch) | |
tree | de32955aa0aae3cffd4f5ecf3d035c8309e60d28 /gtk/gtkmain.c | |
parent | f534125777af40642d3587eb1e0cb2de6946f4f2 (diff) | |
download | gtk+-443e8c395e9f45d89f669c944366055eead5d021.tar.gz |
Use gtk_get_default_language
2000-06-21 Havoc Pennington <hp@redhat.com>
* gtk/gtkwidget.c (gtk_widget_create_pango_context): Use
gtk_get_default_language
* gtk/gtkmain.h, gtk/gtkmain.c (gtk_get_default_language):
new function to get the default language
* gtk/gtktexttagprivate.h, gtk/gtktexttag.c, gtktextview.c:
s/gtk_text_view_style_values/gtk_text_style_values/
* gtk/gtktexttag.c, gtk/gtktexttag.h, gtk/gtktexttagprivate.h:
Add a "language" field to tags.
(gtk_text_tag_set_arg): Fix bug in setting
"bg_full_height_set" tag.
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r-- | gtk/gtkmain.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index a30676274e..6446776888 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -487,6 +487,23 @@ gtk_set_locale (void) return gdk_set_locale (); } +gchar* +gtk_get_default_language (void) +{ + gchar *lang; + gchar *p; + + lang = g_strdup (setlocale (LC_CTYPE, NULL)); + p = strchr (lang, '.'); + if (p) + *p = '\0'; + p = strchr (lang, '@'); + if (p) + *p = '\0'; + + return lang; +} + void gtk_main (void) { |