mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
- start_wizard: use a global enum; switch detection from bool to int
This commit is contained in:
@@ -52,7 +52,7 @@
|
|||||||
extern CAudioSetupNotifier * audioSetupNotifier;
|
extern CAudioSetupNotifier * audioSetupNotifier;
|
||||||
extern cAudio *audioDecoder;
|
extern cAudio *audioDecoder;
|
||||||
|
|
||||||
CAudioSetup::CAudioSetup(bool wizard_mode)
|
CAudioSetup::CAudioSetup(int wizard_mode)
|
||||||
{
|
{
|
||||||
is_wizard = wizard_mode;
|
is_wizard = wizard_mode;
|
||||||
|
|
||||||
@@ -255,13 +255,6 @@ int CAudioSetup::showAudioSetup()
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
//sets menu mode to "wizard" or "default"
|
|
||||||
void CAudioSetup::setWizardMode(bool mode)
|
|
||||||
{
|
|
||||||
printf("[neutrino audio setup] %s set audio settings menu to mode %d...\n", __FUNCTION__, mode);
|
|
||||||
is_wizard = mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
CTruVolumeNotifier::CTruVolumeNotifier(CMenuOptionChooser* o1, CMenuOptionChooser* o2, CMenuOptionNumberChooser *n1)
|
CTruVolumeNotifier::CTruVolumeNotifier(CMenuOptionChooser* o1, CMenuOptionChooser* o2, CMenuOptionNumberChooser *n1)
|
||||||
{
|
{
|
||||||
toDisable_oj[0]=o1;
|
toDisable_oj[0]=o1;
|
||||||
|
@@ -39,22 +39,15 @@ class CAudioSetup : public CMenuTarget
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int width, selected;
|
int width, selected;
|
||||||
bool is_wizard;
|
int is_wizard;
|
||||||
|
|
||||||
int showAudioSetup();
|
int showAudioSetup();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum AUDIO_SETUP_MODE
|
CAudioSetup(int wizard_mode = SNeutrinoSettings::WIZARD_OFF);
|
||||||
{
|
|
||||||
AUDIO_SETUP_MODE_WIZARD_NO = 0,
|
|
||||||
AUDIO_SETUP_MODE_WIZARD = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
CAudioSetup(bool wizard_mode = AUDIO_SETUP_MODE_WIZARD_NO);
|
|
||||||
~CAudioSetup();
|
~CAudioSetup();
|
||||||
|
|
||||||
bool getWizardMode() {return is_wizard;};
|
void setWizardMode(int mode) {is_wizard = mode;};
|
||||||
void setWizardMode(bool mode);
|
|
||||||
|
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||||
};
|
};
|
||||||
|
@@ -65,7 +65,7 @@
|
|||||||
|
|
||||||
extern int pinghost (const std::string &hostname, std::string *ip = NULL);
|
extern int pinghost (const std::string &hostname, std::string *ip = NULL);
|
||||||
|
|
||||||
CNetworkSetup::CNetworkSetup(bool wizard_mode)
|
CNetworkSetup::CNetworkSetup(int wizard_mode)
|
||||||
{
|
{
|
||||||
networkConfig = CNetworkConfig::getInstance();
|
networkConfig = CNetworkConfig::getInstance();
|
||||||
|
|
||||||
@@ -671,13 +671,6 @@ bool CNetworkSetup::changeNotify(const neutrino_locale_t locale, void * /*Data*/
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//sets menu mode to "wizard" or "default"
|
|
||||||
void CNetworkSetup::setWizardMode(bool mode)
|
|
||||||
{
|
|
||||||
printf("[neutrino network setup] %s set network settings menu to mode %d...\n", __FUNCTION__, mode);
|
|
||||||
is_wizard = mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CNetworkSetup::showCurrentNetworkSettings()
|
void CNetworkSetup::showCurrentNetworkSettings()
|
||||||
{
|
{
|
||||||
std::string ip, mask, broadcast, router, nameserver, text;
|
std::string ip, mask, broadcast, router, nameserver, text;
|
||||||
|
@@ -45,8 +45,7 @@ class CNetworkSetup : public CMenuTarget, CChangeObserver
|
|||||||
CNetworkConfig *networkConfig;
|
CNetworkConfig *networkConfig;
|
||||||
|
|
||||||
int width;
|
int width;
|
||||||
|
int is_wizard;
|
||||||
bool is_wizard;
|
|
||||||
|
|
||||||
int network_dhcp;
|
int network_dhcp;
|
||||||
int network_automatic_start;
|
int network_automatic_start;
|
||||||
@@ -117,19 +116,12 @@ class CNetworkSetup : public CMenuTarget, CChangeObserver
|
|||||||
NETWORK_NTP_ON = 1
|
NETWORK_NTP_ON = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
enum NETWORK_SETUP_MODE
|
CNetworkSetup(int wizard_mode = SNeutrinoSettings::WIZARD_OFF);
|
||||||
{
|
|
||||||
N_SETUP_MODE_WIZARD_NO = 0,
|
|
||||||
N_SETUP_MODE_WIZARD = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
CNetworkSetup(bool wizard_mode = N_SETUP_MODE_WIZARD_NO);
|
|
||||||
~CNetworkSetup();
|
~CNetworkSetup();
|
||||||
|
|
||||||
static CNetworkSetup* getInstance();
|
static CNetworkSetup* getInstance();
|
||||||
|
|
||||||
bool getWizardMode() {return is_wizard;};
|
void setWizardMode(int mode) {is_wizard = mode;};
|
||||||
void setWizardMode(bool mode);
|
|
||||||
|
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||||
virtual bool changeNotify(const neutrino_locale_t, void * Data);
|
virtual bool changeNotify(const neutrino_locale_t, void * Data);
|
||||||
|
@@ -67,7 +67,7 @@ extern CRemoteControl * g_RemoteControl;
|
|||||||
extern const char * locale_real_names[];
|
extern const char * locale_real_names[];
|
||||||
extern std::string ttx_font_file;
|
extern std::string ttx_font_file;
|
||||||
|
|
||||||
COsdSetup::COsdSetup(bool wizard_mode)
|
COsdSetup::COsdSetup(int wizard_mode)
|
||||||
{
|
{
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
colorSetupNotifier = new CColorSetupNotifier();
|
colorSetupNotifier = new CColorSetupNotifier();
|
||||||
|
@@ -59,7 +59,7 @@ class COsdSetup : public CMenuTarget, public CChangeObserver
|
|||||||
COnOffNotifier* infobarHddNotifier;
|
COnOffNotifier* infobarHddNotifier;
|
||||||
|
|
||||||
int width;
|
int width;
|
||||||
bool is_wizard;
|
int is_wizard;
|
||||||
int show_menu_hints;
|
int show_menu_hints;
|
||||||
int show_tuner_icon;
|
int show_tuner_icon;
|
||||||
|
|
||||||
@@ -95,13 +95,7 @@ class COsdSetup : public CMenuTarget, public CChangeObserver
|
|||||||
INFOBAR_LOGO_SHADED
|
INFOBAR_LOGO_SHADED
|
||||||
};
|
};
|
||||||
|
|
||||||
enum OSD_SETUP_MODE
|
COsdSetup(int wizard_mode = SNeutrinoSettings::WIZARD_OFF);
|
||||||
{
|
|
||||||
OSD_SETUP_MODE_WIZARD_NO = 0,
|
|
||||||
OSD_SETUP_MODE_WIZARD = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
COsdSetup(bool wizard_mode = OSD_SETUP_MODE_WIZARD_NO);
|
|
||||||
~COsdSetup();
|
~COsdSetup();
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||||
bool changeNotify(const neutrino_locale_t OptionName, void * /*data*/);
|
bool changeNotify(const neutrino_locale_t OptionName, void * /*data*/);
|
||||||
|
@@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
COsdLangSetup::COsdLangSetup(bool wizard_mode)
|
COsdLangSetup::COsdLangSetup(int wizard_mode)
|
||||||
{
|
{
|
||||||
is_wizard = wizard_mode;
|
is_wizard = wizard_mode;
|
||||||
|
|
||||||
|
@@ -52,8 +52,7 @@ class COsdLangSetup : public CMenuTarget, CChangeObserver
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int width;
|
int width;
|
||||||
|
int is_wizard;
|
||||||
bool is_wizard;
|
|
||||||
CTZChangeNotifier * tzNotifier;
|
CTZChangeNotifier * tzNotifier;
|
||||||
|
|
||||||
int showLocalSetup();
|
int showLocalSetup();
|
||||||
@@ -61,17 +60,10 @@ class COsdLangSetup : public CMenuTarget, CChangeObserver
|
|||||||
|
|
||||||
CMenuOptionStringChooser* getTzItems();
|
CMenuOptionStringChooser* getTzItems();
|
||||||
|
|
||||||
|
|
||||||
bool changeNotify(const neutrino_locale_t, void *);
|
bool changeNotify(const neutrino_locale_t, void *);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum OSDLANG_SETUP_MODE
|
COsdLangSetup(int wizard_mode = SNeutrinoSettings::WIZARD_OFF);
|
||||||
{
|
|
||||||
OSDLANG_SETUP_MODE_WIZARD_NO = 0,
|
|
||||||
OSDLANG_SETUP_MODE_WIZARD = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
COsdLangSetup(bool wizard_mode = OSDLANG_SETUP_MODE_WIZARD_NO);
|
|
||||||
~COsdLangSetup();
|
~COsdLangSetup();
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||||
void showLanguageSetup(CMenuWidget *osdl_setup);
|
void showLanguageSetup(CMenuWidget *osdl_setup);
|
||||||
|
@@ -314,7 +314,7 @@ const CMenuOptionChooser::keyval SATSETUP_FRONTEND_MODE[SATSETUP_FRONTEND_MODE_C
|
|||||||
{ CFrontend::FE_MODE_LINK_TWIN, LOCALE_SATSETUP_FE_MODE_LINK_TWIN },
|
{ CFrontend::FE_MODE_LINK_TWIN, LOCALE_SATSETUP_FE_MODE_LINK_TWIN },
|
||||||
};
|
};
|
||||||
|
|
||||||
CScanSetup::CScanSetup(bool wizard_mode)
|
CScanSetup::CScanSetup(int wizard_mode)
|
||||||
{
|
{
|
||||||
width = 40;
|
width = 40;
|
||||||
is_wizard = wizard_mode;
|
is_wizard = wizard_mode;
|
||||||
@@ -1762,13 +1762,6 @@ int CScanSetup::addListFlagsItems(CMenuWidget *listflags_menu, const int &shortc
|
|||||||
return shortCut;
|
return shortCut;
|
||||||
}
|
}
|
||||||
|
|
||||||
//sets menu mode to "wizard" or "default"
|
|
||||||
void CScanSetup::setWizardMode(bool mode)
|
|
||||||
{
|
|
||||||
printf("[neutrino] CScanSetup %s set scan-setup to mode %d...\n", __FUNCTION__, mode);
|
|
||||||
is_wizard = mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
//save current settings
|
//save current settings
|
||||||
void CScanSetup::saveScanSetup()
|
void CScanSetup::saveScanSetup()
|
||||||
{
|
{
|
||||||
|
@@ -89,7 +89,7 @@ class CScanSetup : public CMenuTarget, public CChangeObserver
|
|||||||
/* flag to skip manual params update while in menu */
|
/* flag to skip manual params update while in menu */
|
||||||
bool in_menu;
|
bool in_menu;
|
||||||
|
|
||||||
bool is_wizard;
|
int is_wizard;
|
||||||
|
|
||||||
int r_system;
|
int r_system;
|
||||||
|
|
||||||
@@ -124,20 +124,13 @@ class CScanSetup : public CMenuTarget, public CChangeObserver
|
|||||||
|
|
||||||
void saveScanSetup();
|
void saveScanSetup();
|
||||||
|
|
||||||
CScanSetup(bool wizard_mode = SCAN_SETUP_MODE_WIZARD_NO);
|
CScanSetup(int wizard_mode = SNeutrinoSettings::WIZARD_OFF);
|
||||||
public:
|
public:
|
||||||
enum SCAN_SETUP_MODE
|
|
||||||
{
|
|
||||||
SCAN_SETUP_MODE_WIZARD_NO = 0,
|
|
||||||
SCAN_SETUP_MODE_WIZARD = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
~CScanSetup();
|
~CScanSetup();
|
||||||
|
|
||||||
static CScanSetup* getInstance();
|
static CScanSetup* getInstance();
|
||||||
|
|
||||||
bool getWizardMode() {return is_wizard;};
|
void setWizardMode(int mode) {is_wizard = mode;};
|
||||||
void setWizardMode(bool mode);
|
|
||||||
void updateManualSettings();
|
void updateManualSettings();
|
||||||
|
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey = "");
|
int exec(CMenuTarget* parent, const std::string & actionKey = "");
|
||||||
|
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
CSettingsManager::CSettingsManager(bool wizard_mode)
|
CSettingsManager::CSettingsManager(int wizard_mode)
|
||||||
{
|
{
|
||||||
width = 40;
|
width = 40;
|
||||||
is_wizard = wizard_mode;
|
is_wizard = wizard_mode;
|
||||||
|
@@ -39,19 +39,13 @@ class CSettingsManager : public CMenuTarget
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int width;
|
int width;
|
||||||
bool is_wizard;
|
int is_wizard;
|
||||||
|
|
||||||
int showMenu();
|
int showMenu();
|
||||||
int showMenu_wizard();
|
int showMenu_wizard();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum SETTINGSMANAGER_MODE
|
CSettingsManager(int wizard_mode = SNeutrinoSettings::WIZARD_OFF);
|
||||||
{
|
|
||||||
SETTINGSMANAGER_MODE_WIZARD_NO = 0,
|
|
||||||
SETTINGSMANAGER_MODE_WIZARD = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
CSettingsManager(bool wizard_mode = SETTINGSMANAGER_MODE_WIZARD_NO);
|
|
||||||
~CSettingsManager();
|
~CSettingsManager();
|
||||||
|
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey = "");
|
int exec(CMenuTarget* parent, const std::string & actionKey = "");
|
||||||
|
@@ -81,18 +81,15 @@ int CStartUpWizard::exec(CMenuTarget* parent, const string & /*actionKey*/)
|
|||||||
if (parent)
|
if (parent)
|
||||||
parent->hide();
|
parent->hide();
|
||||||
|
|
||||||
COsdLangSetup languageSettings(COsdLangSetup::OSDLANG_SETUP_MODE_WIZARD);
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
languageSettings.exec(NULL, "");
|
|
||||||
#endif
|
|
||||||
//language setup
|
//language setup
|
||||||
|
COsdLangSetup languageSettings(SNeutrinoSettings::WIZARD_START);
|
||||||
CMenuWidget osdl_setup(LOCALE_LANGUAGESETUP_OSD, NEUTRINO_ICON_LANGUAGE, 45, MN_WIDGET_ID_LANGUAGESETUP_LOCALE);
|
CMenuWidget osdl_setup(LOCALE_LANGUAGESETUP_OSD, NEUTRINO_ICON_LANGUAGE, 45, MN_WIDGET_ID_LANGUAGESETUP_LOCALE);
|
||||||
osdl_setup.setWizardMode(true);
|
osdl_setup.setWizardMode(true);
|
||||||
languageSettings.showLanguageSetup(&osdl_setup);
|
languageSettings.showLanguageSetup(&osdl_setup);
|
||||||
osdl_setup.exec(NULL, "");
|
osdl_setup.exec(NULL, "");
|
||||||
|
|
||||||
CSettingsManager settingsManager(CSettingsManager::SETTINGSMANAGER_MODE_WIZARD);
|
//restore backup
|
||||||
|
CSettingsManager settingsManager(SNeutrinoSettings::WIZARD_START);
|
||||||
settingsManager.exec(NULL, "");
|
settingsManager.exec(NULL, "");
|
||||||
|
|
||||||
if(ShowMsg (LOCALE_WIZARD_WELCOME_HEAD, g_Locale->getText(LOCALE_WIZARD_WELCOME_TEXT), CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbrCancel) == CMessageBox::mbrYes)
|
if(ShowMsg (LOCALE_WIZARD_WELCOME_HEAD, g_Locale->getText(LOCALE_WIZARD_WELCOME_TEXT), CMessageBox::mbrYes, CMessageBox::mbYes | CMessageBox::mbrCancel) == CMessageBox::mbrYes)
|
||||||
@@ -103,7 +100,7 @@ int CStartUpWizard::exec(CMenuTarget* parent, const string & /*actionKey*/)
|
|||||||
if (lang == "nederlands") {
|
if (lang == "nederlands") {
|
||||||
advanced = 0;
|
advanced = 0;
|
||||||
CMenuWidget wtype(LOCALE_WIZARD_SETUP);
|
CMenuWidget wtype(LOCALE_WIZARD_SETUP);
|
||||||
wtype.setWizardMode(true);
|
wtype.setWizardMode(SNeutrinoSettings::WIZARD_ON);
|
||||||
wtype.addIntroItems();
|
wtype.addIntroItems();
|
||||||
CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_WIZARD_SETUP_TYPE, &advanced, WIZARD_SETUP_TYPE, 2, true, NULL);
|
CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_WIZARD_SETUP_TYPE, &advanced, WIZARD_SETUP_TYPE, 2, true, NULL);
|
||||||
mc->setHint("", LOCALE_WIZARD_SETUP_TYPE_HINT);
|
mc->setHint("", LOCALE_WIZARD_SETUP_TYPE_HINT);
|
||||||
@@ -113,20 +110,20 @@ int CStartUpWizard::exec(CMenuTarget* parent, const string & /*actionKey*/)
|
|||||||
#endif
|
#endif
|
||||||
//open video settings in wizardmode
|
//open video settings in wizardmode
|
||||||
if(advanced && res != menu_return::RETURN_EXIT_ALL) {
|
if(advanced && res != menu_return::RETURN_EXIT_ALL) {
|
||||||
g_videoSettings->setWizardMode(CVideoSettings::V_SETUP_MODE_WIZARD);
|
g_videoSettings->setWizardMode(SNeutrinoSettings::WIZARD_ON);
|
||||||
res = g_videoSettings->exec(NULL, "");
|
res = g_videoSettings->exec(NULL, "");
|
||||||
g_videoSettings->setWizardMode(CVideoSettings::V_SETUP_MODE_WIZARD_NO);
|
g_videoSettings->setWizardMode(SNeutrinoSettings::WIZARD_OFF);
|
||||||
}
|
}
|
||||||
if(!g_settings.easymenu && advanced && res != menu_return::RETURN_EXIT_ALL)
|
if(!g_settings.easymenu && advanced && res != menu_return::RETURN_EXIT_ALL)
|
||||||
{
|
{
|
||||||
COsdSetup osdSettings(COsdSetup::OSD_SETUP_MODE_WIZARD);
|
COsdSetup osdSettings(SNeutrinoSettings::WIZARD_ON);
|
||||||
res = osdSettings.exec(NULL, "");
|
res = osdSettings.exec(NULL, "");
|
||||||
}
|
}
|
||||||
if(advanced && res != menu_return::RETURN_EXIT_ALL)
|
if(advanced && res != menu_return::RETURN_EXIT_ALL)
|
||||||
{
|
{
|
||||||
CNetworkSetup::getInstance()->setWizardMode(CNetworkSetup::N_SETUP_MODE_WIZARD);
|
CNetworkSetup::getInstance()->setWizardMode(SNeutrinoSettings::WIZARD_ON);
|
||||||
res = CNetworkSetup::getInstance()->exec(NULL, "");
|
res = CNetworkSetup::getInstance()->exec(NULL, "");
|
||||||
CNetworkSetup::getInstance()->setWizardMode(CNetworkSetup::N_SETUP_MODE_WIZARD_NO);
|
CNetworkSetup::getInstance()->setWizardMode(SNeutrinoSettings::WIZARD_OFF);
|
||||||
}
|
}
|
||||||
bool init_settings = false;
|
bool init_settings = false;
|
||||||
if (CFEManager::getInstance()->haveSat())
|
if (CFEManager::getInstance()->haveSat())
|
||||||
@@ -144,7 +141,7 @@ int CStartUpWizard::exec(CMenuTarget* parent, const string & /*actionKey*/)
|
|||||||
}
|
}
|
||||||
if(res != menu_return::RETURN_EXIT_ALL)
|
if(res != menu_return::RETURN_EXIT_ALL)
|
||||||
{
|
{
|
||||||
CScanSetup::getInstance()->setWizardMode(CScanSetup::SCAN_SETUP_MODE_WIZARD);
|
CScanSetup::getInstance()->setWizardMode(SNeutrinoSettings::WIZARD_ON);
|
||||||
if (advanced) {
|
if (advanced) {
|
||||||
res = CScanSetup::getInstance()->exec(NULL, "setup_frontend");
|
res = CScanSetup::getInstance()->exec(NULL, "setup_frontend");
|
||||||
if(res != menu_return::RETURN_EXIT_ALL)
|
if(res != menu_return::RETURN_EXIT_ALL)
|
||||||
@@ -154,19 +151,19 @@ int CStartUpWizard::exec(CMenuTarget* parent, const string & /*actionKey*/)
|
|||||||
#ifdef ENABLE_FASTSCAN
|
#ifdef ENABLE_FASTSCAN
|
||||||
if (CFEManager::getInstance()->haveSat()) {
|
if (CFEManager::getInstance()->haveSat()) {
|
||||||
CMenuWidget fastScanMenu(LOCALE_SATSETUP_FASTSCAN_HEAD, NEUTRINO_ICON_SETTINGS, 45, MN_WIDGET_ID_SCAN_FAST_SCAN);
|
CMenuWidget fastScanMenu(LOCALE_SATSETUP_FASTSCAN_HEAD, NEUTRINO_ICON_SETTINGS, 45, MN_WIDGET_ID_SCAN_FAST_SCAN);
|
||||||
fastScanMenu.setWizardMode(true);
|
fastScanMenu.setWizardMode(SNeutrinoSettings::WIZARD_ON);
|
||||||
CScanSetup::getInstance()->addScanMenuFastScan(&fastScanMenu);
|
CScanSetup::getInstance()->addScanMenuFastScan(&fastScanMenu);
|
||||||
res = fastScanMenu.exec(NULL, "");
|
res = fastScanMenu.exec(NULL, "");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (CFEManager::getInstance()->haveCable()) {
|
if (CFEManager::getInstance()->haveCable()) {
|
||||||
CMenuWidget cableScan(LOCALE_SATSETUP_CABLE, NEUTRINO_ICON_SETTINGS, 45, MN_WIDGET_ID_SCAN_CABLE_SCAN);
|
CMenuWidget cableScan(LOCALE_SATSETUP_CABLE, NEUTRINO_ICON_SETTINGS, 45, MN_WIDGET_ID_SCAN_CABLE_SCAN);
|
||||||
cableScan.setWizardMode(true);
|
cableScan.setWizardMode(SNeutrinoSettings::WIZARD_ON);
|
||||||
CScanSetup::getInstance()->addScanMenuCable(&cableScan);
|
CScanSetup::getInstance()->addScanMenuCable(&cableScan);
|
||||||
res = cableScan.exec(NULL, "");
|
res = cableScan.exec(NULL, "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CScanSetup::getInstance()->setWizardMode(CScanSetup::SCAN_SETUP_MODE_WIZARD_NO);
|
CScanSetup::getInstance()->setWizardMode(SNeutrinoSettings::WIZARD_OFF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -65,7 +65,7 @@ extern cVideo *pipDecoder;
|
|||||||
extern int prev_video_mode;
|
extern int prev_video_mode;
|
||||||
extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
|
extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
|
||||||
|
|
||||||
CVideoSettings::CVideoSettings(bool wizard_mode)
|
CVideoSettings::CVideoSettings(int wizard_mode)
|
||||||
{
|
{
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
|
|
||||||
@@ -616,10 +616,3 @@ void CVideoSettings::nextMode(void)
|
|||||||
CVFD::getInstance()->showServicename(g_RemoteControl->getCurrentChannelName(), g_RemoteControl->getCurrentChannelNumber());
|
CVFD::getInstance()->showServicename(g_RemoteControl->getCurrentChannelName(), g_RemoteControl->getCurrentChannelNumber());
|
||||||
//ShowHint(LOCALE_VIDEOMENU_VIDEOMODE, text, 450, 2);
|
//ShowHint(LOCALE_VIDEOMENU_VIDEOMODE, text, 450, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
//sets menu mode to "wizard" or "default"
|
|
||||||
void CVideoSettings::setWizardMode(bool mode)
|
|
||||||
{
|
|
||||||
printf("[neutrino VideoSettings] %s set video settings menu to mode %d...\n", __FUNCTION__, mode);
|
|
||||||
is_wizard = mode;
|
|
||||||
}
|
|
||||||
|
@@ -45,19 +45,13 @@ class CVideoSettings : public CMenuWidget, CChangeObserver
|
|||||||
int vcr_video_out_signal;
|
int vcr_video_out_signal;
|
||||||
int prev_video_mode;
|
int prev_video_mode;
|
||||||
|
|
||||||
bool is_wizard;
|
int is_wizard;
|
||||||
|
|
||||||
int width, selected;
|
int width, selected;
|
||||||
int showVideoSetup();
|
int showVideoSetup();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum VIDEO_SETUP_MODE
|
CVideoSettings(int wizard_mode = SNeutrinoSettings::WIZARD_OFF);
|
||||||
{
|
|
||||||
V_SETUP_MODE_WIZARD_NO = 0,
|
|
||||||
V_SETUP_MODE_WIZARD = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
CVideoSettings(bool wizard_mode = V_SETUP_MODE_WIZARD_NO);
|
|
||||||
~CVideoSettings();
|
~CVideoSettings();
|
||||||
|
|
||||||
virtual bool changeNotify(const neutrino_locale_t OptionName, void *data);
|
virtual bool changeNotify(const neutrino_locale_t OptionName, void *data);
|
||||||
@@ -69,8 +63,7 @@ public:
|
|||||||
void setVideoSettings();
|
void setVideoSettings();
|
||||||
void setupVideoSystem(bool do_ask);
|
void setupVideoSystem(bool do_ask);
|
||||||
|
|
||||||
bool getWizardMode() {return is_wizard;};
|
void setWizardMode(int mode) {is_wizard = mode;};
|
||||||
void setWizardMode(bool mode);
|
|
||||||
|
|
||||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||||
};
|
};
|
||||||
|
@@ -493,7 +493,7 @@ CMenuWidget::CMenuWidget()
|
|||||||
selected = -1;
|
selected = -1;
|
||||||
iconOffset = 0;
|
iconOffset = 0;
|
||||||
offx = offy = 0;
|
offx = offy = 0;
|
||||||
from_wizard = false;
|
from_wizard = SNeutrinoSettings::WIZARD_OFF;
|
||||||
fade = true;
|
fade = true;
|
||||||
sb_width = 0;
|
sb_width = 0;
|
||||||
savescreen = false;
|
savescreen = false;
|
||||||
@@ -562,7 +562,7 @@ void CMenuWidget::Init(const std::string &Icon, const int mwidth, const mn_widge
|
|||||||
|
|
||||||
current_page = 0;
|
current_page = 0;
|
||||||
offx = offy = 0;
|
offx = offy = 0;
|
||||||
from_wizard = false;
|
from_wizard = SNeutrinoSettings::WIZARD_OFF;
|
||||||
fade = true;
|
fade = true;
|
||||||
savescreen = false;
|
savescreen = false;
|
||||||
background = NULL;
|
background = NULL;
|
||||||
|
@@ -528,7 +528,7 @@ class CMenuWidget : public CMenuTarget
|
|||||||
unsigned int current_page;
|
unsigned int current_page;
|
||||||
unsigned int total_pages;
|
unsigned int total_pages;
|
||||||
bool exit_pressed;
|
bool exit_pressed;
|
||||||
bool from_wizard;
|
int from_wizard;
|
||||||
bool fade;
|
bool fade;
|
||||||
bool washidden;
|
bool washidden;
|
||||||
int nextShortcut;
|
int nextShortcut;
|
||||||
@@ -574,7 +574,7 @@ class CMenuWidget : public CMenuTarget
|
|||||||
int getSelected()const { return selected; };
|
int getSelected()const { return selected; };
|
||||||
void move(int xoff, int yoff);
|
void move(int xoff, int yoff);
|
||||||
int getSelectedLine(void)const {return exit_pressed ? -1 : selected;};
|
int getSelectedLine(void)const {return exit_pressed ? -1 : selected;};
|
||||||
void setWizardMode(bool _from_wizard) { from_wizard = _from_wizard;};
|
void setWizardMode(int _from_wizard) { from_wizard = _from_wizard;};
|
||||||
void enableFade(bool _enable) { fade = _enable; };
|
void enableFade(bool _enable) { fade = _enable; };
|
||||||
void enableSaveScreen(bool enable);
|
void enableSaveScreen(bool enable);
|
||||||
void paintHint(int num);
|
void paintHint(int num);
|
||||||
|
@@ -764,6 +764,12 @@ struct SNeutrinoSettings
|
|||||||
INFOBAR_PROGRESSBAR_ARRANGEMENT_BETWEEN_EVENTS = 3
|
INFOBAR_PROGRESSBAR_ARRANGEMENT_BETWEEN_EVENTS = 3
|
||||||
}INFOBAR_PROGRESSBAR_ARRANGEMENT_TYPES;
|
}INFOBAR_PROGRESSBAR_ARRANGEMENT_TYPES;
|
||||||
|
|
||||||
|
enum WIZARD_MODES
|
||||||
|
{
|
||||||
|
WIZARD_OFF = 0,
|
||||||
|
WIZARD_START = 1,
|
||||||
|
WIZARD_ON = 2
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/* some default Values */
|
/* some default Values */
|
||||||
|
Reference in New Issue
Block a user