mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
webchannels-setup: simplify WEBTV_XML_QUALITY_OPTIONS; small changes to menu structure
Origin commit data
------------------
Branch: ni/coolstream
Commit: cc3345d7a7
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-09-19 (Sun, 19 Sep 2021)
Origin message was:
------------------
- webchannels-setup: simplify WEBTV_XML_QUALITY_OPTIONS; small changes to menu structure
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -58,29 +58,19 @@ static const struct button_label CWebChannelsSetupFooterButtons[] =
|
||||
};
|
||||
#define CWebChannelsSetupFooterButtonCount (sizeof(CWebChannelsSetupFooterButtons)/sizeof(CWebChannelsSetupFooterButtons[0]))
|
||||
|
||||
#if BOXMODEL_CST_HD1 || BOXMODEL_CST_HD2 || HAVE_SPARK_HARDWARE
|
||||
#define WEBTV_XML_QUALITY_OPTION_COUNT 5
|
||||
CMenuOptionChooser::keyval_ext WEBTV_XML_QUALITY_OPTIONS[WEBTV_XML_QUALITY_OPTION_COUNT] =
|
||||
{
|
||||
{ 1920, NONEXISTANT_LOCALE, "1920x1080" },
|
||||
{ 1280, NONEXISTANT_LOCALE, "1280x720" },
|
||||
{ 854, NONEXISTANT_LOCALE, "854x480" },
|
||||
{ 640, NONEXISTANT_LOCALE, "640x360" },
|
||||
{ 480, NONEXISTANT_LOCALE, "480x270" }
|
||||
};
|
||||
#else
|
||||
#define WEBTV_XML_QUALITY_OPTION_COUNT 7
|
||||
CMenuOptionChooser::keyval_ext WEBTV_XML_QUALITY_OPTIONS[WEBTV_XML_QUALITY_OPTION_COUNT] =
|
||||
{
|
||||
{ 3840, NONEXISTANT_LOCALE, "3840x2160" },
|
||||
{ 2560, NONEXISTANT_LOCALE, "2560x1440" },
|
||||
{ 1920, NONEXISTANT_LOCALE, "1920x1080" },
|
||||
{ 1280, NONEXISTANT_LOCALE, "1280x720" },
|
||||
{ 854, NONEXISTANT_LOCALE, "854x480" },
|
||||
{ 640, NONEXISTANT_LOCALE, "640x360" },
|
||||
{ 480, NONEXISTANT_LOCALE, "480x270" }
|
||||
};
|
||||
CMenuOptionChooser::keyval_ext WEBTV_XML_QUALITY_OPTIONS[] =
|
||||
{
|
||||
#if !HAVE_CST_HARDWARE
|
||||
{ 3840, NONEXISTANT_LOCALE, "3840x2160" },
|
||||
{ 2560, NONEXISTANT_LOCALE, "2560x1440" },
|
||||
#endif
|
||||
{ 1920, NONEXISTANT_LOCALE, "1920x1080" },
|
||||
{ 1280, NONEXISTANT_LOCALE, "1280x720" },
|
||||
{ 854, NONEXISTANT_LOCALE, "854x480" },
|
||||
{ 640, NONEXISTANT_LOCALE, "640x360" },
|
||||
{ 480, NONEXISTANT_LOCALE, "480x270" }
|
||||
};
|
||||
#define WEBTV_XML_QUALITY_OPTION_COUNT (sizeof(WEBTV_XML_QUALITY_OPTIONS)/sizeof(CMenuOptionChooser::keyval_ext))
|
||||
|
||||
int CWebChannelsSetup::exec(CMenuTarget *parent, const std::string &actionKey)
|
||||
{
|
||||
@@ -239,6 +229,12 @@ int CWebChannelsSetup::Show()
|
||||
m->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, webradio ? LOCALE_WEBRADIO_XML : LOCALE_WEBTV_XML));
|
||||
#endif
|
||||
|
||||
if (!webradio)
|
||||
{
|
||||
m->addItem(new CMenuOptionChooser(LOCALE_WEBTV_XML_PREF_QUALITY, &g_settings.webtv_xml_quality, WEBTV_XML_QUALITY_OPTIONS, WEBTV_XML_QUALITY_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true));
|
||||
m->addItem(GenericMenuSeparatorLine);
|
||||
}
|
||||
|
||||
// TODO: show/hide autoloaded content when switching g_settings.webradio/webtv_xml_auto
|
||||
CMenuOptionChooser *oc;
|
||||
char hint_text[1024];
|
||||
@@ -254,10 +250,6 @@ int CWebChannelsSetup::Show()
|
||||
}
|
||||
oc->setHint("", hint_text);
|
||||
m->addItem(oc);
|
||||
if(!webradio)
|
||||
{
|
||||
m->addItem(new CMenuOptionChooser(LOCALE_WEBTV_XML_PREF_QUALITY, &g_settings.webtv_xml_quality, WEBTV_XML_QUALITY_OPTIONS, WEBTV_XML_QUALITY_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true));
|
||||
}
|
||||
m->addItem(GenericMenuSeparator);
|
||||
|
||||
item_offset = m->getItemsCount();
|
||||
|
Reference in New Issue
Block a user