diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 91683e782..694e8cc5c 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -2817,16 +2817,16 @@ weather.country_deutschland Deutschland weather.country_norway Norwegen weather.enabled Wetter-Unterstützung weather.location Wetter-Standort +webchannels.xml.add Hinzufügen +webchannels.xml.del Entfernen +webchannels.xml.enter Eintragen +webchannels.xml.reload Neu laden webradio.head WebRadio webradio.xml WebRadio-Dateien webradio.xml.auto WebRadio-Dateien automatisch laden webtv.head WebTV webtv.xml WebTV-Dateien -webtv.xml.add Hinzufügen webtv.xml.auto WebTV-Dateien automatisch laden -webtv.xml.del Entfernen -webtv.xml.enter Eintragen -webtv.xml.reload Neu laden window_size Fenstergröße in % wizard.initial_settings Grundeinstellungen gefunden wizard.install_settings Kanalliste für Astra 19.2°E installieren? diff --git a/data/locale/english.locale b/data/locale/english.locale index ef0ef3ded..e4b9539b8 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -2760,16 +2760,16 @@ videomenu.zappingmode_hold Hold screen weather.api_key Weather API key (Dark Sky) weather.enabled Weather support weather.location Weather location +webchannels.xml.add Add +webchannels.xml.del Remove +webchannels.xml.enter Enter +webchannels.xml.reload Reload webradio.head WebRadio webradio.xml WebRadio files webradio.xml.auto Auto-load WebRadio files webtv.head WebTV webtv.xml WebTV files -webtv.xml.add Add webtv.xml.auto Auto-load WebTV files -webtv.xml.del Remove -webtv.xml.enter Enter -webtv.xml.reload Reload window_size Window size in % wizard.initial_settings Initial settings found wizard.install_settings Do you want to install channels for Astra 19.2°E? diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 23e8718bb..dca9f1ccf 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -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 diff --git a/src/gui/mediaplayer_setup.cpp b/src/gui/mediaplayer_setup.cpp index 328b71ac6..ad8db8c7b 100644 --- a/src/gui/mediaplayer_setup.cpp +++ b/src/gui/mediaplayer_setup.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include @@ -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); diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 3f6f72540..5789b5c97 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -1232,7 +1232,7 @@ bool CMoviePlayerGui::getLiveUrl(const std::string &url, const std::string &scri { std::list 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) diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index e1bcb79cd..8ac1d65ff 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -81,7 +81,8 @@ #endif #include #include -#include +//#include +#include #include #include diff --git a/src/gui/webtv_setup.cpp b/src/gui/webchannels_setup.cpp similarity index 89% rename from src/gui/webtv_setup.cpp rename to src/gui/webchannels_setup.cpp index 8fae32b70..6553dec6e 100644 --- a/src/gui/webtv_setup.cpp +++ b/src/gui/webchannels_setup.cpp @@ -34,14 +34,14 @@ #include #include #include -#include "webtv_setup.h" +#include "webchannels_setup.h" #include #include #include -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 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 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) { diff --git a/src/gui/webtv_setup.h b/src/gui/webchannels_setup.h similarity index 88% rename from src/gui/webtv_setup.h rename to src/gui/webchannels_setup.h index 93c178efc..797c969db 100644 --- a/src/gui/webtv_setup.h +++ b/src/gui/webchannels_setup.h @@ -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 #include @@ -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__ diff --git a/src/neutrino.cpp b/src/neutrino.cpp index d71a4a310..5bad4e15d 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -101,7 +101,7 @@ #include "gui/videosettings.h" #include "gui/audio_select.h" #include "gui/weather.h" -#include "gui/webtv_setup.h" +#include "gui/webchannels_setup.h" #include "gui/widget/hintbox.h" #include "gui/widget/icons.h" @@ -843,8 +843,8 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.webtv_xml.push_back(webtv_xml); } - CWebTVSetup webtvsetup; - webtvsetup.webtv_xml_auto(); + CWebChannelsSetup webchannelssetup; + webchannelssetup.webtv_xml_auto(); g_settings.webradio_xml_auto = configfile.getInt32("webradio_xml_auto", 1); g_settings.webradio_xml.clear(); #ifndef BOXMODEL_CST_HD1 @@ -868,7 +868,7 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.webradio_xml.push_back(webradio_xml); } - webtvsetup.webradio_xml_auto(); + webchannelssetup.webradio_xml_auto(); #endif g_settings.xmltv_xml.clear(); @@ -1713,12 +1713,12 @@ void CNeutrinoApp::saveSetup(const char * fname) configfile.setString ( "logo_hdd_dir", g_settings.logo_hdd_dir ); - CWebTVSetup webtvsetup; + CWebChannelsSetup webchannelssetup; configfile.setInt32("webtv_xml_auto", g_settings.webtv_xml_auto); int webtv_count = 0; for (std::list::iterator it = g_settings.webtv_xml.begin(); it != g_settings.webtv_xml.end(); ++it) { std::string k = "webtv_xml_" + to_string(webtv_count); - if (webtvsetup.webtv_xml_autodir((*it))) + if (webchannelssetup.webtv_xml_autodir((*it))) continue; configfile.setString(k, *it); webtv_count++; @@ -1729,7 +1729,7 @@ void CNeutrinoApp::saveSetup(const char * fname) int webradio_count = 0; for (std::list::iterator it = g_settings.webradio_xml.begin(); it != g_settings.webradio_xml.end(); ++it) { std::string k = "webradio_xml_" + to_string(webradio_count); - if (webtvsetup.webradio_xml_autodir((*it))) + if (webchannelssetup.webradio_xml_autodir((*it))) continue; configfile.setString(k, *it); webradio_count++; diff --git a/src/system/locals.h b/src/system/locals.h index d8e5451bc..29ed40fdd 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -2844,16 +2844,16 @@ typedef enum LOCALE_WEATHER_COUNTRY_NORWAY, LOCALE_WEATHER_ENABLED, LOCALE_WEATHER_LOCATION, + LOCALE_WEBCHANNELS_XML_ADD, + LOCALE_WEBCHANNELS_XML_DEL, + LOCALE_WEBCHANNELS_XML_ENTER, + LOCALE_WEBCHANNELS_XML_RELOAD, LOCALE_WEBRADIO_HEAD, LOCALE_WEBRADIO_XML, LOCALE_WEBRADIO_XML_AUTO, LOCALE_WEBTV_HEAD, LOCALE_WEBTV_XML, - LOCALE_WEBTV_XML_ADD, LOCALE_WEBTV_XML_AUTO, - LOCALE_WEBTV_XML_DEL, - LOCALE_WEBTV_XML_ENTER, - LOCALE_WEBTV_XML_RELOAD, LOCALE_WINDOW_SIZE, LOCALE_WIZARD_INITIAL_SETTINGS, LOCALE_WIZARD_INSTALL_SETTINGS, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 9d3dba384..fc92465ad 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -2844,16 +2844,16 @@ const char * locale_real_names[] = "weather.country_norway", "weather.enabled", "weather.location", + "webchannels.xml.add", + "webchannels.xml.del", + "webchannels.xml.enter", + "webchannels.xml.reload", "webradio.head", "webradio.xml", "webradio.xml.auto", "webtv.head", "webtv.xml", - "webtv.xml.add", "webtv.xml.auto", - "webtv.xml.del", - "webtv.xml.enter", - "webtv.xml.reload", "window_size", "wizard.initial_settings", "wizard.install_settings",