scan_setup: add option to set frontend type to multinorm boxes

Origin commit data
------------------
Branch: ni/coolstream
Commit: 29a23bffb6
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-02-24 (Sun, 24 Feb 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-02-24 01:45:38 +01:00
parent 9ec5e55bf7
commit dcfdd25fd7
5 changed files with 56 additions and 0 deletions

View File

@@ -769,6 +769,7 @@ menu.hint_extended Energiespar-, EPG-Speicher- / Lade-Optionen,\nHDMI-CEC, Start
menu.hint_factory Zurücksetzen der Box auf Werkseinstellungen\nBox wird nach einem Reset neu gestartet
menu.hint_fade Bei aktivierter Funktion werden die Menüfenster\n'weich' ein- bzw. ausgeblendet
menu.hint_fan_speed Steuerung der Lüftergeschwindigkeit für die CPU
menu.hint_fe_type Ändert die Empfangsart\n(Neustart notwendig)
menu.hint_filebrowser_denydirectoryleave Verhindert das Verlassen des Startverzeichnisses
menu.hint_filebrowser_showrights Anzeige der Dateirechte der Dateien im Filebrowser
menu.hint_fileplay Spielen Sie verschiedene Video-Dateien
@@ -1571,6 +1572,8 @@ satsetup.fe_mode_loop loop
satsetup.fe_mode_single single
satsetup.fe_mode_twin twin
satsetup.fe_setup Setup Tuner
satsetup.fe_type Tunertyp wechseln
satsetup.fe_type_confirm Um die Empfangsart zu wechseln, muss neutrino\nneu gestartet werden. Jetzt neu starten?
satsetup.lofh LNB High Offset
satsetup.lofl LNB Low Offset
satsetup.lofs LNB Switch Offset

View File

@@ -769,6 +769,7 @@ menu.hint_extended Power saving, EPG save/load options\nHDMI-CEC, Start channel,
menu.hint_factory Reset box to factory state\nBox will reboot after reset
menu.hint_fade Fade GUI windows
menu.hint_fan_speed Control fan speed
menu.hint_fe_type Changes tuner type (restart needed)
menu.hint_filebrowser_denydirectoryleave Deny filebrowser to leave initial directory
menu.hint_filebrowser_showrights Show file permissions in file browser
menu.hint_fileplay Play various video files
@@ -1571,6 +1572,8 @@ satsetup.fe_mode_loop loop
satsetup.fe_mode_single single
satsetup.fe_mode_twin twin
satsetup.fe_setup Setup tuner
satsetup.fe_type Change tuner type
satsetup.fe_type_confirm To change the reception type, a restart\nof neutrino is necessary. Restart now?
satsetup.lofh LNB High Offset
satsetup.lofl LNB Low Offset
satsetup.lofs LNB switch Offset

View File

@@ -45,6 +45,7 @@
#include <gui/bedit/bouqueteditor_bouquets.h>
#include <gui/widget/hintbox.h>
#include <gui/widget/messagebox.h>
#include <gui/widget/stringinput.h>
#include <driver/screen_max.h>
@@ -207,6 +208,14 @@ const CMenuOptionChooser::keyval SATSETUP_FRONTEND_MODE[SATSETUP_FRONTEND_MODE_C
{ CFEManager::FE_MODE_ALONE, LOCALE_SATSETUP_FE_MODE_ALONE }
};
#define SATSETUP_FRONTEND_TYPE_COUNT 3
const CMenuOptionChooser::keyval_ext SATSETUP_FRONTEND_TYPE[SATSETUP_FRONTEND_TYPE_COUNT] =
{
{ FE_QPSK, NONEXISTANT_LOCALE, "DVB-S" },
{ FE_QAM, NONEXISTANT_LOCALE, "DVB-C" },
{ FE_OFDM, NONEXISTANT_LOCALE, "DVB-T" }
};
CScanSetup::CScanSetup(bool wizard_mode)
{
width = w_max (40, 10);
@@ -364,6 +373,8 @@ int CScanSetup::showScanMenu()
{
printf("[neutrino] CScanSetup call %s...\n", __FUNCTION__);
int shortcut = 1;
CMenuOptionChooser::keyval_ext key[SATSETUP_FRONTEND_TYPE_COUNT];
fe_type_t fetype = CFEManager::getInstance()->getFE(0)->getInfo()->type;
CMenuForwarder * mf;
CMenuOptionChooser * mc;
@@ -424,11 +435,33 @@ int CScanSetup::showScanMenu()
if(CFEManager::getInstance()->getFrontendCount() > 1) {
femode = CFEManager::getInstance()->getMode();
mc = new CMenuOptionChooser(LOCALE_SATSETUP_FE_MODE, (int *)&femode, SATSETUP_FRONTEND_MODE, 2, true, this);
mc = new CMenuOptionChooser(LOCALE_SCANTS_BOUQUET, (int *)&scansettings.bouquetMode, SCANTS_BOUQUET_OPTIONS, SCANTS_BOUQUET_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true);
mc->setHint("", LOCALE_MENU_HINT_SCAN_FEMODE);
settings->addItem(mc);
}
nid = new CIntInput(LOCALE_SATSETUP_CABLE_NID, (int&) scansettings.cable_nid, 5, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE);
}
fe_type_list_t other_fe = CFEManager::getInstance()->getOtherFE();
if (! other_fe.empty())
{
int i = 0;
for (int j = 0; j < SATSETUP_FRONTEND_TYPE_COUNT; j++)
{
if ((fe_type_t)SATSETUP_FRONTEND_TYPE[j].key != fetype &&
other_fe.find((fe_type_t)SATSETUP_FRONTEND_TYPE[j].key) == other_fe.end())
continue;
key[i] = SATSETUP_FRONTEND_TYPE[j];
i++;
}
if (i > 0) {
mc = new CMenuOptionChooser(LOCALE_SATSETUP_FE_TYPE, (int *)&fetype, key, i, true, this, CRCInput::RC_nokey, "", true);
mc->setHint("", LOCALE_MENU_HINT_FE_TYPE);
settings->addItem(mc);
}
}
//--------------------------------------------------------------
settings->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_SCANTS_PREVERENCES_SCAN));
//--------------------------------------------------------------
@@ -482,6 +515,17 @@ int CScanSetup::showScanMenu()
int res = settings->exec(NULL, "");
if (fetype != CFEManager::getInstance()->getFE(0)->getInfo()->type)
{
int result = ShowLocalizedMessage(LOCALE_SATSETUP_FE_TYPE, LOCALE_SATSETUP_FE_TYPE_CONFIRM, CMessageBox::mbrNo, CMessageBox::mbYes|CMessageBox::mbNo);
if (result == CMessageBox::mbrYes)
{
CFEManager::getInstance()->setFrontendType(fetype);
CFEManager::getInstance()->saveSettings(true);
CNeutrinoApp::getInstance()->exec(NULL, "restart");
}
}
//delete satSelect;
delete satOnOff;
delete settings;

