[loc] add language selection menu

This commit is contained in:
Pete Batard 2013-10-24 22:57:34 +01:00
parent 92abacad62
commit df44b26342
10 changed files with 215 additions and 136 deletions

View file

@ -308,21 +308,25 @@ void free_locale_list(void)
/*
* Init/destroy our various localization lists
* keep the locale list and filename on reinit
*/
void init_localization(void) {
void _init_localization(BOOL reinit) {
size_t i;
for (i=0; i<ARRAYSIZE(loc_dlg); i++)
list_init(&loc_dlg[i].list);
list_init(&locale_list);
if (!reinit)
list_init(&locale_list);
htab_create(LOC_HTAB_SIZE);
}
void exit_localization(void) {
void _exit_localization(BOOL reinit) {
if (!reinit) {
free_locale_list();
if (loc_filename != embedded_loc_filename)
safe_free(loc_filename);
}
free_dialog_list();
free_locale_list();
htab_destroy();
if (loc_filename != embedded_loc_filename)
safe_free(loc_filename);
}
/*