Mercurial > vim
comparison src/main.c @ 2201:4c6b4298852f vim73
Other solution for GTK not changing the locale.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 21 May 2010 12:04:55 +0200 |
parents | f60a0c9cbe6c |
children | d0ddf7ba1630 |
comparison
equal
deleted
inserted
replaced
2200:99ba9a30755a | 2201:4c6b4298852f |
---|---|
375 /* When running "evim" or "gvim -y" we need the menus, exit if we | 375 /* When running "evim" or "gvim -y" we need the menus, exit if we |
376 * don't have them. */ | 376 * don't have them. */ |
377 if (params.evim_mode) | 377 if (params.evim_mode) |
378 mch_exit(1); | 378 mch_exit(1); |
379 } | 379 } |
380 # if defined(HAVE_LOCALE_H) || defined(X_LOCALE) | |
381 /* Re-initialize locale, it may have been altered by gui_init_check() */ | |
382 init_locale(); | |
383 # endif | |
384 } | 380 } |
385 # endif | 381 # endif |
386 #endif | 382 #endif |
387 | 383 |
388 if (GARGCOUNT > 0) | 384 if (GARGCOUNT > 0) |
1398 static void | 1394 static void |
1399 init_locale() | 1395 init_locale() |
1400 { | 1396 { |
1401 setlocale(LC_ALL, ""); | 1397 setlocale(LC_ALL, ""); |
1402 | 1398 |
1399 # ifdef FEAT_GUI_GTK | |
1400 /* Tell Gtk not to change our locale settings. */ | |
1401 gtk_disable_setlocale(); | |
1402 # endif | |
1403 # if defined(FEAT_FLOAT) && defined(LC_NUMERIC) | 1403 # if defined(FEAT_FLOAT) && defined(LC_NUMERIC) |
1404 /* Make sure strtod() uses a decimal point, not a comma. */ | 1404 /* Make sure strtod() uses a decimal point, not a comma. */ |
1405 setlocale(LC_NUMERIC, "C"); | 1405 setlocale(LC_NUMERIC, "C"); |
1406 # endif | 1406 # endif |
1407 | 1407 |