mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
Merge remote-tracking branch 'uncool/cst-next'
This need buildfixes and some functional updates...
This commit is contained in:
@@ -56,11 +56,11 @@
|
||||
|
||||
|
||||
|
||||
COsdLangSetup::COsdLangSetup(bool wizard_mode)
|
||||
COsdLangSetup::COsdLangSetup(int wizard_mode)
|
||||
{
|
||||
is_wizard = wizard_mode;
|
||||
|
||||
width = w_max (45, 10);
|
||||
width = 45;
|
||||
tzNotifier = NULL;
|
||||
}
|
||||
|
||||
@@ -77,6 +77,7 @@ int COsdLangSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
|
||||
if (!actionKey.empty()) {
|
||||
g_settings.language = actionKey;
|
||||
g_PluginList->loadPlugins();
|
||||
g_Locale->loadLocale(g_settings.language.c_str());
|
||||
return menu_return::RETURN_EXIT;
|
||||
}
|
||||
@@ -139,25 +140,32 @@ CMenuOptionStringChooser* COsdLangSetup::getTzItems()
|
||||
{
|
||||
tzSelect = new CMenuOptionStringChooser(LOCALE_MAINSETTINGS_TIMEZONE, &g_settings.timezone, true, tzNotifier, CRCInput::RC_green, NULL, true);
|
||||
tzSelect->setHint("", LOCALE_MENU_HINT_TIMEZONE);
|
||||
xmlNodePtr search = xmlDocGetRootElement(parser)->xmlChildrenNode;
|
||||
xmlNodePtr search = xmlDocGetRootElement(parser);
|
||||
search = xmlChildrenNode(search);
|
||||
bool found = false;
|
||||
|
||||
while (search)
|
||||
{
|
||||
if (!strcmp(xmlGetName(search), "zone"))
|
||||
{
|
||||
std::string name = xmlGetAttribute(search, "name");
|
||||
std::string zone = xmlGetAttribute(search, "zone");
|
||||
const char* zptr = xmlGetAttribute(search, "zone");
|
||||
std::string zone;
|
||||
if(zptr)
|
||||
zone = zptr;
|
||||
//printf("Timezone: %s -> %s\n", name.c_str(), zone.c_str());
|
||||
if (access("/usr/share/zoneinfo/" + zone, R_OK))
|
||||
printf("[neutrino] timezone file '%s' not installed\n", zone.c_str());
|
||||
else
|
||||
{
|
||||
tzSelect->addOption(name);
|
||||
found = true;
|
||||
const char* ptr = xmlGetAttribute(search, "name");
|
||||
if(ptr){
|
||||
std::string name = ptr;
|
||||
tzSelect->addOption(name);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
search = search->xmlNextNode;
|
||||
search = xmlNextNode(search);
|
||||
}
|
||||
|
||||
if (!found)
|
||||
@@ -172,13 +180,12 @@ CMenuOptionStringChooser* COsdLangSetup::getTzItems()
|
||||
return tzSelect;
|
||||
}
|
||||
|
||||
|
||||
//shows locale setup for language selection
|
||||
void COsdLangSetup::showLanguageSetup(CMenuWidget *osdl_setup)
|
||||
{
|
||||
struct dirent **namelist;
|
||||
int n;
|
||||
const char *pfad[] = {DATADIR "/neutrino/locale", "/var/tuxbox/locale"};
|
||||
const char *pfad[] = { LOCALEDIR, LOCALEDIR_VAR };
|
||||
|
||||
osdl_setup->addIntroItems();
|
||||
|
||||
|
Reference in New Issue
Block a user