gui/osdlang_setup.cpp: add menu hints

This commit is contained in:
[CST] Focus
2012-07-08 21:40:18 +04:00
parent f0c75cabad
commit cfc377b76e

View File

@@ -89,7 +89,10 @@ int COsdLangSetup::showLocalSetup()
//language setup //language setup
CMenuWidget osdl_setup(LOCALE_LANGUAGESETUP_OSD, NEUTRINO_ICON_LANGUAGE, width, MN_WIDGET_ID_LANGUAGESETUP_LOCALE); CMenuWidget osdl_setup(LOCALE_LANGUAGESETUP_OSD, NEUTRINO_ICON_LANGUAGE, width, MN_WIDGET_ID_LANGUAGESETUP_LOCALE);
showLanguageSetup(&osdl_setup); showLanguageSetup(&osdl_setup);
localSettings->addItem(new CMenuForwarder(LOCALE_LANGUAGESETUP_OSD, true, NULL, &osdl_setup, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
CMenuForwarder * mf = new CMenuForwarder(LOCALE_LANGUAGESETUP_OSD, true, NULL, &osdl_setup, NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED);
mf->setHint("", LOCALE_MENU_HINT_OSD_LANGUAGE);
localSettings->addItem(mf);
//timezone setup //timezone setup
CMenuOptionStringChooser* tzSelect = getTzItems(); CMenuOptionStringChooser* tzSelect = getTzItems();
@@ -101,7 +104,10 @@ int COsdLangSetup::showLocalSetup()
CMenuWidget prefMenu(LOCALE_AUDIOMENU_PREF_LANGUAGES, NEUTRINO_ICON_LANGUAGE, width, MN_WIDGET_ID_LANGUAGESETUP_PREFAUDIO_LANGUAGE); CMenuWidget prefMenu(LOCALE_AUDIOMENU_PREF_LANGUAGES, NEUTRINO_ICON_LANGUAGE, width, MN_WIDGET_ID_LANGUAGESETUP_PREFAUDIO_LANGUAGE);
//call menue for prefered audio languages //call menue for prefered audio languages
showPrefMenu(&prefMenu, langNotifier); showPrefMenu(&prefMenu, langNotifier);
localSettings->addItem(new CMenuForwarder(LOCALE_AUDIOMENU_PREF_LANGUAGES, true, NULL, &prefMenu, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
mf = new CMenuForwarder(LOCALE_AUDIOMENU_PREF_LANGUAGES, true, NULL, &prefMenu, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW);
mf->setHint("", LOCALE_MENU_HINT_LANG_PREF);
localSettings->addItem(mf);
//langNotifier->changeNotify(NONEXISTANT_LOCALE, NULL); //langNotifier->changeNotify(NONEXISTANT_LOCALE, NULL);
int res = localSettings->exec(NULL, ""); int res = localSettings->exec(NULL, "");
@@ -120,6 +126,7 @@ CMenuOptionStringChooser* COsdLangSetup::getTzItems()
if (parser != NULL) if (parser != NULL)
{ {
tzSelect = new CMenuOptionStringChooser(LOCALE_MAINSETTINGS_TIMEZONE, g_settings.timezone, true, new CTZChangeNotifier(), CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN, true); tzSelect = new CMenuOptionStringChooser(LOCALE_MAINSETTINGS_TIMEZONE, g_settings.timezone, true, new CTZChangeNotifier(), CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN, true);
tzSelect->setHint("", LOCALE_MENU_HINT_TIMEZONE);
xmlNodePtr search = xmlDocGetRootElement(parser)->xmlChildrenNode; xmlNodePtr search = xmlDocGetRootElement(parser)->xmlChildrenNode;
bool found = false; bool found = false;
@@ -192,11 +199,14 @@ void COsdLangSetup::showPrefMenu(CMenuWidget *prefMenu, CLangSelectNotifier *lan
prefMenu->addItem(GenericMenuBack); prefMenu->addItem(GenericMenuBack);
prefMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_PREF_LANG_HEAD)); prefMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_PREF_LANG_HEAD));
prefMenu->addItem(new CMenuOptionChooser(LOCALE_AUDIOMENU_AUTO_LANG, &g_settings.auto_lang, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL)); CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_AUDIOMENU_AUTO_LANG, &g_settings.auto_lang, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL);
mc->setHint("", LOCALE_MENU_HINT_AUTO_LANG);
prefMenu->addItem(mc);
for(int i = 0; i < 3; i++) for(int i = 0; i < 3; i++)
{ {
CMenuOptionStringChooser * langSelect = new CMenuOptionStringChooser(LOCALE_AUDIOMENU_PREF_LANG, g_settings.pref_lang[i], true, langNotifier, CRCInput::convertDigitToKey(i+1), "", true); CMenuOptionStringChooser * langSelect = new CMenuOptionStringChooser(LOCALE_AUDIOMENU_PREF_LANG, g_settings.pref_lang[i], true, langNotifier, CRCInput::convertDigitToKey(i+1), "", true);
langSelect->setHint("", LOCALE_MENU_HINT_PREF_LANG);
langSelect->addOption("none"); langSelect->addOption("none");
std::map<std::string, std::string>::const_iterator it; std::map<std::string, std::string>::const_iterator it;
for(it = iso639rev.begin(); it != iso639rev.end(); ++it) for(it = iso639rev.begin(); it != iso639rev.end(); ++it)
@@ -206,10 +216,13 @@ void COsdLangSetup::showPrefMenu(CMenuWidget *prefMenu, CLangSelectNotifier *lan
} }
prefMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_PREF_SUBS_HEAD)); prefMenu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOMENU_PREF_SUBS_HEAD));
prefMenu->addItem(new CMenuOptionChooser(LOCALE_AUDIOMENU_AUTO_SUBS, &g_settings.auto_subs, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL)); mc = new CMenuOptionChooser(LOCALE_AUDIOMENU_AUTO_SUBS, &g_settings.auto_subs, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL);
mc->setHint("", LOCALE_MENU_HINT_AUTO_SUBS);
prefMenu->addItem(mc);
for(int i = 0; i < 3; i++) for(int i = 0; i < 3; i++)
{ {
CMenuOptionStringChooser * langSelect = new CMenuOptionStringChooser(LOCALE_AUDIOMENU_PREF_SUBS, g_settings.pref_subs[i], true, NULL, CRCInput::convertDigitToKey(i+4), "", true); CMenuOptionStringChooser * langSelect = new CMenuOptionStringChooser(LOCALE_AUDIOMENU_PREF_SUBS, g_settings.pref_subs[i], true, NULL, CRCInput::convertDigitToKey(i+4), "", true);
langSelect->setHint("", LOCALE_MENU_HINT_PREF_SUBS);
std::map<std::string, std::string>::const_iterator it; std::map<std::string, std::string>::const_iterator it;
langSelect->addOption("none"); langSelect->addOption("none");
for(it = iso639rev.begin(); it != iso639rev.end(); ++it) for(it = iso639rev.begin(); it != iso639rev.end(); ++it)