E17: fix locale listing on OpenBSD

OpenBSD has very little support for locale. For the
wizard and config_intl modules, listing /usr/share/locale
should be sufficient. Other BSD OS might have better
locale support, so this patch is for OpenBSD only (for now)

Patch by Laurent Fanis <laurent@openbsd.org> via Jonathan Armani <armani@openbsd.org>


SVN revision: 64546
This commit is contained in:
Vincent Torri 2011-10-31 07:19:36 +00:00
parent 07c9a9b6db
commit 479fdad8ab
2 changed files with 8 additions and 0 deletions

View File

@ -614,7 +614,11 @@ _fill_data(E_Config_Dialog_Data *cfdata)
e_lang_list = e_intl_language_list();
/* Get list of all locales and start making map */
#ifdef __OpenBSD__
output = popen("ls /usr/share/locale", "r");
#else
output = popen("locale -a", "r");
#endif
if ( output )
{
char line[32];

View File

@ -73,7 +73,11 @@ wizard_page_init(E_Wizard_Page *pg __UNUSED__)
{
FILE *output;
#ifdef __OpenBSD__
output = popen("ls /usr/share/locale", "r");
#else
output = popen("locale -a", "r");
#endif
if (output)
{
char line[32];