mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
gui/miscsettings_menu.cpp: move epg scan OFF option to epg mode,
reorder epg settings, add separators
Origin commit data
------------------
Branch: ni/coolstream
Commit: 0c22682df3
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-05-14 (Wed, 14 May 2014)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -860,8 +860,8 @@ menu.hint_epg_max_events Maximum events to cache. After reaching limit\nEPG cach
|
|||||||
menu.hint_epg_old_events Hours after event end time to consider\nevent old and remove it from cache
|
menu.hint_epg_old_events Hours after event end time to consider\nevent old and remove it from cache
|
||||||
menu.hint_epg_save Save cached EPG to harddisk or usb flash\nand load it after boot
|
menu.hint_epg_save Save cached EPG to harddisk or usb flash\nand load it after boot
|
||||||
menu.hint_epg_save_standby Save EPG on soft standby mode
|
menu.hint_epg_save_standby Save EPG on soft standby mode
|
||||||
menu.hint_epg_scan Enable background epg scan using free tuner,\ncurrent bouquet or all favorites
|
menu.hint_epg_scan Select bouquets to scan epg, current on zap,\nall or selected favorites
|
||||||
menu.hint_epg_scan_mode Select box state to run epg scan
|
menu.hint_epg_scan_mode Enable background epg scan using free tuner
|
||||||
menu.hint_event_textcolor Change event color for colored-event options\nin channel list and infobar
|
menu.hint_event_textcolor Change event color for colored-event options\nin channel list and infobar
|
||||||
menu.hint_eventlist_additional Show additional informations\nin main box
|
menu.hint_eventlist_additional Show additional informations\nin main box
|
||||||
menu.hint_eventlist_fonts Change event list font sizes
|
menu.hint_eventlist_fonts Change event list font sizes
|
||||||
@@ -1276,10 +1276,11 @@ miscsettings.epg_old_events_hint1 How long will EPG-Data be stored after they ti
|
|||||||
miscsettings.epg_old_events_hint2 Set in hours
|
miscsettings.epg_old_events_hint2 Set in hours
|
||||||
miscsettings.epg_save Save/Restore epg on reboot
|
miscsettings.epg_save Save/Restore epg on reboot
|
||||||
miscsettings.epg_save_standby Save epg on soft standby
|
miscsettings.epg_save_standby Save epg on soft standby
|
||||||
miscsettings.epg_scan EPG scan
|
miscsettings.epg_scan EPG scan mode
|
||||||
miscsettings.epg_scan_always Always
|
miscsettings.epg_scan_always Always
|
||||||
miscsettings.epg_scan_bq bouquet
|
miscsettings.epg_scan_bouquets EPG scan bouquets
|
||||||
miscsettings.epg_scan_fav favorites
|
miscsettings.epg_scan_bq Current
|
||||||
|
miscsettings.epg_scan_fav Favorites
|
||||||
miscsettings.epg_scan_live Live
|
miscsettings.epg_scan_live Live
|
||||||
miscsettings.epg_scan_sel Selected
|
miscsettings.epg_scan_sel Selected
|
||||||
miscsettings.epg_scan_standby Standby
|
miscsettings.epg_scan_standby Standby
|
||||||
|
@@ -172,14 +172,14 @@ void CEpgScan::AddTransponders()
|
|||||||
AddBouquet(bouquetList->Bouquets[current_bnum]->channelList);
|
AddBouquet(bouquetList->Bouquets[current_bnum]->channelList);
|
||||||
INFO("Added bouquet #%d, scan map size: %d", current_bnum, scanmap.size());
|
INFO("Added bouquet #%d, scan map size: %d", current_bnum, scanmap.size());
|
||||||
}
|
}
|
||||||
} else {
|
} else if (g_settings.epg_scan == SCAN_FAV) {
|
||||||
AddFavorites();
|
AddFavorites();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CEpgScan::CheckMode()
|
bool CEpgScan::CheckMode()
|
||||||
{
|
{
|
||||||
if (!g_settings.epg_scan
|
if ((g_settings.epg_scan_mode == CEpgScan::MODE_OFF)
|
||||||
|| (standby && !(g_settings.epg_scan_mode & MODE_STANDBY))
|
|| (standby && !(g_settings.epg_scan_mode & MODE_STANDBY))
|
||||||
|| (!standby && !(g_settings.epg_scan_mode & MODE_LIVE))
|
|| (!standby && !(g_settings.epg_scan_mode & MODE_LIVE))
|
||||||
|| (!standby && (CFEManager::getInstance()->getEnabledCount() <= 1))) {
|
|| (!standby && (CFEManager::getInstance()->getEnabledCount() <= 1))) {
|
||||||
@@ -201,7 +201,7 @@ void CEpgScan::Start(bool instandby)
|
|||||||
|
|
||||||
void CEpgScan::Stop()
|
void CEpgScan::Stop()
|
||||||
{
|
{
|
||||||
if (!g_settings.epg_scan)
|
if (g_settings.epg_scan_mode == CEpgScan::MODE_OFF)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
INFO("stopping %s scan...", standby ? "standby" : "live");
|
INFO("stopping %s scan...", standby ? "standby" : "live");
|
||||||
@@ -306,12 +306,7 @@ void CEpgScan::Next()
|
|||||||
bool locked = false;
|
bool locked = false;
|
||||||
|
|
||||||
next_chid = 0;
|
next_chid = 0;
|
||||||
#if 0
|
|
||||||
if (!g_settings.epg_scan)
|
|
||||||
return;
|
|
||||||
if (!CheckMode())
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
if (!standby && CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_standby)
|
if (!standby && CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_standby)
|
||||||
return;
|
return;
|
||||||
if (CRecordManager::getInstance()->RecordingStatus() || CStreamManager::getInstance()->StreamStatus())
|
if (CRecordManager::getInstance()->RecordingStatus() || CStreamManager::getInstance()->StreamStatus())
|
||||||
|
@@ -36,6 +36,7 @@ class CEpgScan
|
|||||||
SCAN_SEL
|
SCAN_SEL
|
||||||
};
|
};
|
||||||
enum {
|
enum {
|
||||||
|
MODE_OFF = 0,
|
||||||
MODE_LIVE = 0x1,
|
MODE_LIVE = 0x1,
|
||||||
MODE_STANDBY = 0x2,
|
MODE_STANDBY = 0x2,
|
||||||
MODE_ALWAYS = 0x3
|
MODE_ALWAYS = 0x3
|
||||||
|
@@ -204,7 +204,6 @@ const CMenuOptionChooser::keyval_ext CPU_FREQ_OPTIONS[CPU_FREQ_OPTION_COUNT] =
|
|||||||
|
|
||||||
const CMenuOptionChooser::keyval EPG_SCAN_OPTIONS[] =
|
const CMenuOptionChooser::keyval EPG_SCAN_OPTIONS[] =
|
||||||
{
|
{
|
||||||
{ CEpgScan::SCAN_OFF, LOCALE_OPTIONS_OFF },
|
|
||||||
{ CEpgScan::SCAN_CURRENT, LOCALE_MISCSETTINGS_EPG_SCAN_BQ },
|
{ CEpgScan::SCAN_CURRENT, LOCALE_MISCSETTINGS_EPG_SCAN_BQ },
|
||||||
{ CEpgScan::SCAN_FAV, LOCALE_MISCSETTINGS_EPG_SCAN_FAV },
|
{ CEpgScan::SCAN_FAV, LOCALE_MISCSETTINGS_EPG_SCAN_FAV },
|
||||||
{ CEpgScan::SCAN_SEL, LOCALE_MISCSETTINGS_EPG_SCAN_SEL },
|
{ CEpgScan::SCAN_SEL, LOCALE_MISCSETTINGS_EPG_SCAN_SEL },
|
||||||
@@ -213,8 +212,9 @@ const CMenuOptionChooser::keyval EPG_SCAN_OPTIONS[] =
|
|||||||
|
|
||||||
const CMenuOptionChooser::keyval EPG_SCAN_MODE_OPTIONS[] =
|
const CMenuOptionChooser::keyval EPG_SCAN_MODE_OPTIONS[] =
|
||||||
{
|
{
|
||||||
{ CEpgScan::MODE_LIVE, LOCALE_MISCSETTINGS_EPG_SCAN_LIVE },
|
{ CEpgScan::MODE_OFF, LOCALE_OPTIONS_OFF },
|
||||||
{ CEpgScan::MODE_STANDBY, LOCALE_MISCSETTINGS_EPG_SCAN_STANDBY },
|
{ CEpgScan::MODE_STANDBY, LOCALE_MISCSETTINGS_EPG_SCAN_STANDBY },
|
||||||
|
{ CEpgScan::MODE_LIVE, LOCALE_MISCSETTINGS_EPG_SCAN_LIVE },
|
||||||
{ CEpgScan::MODE_ALWAYS, LOCALE_MISCSETTINGS_EPG_SCAN_ALWAYS }
|
{ CEpgScan::MODE_ALWAYS, LOCALE_MISCSETTINGS_EPG_SCAN_ALWAYS }
|
||||||
};
|
};
|
||||||
#define EPG_SCAN_MODE_OPTION_COUNT (sizeof(EPG_SCAN_MODE_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
|
#define EPG_SCAN_MODE_OPTION_COUNT (sizeof(EPG_SCAN_MODE_OPTIONS)/sizeof(CMenuOptionChooser::keyval))
|
||||||
@@ -309,6 +309,7 @@ int CMiscMenue::showMiscSettingsMenu()
|
|||||||
delete miscNotifier;
|
delete miscNotifier;
|
||||||
#endif
|
#endif
|
||||||
delete miscEpgNotifier;
|
delete miscEpgNotifier;
|
||||||
|
delete miscEpgScanNotifier;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -461,32 +462,33 @@ void CMiscMenue::showMiscSettingsMenuEpg(CMenuWidget *ms_epg)
|
|||||||
|
|
||||||
miscEpgNotifier = new COnOffNotifier();
|
miscEpgNotifier = new COnOffNotifier();
|
||||||
miscEpgNotifier->addItem(mc1);
|
miscEpgNotifier->addItem(mc1);
|
||||||
//miscEpgNotifier->addItem(mf);
|
|
||||||
//miscEpgNotifier->addItem(mf1);
|
|
||||||
//miscEpgNotifier->addItem(mf2);
|
|
||||||
//miscEpgNotifier->addItem(mf3);
|
|
||||||
miscEpgNotifier->addItem(mf4);
|
miscEpgNotifier->addItem(mf4);
|
||||||
|
|
||||||
CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE, &g_settings.epg_save, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true,miscEpgNotifier);
|
CMenuOptionChooser * mc = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE, &g_settings.epg_save, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true,miscEpgNotifier);
|
||||||
mc->setHint("", LOCALE_MENU_HINT_EPG_SAVE);
|
mc->setHint("", LOCALE_MENU_HINT_EPG_SAVE);
|
||||||
|
|
||||||
CMenuOptionChooser * mc2 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SCAN, &g_settings.epg_scan, EPG_SCAN_OPTIONS, EPG_SCAN_OPTION_COUNT,
|
CMenuOptionChooser * mc2 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SCAN_BOUQUETS, &g_settings.epg_scan, EPG_SCAN_OPTIONS, EPG_SCAN_OPTION_COUNT,
|
||||||
true /*CFEManager::getInstance()->getEnabledCount() > 1*/);
|
g_settings.epg_scan_mode != CEpgScan::MODE_OFF);
|
||||||
mc2->setHint("", LOCALE_MENU_HINT_EPG_SCAN);
|
mc2->setHint("", LOCALE_MENU_HINT_EPG_SCAN);
|
||||||
|
|
||||||
CMenuOptionChooser * mc3 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SCAN, &g_settings.epg_scan_mode, EPG_SCAN_MODE_OPTIONS, EPG_SCAN_MODE_OPTION_COUNT,
|
miscEpgScanNotifier = new COnOffNotifier();
|
||||||
CFEManager::getInstance()->getEnabledCount() > 1);
|
miscEpgScanNotifier->addItem(mc2);
|
||||||
|
|
||||||
|
CMenuOptionChooser * mc3 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SCAN, &g_settings.epg_scan_mode, EPG_SCAN_MODE_OPTIONS,
|
||||||
|
CFEManager::getInstance()->getEnabledCount() > 1 ? EPG_SCAN_MODE_OPTION_COUNT : 2, true, miscEpgScanNotifier);
|
||||||
mc3->setHint("", LOCALE_MENU_HINT_EPG_SCAN_MODE);
|
mc3->setHint("", LOCALE_MENU_HINT_EPG_SCAN_MODE);
|
||||||
|
|
||||||
ms_epg->addItem(mc);
|
ms_epg->addItem(mc);
|
||||||
ms_epg->addItem(mc1);
|
ms_epg->addItem(mc1);
|
||||||
|
ms_epg->addItem(mf4);
|
||||||
|
ms_epg->addItem(GenericMenuSeparatorLine);
|
||||||
ms_epg->addItem(mf);
|
ms_epg->addItem(mf);
|
||||||
ms_epg->addItem(mf1);
|
ms_epg->addItem(mf1);
|
||||||
ms_epg->addItem(mf2);
|
ms_epg->addItem(mf2);
|
||||||
ms_epg->addItem(mf3);
|
ms_epg->addItem(mf3);
|
||||||
ms_epg->addItem(mf4);
|
ms_epg->addItem(GenericMenuSeparatorLine);
|
||||||
ms_epg->addItem(mc2);
|
|
||||||
ms_epg->addItem(mc3);
|
ms_epg->addItem(mc3);
|
||||||
|
ms_epg->addItem(mc2);
|
||||||
}
|
}
|
||||||
|
|
||||||
//filebrowser settings
|
//filebrowser settings
|
||||||
|
@@ -42,6 +42,7 @@ class CMiscMenue : public CMenuTarget, CChangeObserver
|
|||||||
CSectionsdConfigNotifier* sectionsdConfigNotifier;
|
CSectionsdConfigNotifier* sectionsdConfigNotifier;
|
||||||
//COnOffNotifier* miscNotifier;
|
//COnOffNotifier* miscNotifier;
|
||||||
COnOffNotifier* miscEpgNotifier;
|
COnOffNotifier* miscEpgNotifier;
|
||||||
|
COnOffNotifier* miscEpgScanNotifier;
|
||||||
int width;
|
int width;
|
||||||
std::string epg_cache;
|
std::string epg_cache;
|
||||||
std::string epg_extendedcache;
|
std::string epg_extendedcache;
|
||||||
|
@@ -469,8 +469,13 @@ int CNeutrinoApp::loadSetup(const char * fname)
|
|||||||
|
|
||||||
g_settings.epg_save = configfile.getBool("epg_save", false);
|
g_settings.epg_save = configfile.getBool("epg_save", false);
|
||||||
g_settings.epg_save_standby = configfile.getBool("epg_save_standby", true);
|
g_settings.epg_save_standby = configfile.getBool("epg_save_standby", true);
|
||||||
g_settings.epg_scan = configfile.getInt32("epg_scan", 0);
|
g_settings.epg_scan = configfile.getInt32("epg_scan", CEpgScan::SCAN_CURRENT);
|
||||||
g_settings.epg_scan_mode = configfile.getInt32("epg_scan_mode", CEpgScan::MODE_ALWAYS);
|
g_settings.epg_scan_mode = configfile.getInt32("epg_scan_mode", CEpgScan::MODE_OFF);
|
||||||
|
// backward-compatible check
|
||||||
|
if (g_settings.epg_scan == 0) {
|
||||||
|
g_settings.epg_scan = CEpgScan::SCAN_CURRENT;
|
||||||
|
g_settings.epg_scan_mode = CEpgScan::MODE_OFF;
|
||||||
|
}
|
||||||
//widget settings
|
//widget settings
|
||||||
g_settings.widget_fade = false;
|
g_settings.widget_fade = false;
|
||||||
g_settings.widget_fade = configfile.getBool("widget_fade" , false );
|
g_settings.widget_fade = configfile.getBool("widget_fade" , false );
|
||||||
@@ -2141,7 +2146,7 @@ void CNeutrinoApp::RealRun(CMenuWidget &mainMenu)
|
|||||||
StartSubtitles();
|
StartSubtitles();
|
||||||
saveSetup(NEUTRINO_SETTINGS_FILE);
|
saveSetup(NEUTRINO_SETTINGS_FILE);
|
||||||
if (old_epg != g_settings.epg_scan || old_mode != g_settings.epg_scan_mode) {
|
if (old_epg != g_settings.epg_scan || old_mode != g_settings.epg_scan_mode) {
|
||||||
if (g_settings.epg_scan)
|
if (g_settings.epg_scan_mode != CEpgScan::MODE_OFF)
|
||||||
CEpgScan::getInstance()->Start();
|
CEpgScan::getInstance()->Start();
|
||||||
else
|
else
|
||||||
CEpgScan::getInstance()->Clear();
|
CEpgScan::getInstance()->Clear();
|
||||||
@@ -3400,7 +3405,8 @@ void CNeutrinoApp::standbyMode( bool bOnOff, bool fromDeepStandby )
|
|||||||
g_Zapit->stopPip();
|
g_Zapit->stopPip();
|
||||||
#endif
|
#endif
|
||||||
bool stream_status = CStreamManager::getInstance()->StreamStatus();
|
bool stream_status = CStreamManager::getInstance()->StreamStatus();
|
||||||
if(!g_settings.epg_scan && !fromDeepStandby && !CRecordManager::getInstance()->RecordingStatus() && !stream_status) {
|
if((g_settings.epg_scan_mode == CEpgScan::MODE_OFF) && !fromDeepStandby &&
|
||||||
|
!CRecordManager::getInstance()->RecordingStatus() && !stream_status) {
|
||||||
g_Zapit->setStandby(true);
|
g_Zapit->setStandby(true);
|
||||||
} else {
|
} else {
|
||||||
//g_Zapit->stopPlayBack();
|
//g_Zapit->stopPlayBack();
|
||||||
@@ -3753,7 +3759,7 @@ void stop_daemons(bool stopall, bool for_flash)
|
|||||||
CVFD::getInstance()->Clear();
|
CVFD::getInstance()->Clear();
|
||||||
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
||||||
CVFD::getInstance()->ShowText("Stop daemons...");
|
CVFD::getInstance()->ShowText("Stop daemons...");
|
||||||
g_settings.epg_scan = false;
|
g_settings.epg_scan_mode = CEpgScan::MODE_OFF;
|
||||||
my_system(NEUTRINO_ENTER_FLASH_SCRIPT);
|
my_system(NEUTRINO_ENTER_FLASH_SCRIPT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1305,6 +1305,7 @@ typedef enum
|
|||||||
LOCALE_MISCSETTINGS_EPG_SAVE_STANDBY,
|
LOCALE_MISCSETTINGS_EPG_SAVE_STANDBY,
|
||||||
LOCALE_MISCSETTINGS_EPG_SCAN,
|
LOCALE_MISCSETTINGS_EPG_SCAN,
|
||||||
LOCALE_MISCSETTINGS_EPG_SCAN_ALWAYS,
|
LOCALE_MISCSETTINGS_EPG_SCAN_ALWAYS,
|
||||||
|
LOCALE_MISCSETTINGS_EPG_SCAN_BOUQUETS,
|
||||||
LOCALE_MISCSETTINGS_EPG_SCAN_BQ,
|
LOCALE_MISCSETTINGS_EPG_SCAN_BQ,
|
||||||
LOCALE_MISCSETTINGS_EPG_SCAN_FAV,
|
LOCALE_MISCSETTINGS_EPG_SCAN_FAV,
|
||||||
LOCALE_MISCSETTINGS_EPG_SCAN_LIVE,
|
LOCALE_MISCSETTINGS_EPG_SCAN_LIVE,
|
||||||
|
@@ -1305,6 +1305,7 @@ const char * locale_real_names[] =
|
|||||||
"miscsettings.epg_save_standby",
|
"miscsettings.epg_save_standby",
|
||||||
"miscsettings.epg_scan",
|
"miscsettings.epg_scan",
|
||||||
"miscsettings.epg_scan_always",
|
"miscsettings.epg_scan_always",
|
||||||
|
"miscsettings.epg_scan_bouquets",
|
||||||
"miscsettings.epg_scan_bq",
|
"miscsettings.epg_scan_bq",
|
||||||
"miscsettings.epg_scan_fav",
|
"miscsettings.epg_scan_fav",
|
||||||
"miscsettings.epg_scan_live",
|
"miscsettings.epg_scan_live",
|
||||||
|
Reference in New Issue
Block a user