- rename webtv-setup => webchannels-setup

Conflicts:
	src/gui/user_menue.cpp
	src/gui/webchannels_setup.cpp
	src/neutrino.cpp

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2020-09-13 23:43:47 +02:00
committed by Thilo Graf
parent 80c339efe4
commit 0c1091e859
11 changed files with 58 additions and 56 deletions

View File

@@ -110,7 +110,7 @@ libneutrino_gui_a_SOURCES = \
videosettings.cpp \
volumebar.cpp \
weather.cpp \
webtv_setup.cpp \
webchannels_setup.cpp \
xmltv_setup.cpp \
zapit_setup.cpp

View File

@@ -45,7 +45,7 @@
#include <gui/audioplayer_setup.h>
#include <gui/pictureviewer_setup.h>
#include <gui/webtv_setup.h>
#include <gui/webchannels_setup.h>
#include <gui/xmltv_setup.h>
#include <gui/moviebrowser/mb.h>
@@ -88,7 +88,7 @@ int CMediaPlayerSetup::showMediaPlayerSetup()
CMenuForwarder *mf;
CWebTVSetup wsetup;
CWebChannelsSetup wsetup;
mf = new CMenuForwarder(LOCALE_WEBTV_HEAD, true, NULL, &wsetup, "webtv_menu", CRCInput::RC_red);
mf->setHint(NEUTRINO_ICON_HINT_WEBTV, LOCALE_MENU_HINT_WEBTV_SETUP);
mediaSetup->addItem(mf);

View File

