mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-17 02:13:35 +02:00
webtv-setup: show autoloaded webtv files as inactive menu items
Origin commit data
------------------
Branch: ni/coolstream
Commit: a365bd6986
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-09-15 (Sat, 15 Sep 2018)
Origin message was:
------------------
- webtv-setup: show autoloaded webtv files as inactive menu items
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1115,6 +1115,7 @@ bool CMoviePlayerGui::getLiveUrl(const std::string &url, const std::string &scri
|
|||||||
{
|
{
|
||||||
std::string _s = g_settings.livestreamScriptPath + "/" + _script;
|
std::string _s = g_settings.livestreamScriptPath + "/" + _script;
|
||||||
printf("[%s:%s:%d] script: %s\n", __file__, __func__, __LINE__, _s.c_str());
|
printf("[%s:%s:%d] script: %s\n", __file__, __func__, __LINE__, _s.c_str());
|
||||||
|
// try livestreamScripts from webtv autoload directories
|
||||||
if (!file_exists(_s.c_str()))
|
if (!file_exists(_s.c_str()))
|
||||||
{
|
{
|
||||||
_s = std::string(WEBTVDIR_VAR) + "/" + _script;
|
_s = std::string(WEBTVDIR_VAR) + "/" + _script;
|
||||||
|
@@ -75,7 +75,7 @@ int CWebTVSetup::exec(CMenuTarget* parent, const std::string & actionKey)
|
|||||||
selected = m->getSelected();
|
selected = m->getSelected();
|
||||||
if (selected >= item_offset) {
|
if (selected >= item_offset) {
|
||||||
m->removeItem(selected);
|
m->removeItem(selected);
|
||||||
m->hide();
|
m->hide();
|
||||||
selected = m->getSelected();
|
selected = m->getSelected();
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
@@ -159,7 +159,7 @@ int CWebTVSetup::Show()
|
|||||||
|
|
||||||
m->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_WEBTV_XML));
|
m->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_WEBTV_XML));
|
||||||
|
|
||||||
//NI
|
// TODO: show/hide autoloaded content when switching g_settings.webtv_xml_auto
|
||||||
char hint_text[1024];
|
char hint_text[1024];
|
||||||
snprintf(hint_text, sizeof(hint_text)-1, g_Locale->getText(LOCALE_MENU_HINT_WEBTV_XML_AUTO), WEBTVDIR, WEBTVDIR_VAR);
|
snprintf(hint_text, sizeof(hint_text)-1, g_Locale->getText(LOCALE_MENU_HINT_WEBTV_XML_AUTO), WEBTVDIR, WEBTVDIR_VAR);
|
||||||
CMenuOptionChooser *oc = new CMenuOptionChooser(LOCALE_WEBTV_XML_AUTO, &g_settings.webtv_xml_auto, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this, CRCInput::convertDigitToKey(shortcut++));
|
CMenuOptionChooser *oc = new CMenuOptionChooser(LOCALE_WEBTV_XML_AUTO, &g_settings.webtv_xml_auto, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this, CRCInput::convertDigitToKey(shortcut++));
|
||||||
@@ -168,12 +168,21 @@ int CWebTVSetup::Show()
|
|||||||
m->addItem(GenericMenuSeparator);
|
m->addItem(GenericMenuSeparator);
|
||||||
|
|
||||||
item_offset = m->getItemsCount();
|
item_offset = m->getItemsCount();
|
||||||
|
// show autoloaded webtv files
|
||||||
for (std::list<std::string>::iterator it = g_settings.webtv_xml.begin(); it != g_settings.webtv_xml.end(); ++it)
|
for (std::list<std::string>::iterator it = g_settings.webtv_xml.begin(); it != g_settings.webtv_xml.end(); ++it)
|
||||||
{
|
{
|
||||||
//NI
|
|
||||||
if (webtv_xml_autodir((*it)))
|
if (webtv_xml_autodir((*it)))
|
||||||
continue;
|
m->addItem(new CMenuForwarder(*it, false, "auto"));
|
||||||
m->addItem(new CMenuForwarder(*it, true, NULL, this, "c"));
|
}
|
||||||
|
if (item_offset < m->getItemsCount())
|
||||||
|
m->addItem(GenericMenuSeparator);
|
||||||
|
|
||||||
|
item_offset = m->getItemsCount();
|
||||||
|
// show users webtv files
|
||||||
|
for (std::list<std::string>::iterator it = g_settings.webtv_xml.begin(); it != g_settings.webtv_xml.end(); ++it)
|
||||||
|
{
|
||||||
|
if (!webtv_xml_autodir((*it)))
|
||||||
|
m->addItem(new CMenuForwarder(*it, true, NULL, this, "c"));
|
||||||
}
|
}
|
||||||
|
|
||||||
m->setFooter(CWebTVSetupFooterButtons, CWebTVSetupFooterButtonCount); //Why we need here an extra buttonbar?
|
m->setFooter(CWebTVSetupFooterButtons, CWebTVSetupFooterButtonCount); //Why we need here an extra buttonbar?
|
||||||
|
Reference in New Issue
Block a user