View File

@@ -796,6 +796,7 @@ typedef enum
LOCALE_MENU_HINT_FACTORY,
LOCALE_MENU_HINT_FADE,
LOCALE_MENU_HINT_FAN_SPEED,
LOCALE_MENU_HINT_FE_TYPE,
LOCALE_MENU_HINT_FILEBROWSER_DENYDIRECTORYLEAVE,
LOCALE_MENU_HINT_FILEBROWSER_SHOWRIGHTS,
LOCALE_MENU_HINT_FILEPLAY,
@@ -1598,6 +1599,8 @@ typedef enum
LOCALE_SATSETUP_FE_MODE_SINGLE,
LOCALE_SATSETUP_FE_MODE_TWIN,
LOCALE_SATSETUP_FE_SETUP,
LOCALE_SATSETUP_FE_TYPE,
LOCALE_SATSETUP_FE_TYPE_CONFIRM,
LOCALE_SATSETUP_LOFH,
LOCALE_SATSETUP_LOFL,
LOCALE_SATSETUP_LOFS,

View File

@@ -796,6 +796,7 @@ const char * locale_real_names[] =
"menu.hint_factory",
"menu.hint_fade",
"menu.hint_fan_speed",
"menu.hint_fe_type",
"menu.hint_filebrowser_denydirectoryleave",
"menu.hint_filebrowser_showrights",
"menu.hint_fileplay",
@@ -1598,6 +1599,8 @@ const char * locale_real_names[] =
"satsetup.fe_mode_single",
"satsetup.fe_mode_twin",
"satsetup.fe_setup",
"satsetup.fe_type",
"satsetup.fe_type_confirm",
"satsetup.lofh",
"satsetup.lofl",
"satsetup.lofs",