From dc0fca46005e16757f724b26b042b1a4b1f3f20b Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 13 Sep 2020 23:43:47 +0200 Subject: [PATCH] rename webtv-setup => webchannels-setup Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e3cf2920a5fd994b44ace4f143bbd08c4a757845 Author: vanhofen Date: 2020-09-13 (Sun, 13 Sep 2020) Origin message was: ------------------ - rename webtv-setup => webchannels-setup ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- data/locale/deutsch.locale | 8 ++-- data/locale/english.locale | 8 ++-- src/gui/Makefile.am | 2 +- src/gui/mediaplayer_setup.cpp | 4 +- src/gui/movieplayer.cpp | 2 +- src/gui/user_menue.cpp | 2 +- ...{webtv_setup.cpp => webchannels_setup.cpp} | 44 +++++++++---------- .../{webtv_setup.h => webchannels_setup.h} | 12 ++--- src/neutrino.cpp | 15 +++---- src/system/locals.h | 8 ++-- src/system/locals_intern.h | 8 ++-- 11 files changed, 57 insertions(+), 56 deletions(-) rename src/gui/{webtv_setup.cpp => webchannels_setup.cpp} (89%) rename src/gui/{webtv_setup.h => webchannels_setup.h} (88%) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index fbca5ddff..72dec177c 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -3004,16 +3004,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 22b4e931c..9d070ac0d 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -2947,16 +2947,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 025ecd214..29de5174f 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -114,7 +114,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 c521af652..f0c603680 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 559ff4dd1..bf77a9328 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 ee430f59c..df952a8c5 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -80,7 +80,7 @@ #include #include #include //NI -#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 60c92fcf5..ea22c4037 100644 --- a/src/gui/webtv_setup.cpp +++ b/src/gui/webchannels_setup.cpp @@ -34,13 +34,13 @@ #include #include #include -#include "webtv_setup.h" +#include "webchannels_setup.h" #include #include #include -CWebTVSetup::CWebTVSetup() +CWebChannelsSetup::CWebChannelsSetup() { webradio = false; width = 55; @@ -49,16 +49,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; @@ -84,7 +84,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; @@ -145,7 +145,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; @@ -184,7 +184,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); @@ -250,7 +250,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(); @@ -286,7 +286,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; @@ -313,20 +313,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]; @@ -368,7 +368,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 @@ -376,7 +376,7 @@ void CWebTVSetup::webchannels_auto() } else { - printf("[CWebTVSetup] skipping: %s\n", webchannel_file); + printf("[CWebChannelsSetup] skipping: %s\n", webchannel_file); } } free(filelist[count]); @@ -387,20 +387,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 04dd9590a..4103d5f4e 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -101,7 +101,7 @@ #include "gui/videosettings.h" #include "gui/audio_select.h" #include -#include "gui/webtv_setup.h" //NI +#include "gui/webchannels_setup.h" #include "gui/widget/hintbox.h" #include "gui/widget/icons.h" @@ -853,9 +853,8 @@ int CNeutrinoApp::loadSetup(const char * fname) g_settings.webtv_xml.push_back(webtv_xml); } - //NI - 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(); @@ -880,7 +879,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(); @@ -1772,12 +1771,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); //NI 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++; @@ -1788,7 +1787,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 31d219380..cd6ae2194 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -3031,16 +3031,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 56ed2493b..41081e9a5 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -3031,16 +3031,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",