@@ -1232,7 +1232,7 @@ bool CMoviePlayerGui::getLiveUrl(const std::string &url, const std::string &scri
{
std::list<std::string> paths;
// try livestreamScript from user's livestreamScriptPath
// Note: livestreamScriptPath is disabled in webtv-setup; just here for compatibility
// Note: livestreamScriptPath is disabled in webchannels-setup; just here for compatibility
paths.push_back(g_settings.livestreamScriptPath);
// try livestreamScripts from webradio/webtv autoload directories
if (m_ThisMode == NeutrinoModes::mode_webradio)

View File

@@ -81,7 +81,8 @@
#endif
#include <gui/update_menue.h>
#include <gui/hdd_menu.h>
#include <gui/webtv_setup.h>
//#include <gui/test_menu.h>
#include <gui/webchannels_setup.h>
#include <gui/miscsettings_menu.h>
#include <driver/radiotext.h>

View File

@@ -34,14 +34,14 @@
#include <gui/widget/keyboard_input.h>
#include <zapit/zapit.h>
#include <neutrino_menue.h>
#include "webtv_setup.h"
#include "webchannels_setup.h"
#include <dirent.h>
#include <mymenu.h>
#include <system/helpers.h>
CWebTVSetup::CWebTVSetup()
CWebChannelsSetup::CWebChannelsSetup()
{
webradio = false;
width = 75;
@@ -50,16 +50,16 @@ CWebTVSetup::CWebTVSetup()
changed = false;
}
#define CWebTVSetupFooterButtonCount 4
static const struct button_label CWebTVSetupFooterButtons[CWebTVSetupFooterButtonCount] =
static const struct button_label CWebChannelsSetupFooterButtons[] =
{
{ NEUTRINO_ICON_BUTTON_RED, LOCALE_WEBTV_XML_DEL },
{ NEUTRINO_ICON_BUTTON_GREEN, LOCALE_WEBTV_XML_ADD },
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_WEBTV_XML_ENTER },
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_WEBTV_XML_RELOAD }
{ NEUTRINO_ICON_BUTTON_RED, LOCALE_WEBCHANNELS_XML_DEL },
{ NEUTRINO_ICON_BUTTON_GREEN, LOCALE_WEBCHANNELS_XML_ADD },
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_WEBCHANNELS_XML_ENTER },
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_WEBCHANNELS_XML_RELOAD }
};
#define CWebChannelsSetupFooterButtonCount (sizeof(CWebChannelsSetupFooterButtons)/sizeof(CWebChannelsSetupFooterButtons[0]))
int CWebTVSetup::exec(CMenuTarget *parent, const std::string &actionKey)
int CWebChannelsSetup::exec(CMenuTarget *parent, const std::string &actionKey)
{
int res = menu_return::RETURN_REPAINT;
@@ -85,7 +85,7 @@ int CWebTVSetup::exec(CMenuTarget *parent, const std::string &actionKey)
{
std::string entry = dirname;
CKeyboardInput *e = new CKeyboardInput(LOCALE_WEBTV_XML_ENTER, &entry, 50);
CKeyboardInput *e = new CKeyboardInput(LOCALE_WEBCHANNELS_XML_ENTER, &entry, 50);
e->exec(this, "");
delete e;
@@ -146,7 +146,7 @@ int CWebTVSetup::exec(CMenuTarget *parent, const std::string &actionKey)
tpl += "?mode=tv";
std::string entry = tpl;
CKeyboardInput *e = new CKeyboardInput(LOCALE_WEBTV_XML_ENTER, &entry, 52);
CKeyboardInput *e = new CKeyboardInput(LOCALE_WEBCHANNELS_XML_ENTER, &entry, 52);
e->exec(this, "");
delete e;
@@ -185,7 +185,7 @@ int CWebTVSetup::exec(CMenuTarget *parent, const std::string &actionKey)
return res;
}
int CWebTVSetup::Show()
int CWebChannelsSetup::Show()
{
item_offset = 0;
std::list<std::string> webchannels = (webradio ? g_settings.webradio_xml : g_settings.webtv_xml);
@@ -251,7 +251,7 @@ int CWebTVSetup::Show()
m->addItem(new CMenuForwarder(*it, true, NULL, this, "c"));
}
m->setFooter(CWebTVSetupFooterButtons, CWebTVSetupFooterButtonCount);
m->setFooter(CWebChannelsSetupFooterButtons, CWebChannelsSetupFooterButtonCount);
int res = m->exec(NULL, "");
m->hide();
@@ -287,8 +287,7 @@ int CWebTVSetup::Show()
return res;
}
bool CWebTVSetup::changeNotify(const neutrino_locale_t OptionName, void */*data*/)
bool CWebChannelsSetup::changeNotify(const neutrino_locale_t OptionName, void */*data*/)
{
int ret = menu_return::RETURN_NONE;
@@ -316,20 +315,20 @@ int filefilter(const struct dirent *entry)
}
// webradio wrapper for webchannels_auto()
void CWebTVSetup::webradio_xml_auto()
void CWebChannelsSetup::webradio_xml_auto()
{
webradio = true;
webchannels_auto();
}
// webtv wrapper for webchannels_auto()
void CWebTVSetup::webtv_xml_auto()
void CWebChannelsSetup::webtv_xml_auto()
{
webradio = false;
webchannels_auto();
}
void CWebTVSetup::webchannels_auto()
void CWebChannelsSetup::webchannels_auto()
{
std::list<std::string> webchannels;
const char *dirs[2];
@@ -371,7 +370,7 @@ void CWebTVSetup::webchannels_auto()
if (!found)
{
printf("[CWebTVSetup] loading: %s\n", webchannel_file);
printf("[CWebChannelsSetup] loading: %s\n", webchannel_file);
if (webradio)
g_settings.webradio_xml.push_back(webchannel_file);
else
@@ -379,7 +378,7 @@ void CWebTVSetup::webchannels_auto()
}
else
{
printf("[CWebTVSetup] skipping: %s\n", webchannel_file);
printf("[CWebChannelsSetup] skipping: %s\n", webchannel_file);
}
}
free(filelist[count]);
@@ -390,20 +389,20 @@ void CWebTVSetup::webchannels_auto()
}
// webradio wrapper for webchannels_autodir()
bool CWebTVSetup::webradio_xml_autodir(std::string directory)
bool CWebChannelsSetup::webradio_xml_autodir(std::string directory)
{
webradio = true;
return webchannels_autodir(directory);
}
// webtv wrapper for webchannels_autodir()
bool CWebTVSetup::webtv_xml_autodir(std::string directory)
bool CWebChannelsSetup::webtv_xml_autodir(std::string directory)
{
webradio = false;
return webchannels_autodir(directory);
}
bool CWebTVSetup::webchannels_autodir(std::string directory)
bool CWebChannelsSetup::webchannels_autodir(std::string directory)
{
if (webradio)
{

View File

@@ -21,8 +21,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef __webtv_setup_h__
#define __webtv_setup_h__
#ifndef __webchannels_setup_h__
#define __webchannels_setup_h__
#include <sys/types.h>
#include <string.h>
@@ -31,7 +31,7 @@
#define WEBTV_XML WEBTVDIR_VAR "/webtv_usr.xml"
#define WEBRADIO_XML WEBRADIODIR_VAR "/webradio_usr.xml"
class CWebTVSetup : public CMenuTarget, CChangeObserver
class CWebChannelsSetup : public CMenuTarget, CChangeObserver
{
private:
bool webradio;
@@ -41,14 +41,16 @@ class CWebTVSetup : public CMenuTarget, CChangeObserver
bool changed;
CMenuWidget *m;
public:
CWebTVSetup();
CWebChannelsSetup();
int exec(CMenuTarget *parent, const std::string &actionKey);
int Show();
bool changeNotify(const neutrino_locale_t OptionName, void *data);
// webradio wrappers
void webradio_xml_auto();
bool webradio_xml_autodir(std::string directory);
// webtv wrappers
void webtv_xml_auto();
bool webtv_xml_autodir(std::string directory);
@@ -68,4 +70,4 @@ class CWebTVResolution : public CMenuTarget
int Show();
};
#endif
#endif // __webchannels_setup_h__