webtv-setup: add possibility to enter webtv-file manually

Origin commit data
------------------
Commit: 235ee5c479
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-09-21 (Fri, 21 Sep 2018)

Origin message was:
------------------
- webtv-setup: add possibility to enter webtv-file manually
This commit is contained in:
vanhofen
2018-09-21 00:05:28 +02:00
parent e8646e73d2
commit 7bc7727844
5 changed files with 33 additions and 11 deletions

View File

@@ -2804,10 +2804,11 @@ videomenu.videoformat_43 4:3
videomenu.videomode Videosystem
webtv.head WebTV
webtv.xml WebTV-Dateien
webtv.xml.add WebTV-Datei hinzufügen
webtv.xml.add Hinzufügen
webtv.xml.auto WebTV-Dateien automatisch laden
webtv.xml.del WebTV-Datei entfernen
webtv.xml.reload WebTV-Dateien neu 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?

View File

@@ -2804,10 +2804,11 @@ videomenu.videoformat_43 4:3
videomenu.videomode Digital video mode
webtv.head WebTV
webtv.xml WebTV files
webtv.xml.add Add WebTV file
webtv.xml.add Add
webtv.xml.auto Auto-load WebTV files
webtv.xml.del Remove WebTV file
webtv.xml.reload Reload 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?

View File

@@ -31,6 +31,7 @@
#include <driver/framebuffer.h>
#include <gui/movieplayer.h>
#include <gui/widget/hintbox.h>
#include <gui/widget/keyboard_input.h>
#include <zapit/zapit.h>
#include <neutrino_menue.h>
#include "webtv_setup.h"
@@ -60,11 +61,13 @@ const CMenuOptionChooser::keyval_ext LIVESTREAM_RESOLUTION_OPTIONS[] =
};
#define LIVESTREAM_RESOLUTION_OPTION_COUNT (sizeof(LIVESTREAM_RESOLUTION_OPTIONS)/sizeof(CMenuOptionChooser::keyval_ext))
#define CWebTVSetupFooterButtonCount 3 //NI
static const struct button_label CWebTVSetupFooterButtons[CWebTVSetupFooterButtonCount] = {
#define CWebTVSetupFooterButtonCount 4
static const struct button_label CWebTVSetupFooterButtons[CWebTVSetupFooterButtonCount] =
{
{ NEUTRINO_ICON_BUTTON_RED, LOCALE_WEBTV_XML_DEL },
{ NEUTRINO_ICON_BUTTON_GREEN, LOCALE_WEBTV_XML_ADD },
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_WEBTV_XML_RELOAD } //NI
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_WEBTV_XML_ENTER },
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_WEBTV_XML_RELOAD }
};
int CWebTVSetup::exec(CMenuTarget* parent, const std::string & actionKey)
@@ -115,7 +118,21 @@ int CWebTVSetup::exec(CMenuTarget* parent, const std::string & actionKey)
}
return res;
}
//NI
if (actionKey == "e" /* enter */) {
std::string tpl = "http://xxx.xxx.xxx.xxx/control/xmltv.m3u";
std::string entry = tpl;
CKeyboardInput *e = new CKeyboardInput(LOCALE_WEBTV_XML_ENTER, &entry, 50);
e->exec(this, "");
delete e;
if (entry.compare(tpl) != 0)
{
m->addItem(new CMenuForwarder(entry, true, NULL, this, "c"));
changed = true;
}
return res;
}
if(actionKey == "r" /* reload */) {
changed = true;
return menu_return::RETURN_EXIT_ALL;
@@ -141,7 +158,8 @@ int CWebTVSetup::Show()
m = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_STREAMING, width, MN_WIDGET_ID_WEBTVSETUP);
m->addKey(CRCInput::RC_red, this, "d");
m->addKey(CRCInput::RC_green, this, "a");
m->addKey(CRCInput::RC_blue, this, "r"); //NI
m->addKey(CRCInput::RC_yellow, this, "e");
m->addKey(CRCInput::RC_blue, this, "r");
m->addIntroItems(LOCALE_WEBTV_HEAD, LOCALE_LIVESTREAM_HEAD);

View File

@@ -2834,6 +2834,7 @@ typedef enum
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,

View File

@@ -2834,6 +2834,7 @@ const char * locale_real_names[] =
"webtv.xml.add",
"webtv.xml.auto",
"webtv.xml.del",
"webtv.xml.enter",
"webtv.xml.reload",
"window_size",
"wizard.initial_settings",