diff options
author | Tor Lillqvist <tml@iki.fi> | 2003-09-20 23:52:16 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2003-09-20 23:52:16 +0000 |
commit | 71e847d11c4a94291b8068eeae924a3978cc91c5 (patch) | |
tree | 86bfedba20cc2c25fb4c34f0f83e9f9be6ce91b4 /gtk/gtkrc.c | |
parent | e95ad99afe722788319dd0fcb9f4e7ed9ab6e2e6 (diff) | |
download | gtk+-71e847d11c4a94291b8068eeae924a3978cc91c5.tar.gz |
Don't use zip -r on the etc directory, to avoid including editor backup
2003-09-20 Tor Lillqvist <tml@iki.fi>
* gtk-zip.sh.in: Don't use zip -r on the etc directory, to avoid
including editor backup files. List files we want explicitly.
* gtk/gtkmain.c (_gtk_get_lc_ctype): New function. On Unix, just
calls setlocale (LC_CTYPE, NULL). On Windows, looks for the
LC_ALL, LC_CTYPE and LANG environment variables, than calls
g_win32_getlocale().
(gtk_get_default_language): Code snippet moved to above function,
call it.
* gtk/gtkimmulticontext.c (gtk_im_multicontext_get_slave)
* gtk/gtkrc.c (gtk_rc_context_parse_file): Call
_gtk_get_lc_ctype() instead of setlocale().
Diffstat (limited to 'gtk/gtkrc.c')
-rw-r--r-- | gtk/gtkrc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index ff6864e949..1c48897344 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -840,15 +840,11 @@ gtk_rc_context_parse_file (GtkRcContext *context, gchar *locale_suffixes[2]; gint n_locale_suffixes = 0; gchar *p; - const gchar *locale; + gchar *locale; gint length, j; gboolean found = FALSE; -#ifdef G_OS_WIN32 - locale = g_win32_getlocale (); -#else - locale = setlocale (LC_CTYPE, NULL); -#endif + locale = _gtk_get_lc_ctype (); if (strcmp (locale, "C") && strcmp (locale, "POSIX")) { @@ -873,6 +869,8 @@ gtk_rc_context_parse_file (GtkRcContext *context, locale_suffixes[n_locale_suffixes++] = g_strndup (locale, length); } } + + g_free (locale); gtk_rc_context_parse_one_file (context, filename, priority, reload); for (j = 0; j < n_locale_suffixes; j++) |