mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
gui/bouquetlist.cpp: add menu option to switch bouquet epg scan on/off
This commit is contained in:
@@ -51,12 +51,14 @@
|
||||
#include <driver/screen_max.h>
|
||||
#include <driver/rcinput.h>
|
||||
#include <driver/fade.h>
|
||||
#include <driver/scanepg.h>
|
||||
|
||||
#include <daemonc/remotecontrol.h>
|
||||
#include <system/settings.h>
|
||||
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include <mymenu.h>
|
||||
#include <zapit/getservices.h>
|
||||
|
||||
extern CBouquetManager *g_bouquetManager;
|
||||
@@ -67,6 +69,7 @@ CBouquetList::CBouquetList(const char * const Name)
|
||||
selected = 0;
|
||||
liststart = 0;
|
||||
favonly = false;
|
||||
save_bouquets = false;
|
||||
if(Name == NULL)
|
||||
name = g_Locale->getText(LOCALE_BOUQUETLIST_HEAD);
|
||||
else
|
||||
@@ -241,11 +244,17 @@ int CBouquetList::doMenu()
|
||||
|
||||
sprintf(cnt, "%d", i);
|
||||
if (zapitBouquet && !zapitBouquet->bUser) {
|
||||
bool old_epg = zapitBouquet->bScanEpg;
|
||||
menu->addItem(new CMenuForwarder(LOCALE_FAVORITES_COPY, true, NULL, selector, cnt, CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE), old_selected == i ++);
|
||||
if (g_settings.epg_scan == CEpgScan::SCAN_SEL)
|
||||
menu->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SCAN, &zapitBouquet->bScanEpg, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||
menu->exec(NULL, "");
|
||||
delete menu;
|
||||
delete selector;
|
||||
printf("CBouquetList::doMenu: %d selected\n", select);
|
||||
if (old_epg != zapitBouquet->bScanEpg)
|
||||
save_bouquets = true;
|
||||
|
||||
bool added = false;
|
||||
if(select >= 0) {
|
||||
old_selected = select;
|
||||
@@ -285,9 +294,16 @@ int CBouquetList::doMenu()
|
||||
return -1;
|
||||
} else {
|
||||
menu->addItem(new CMenuForwarder(LOCALE_BOUQUETEDITOR_DELETE, true, NULL, selector, cnt, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED), old_selected == i ++);
|
||||
bool old_epg = zapitBouquet->bScanEpg;
|
||||
if (zapitBouquet && (g_settings.epg_scan == CEpgScan::SCAN_SEL))
|
||||
menu->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SCAN, &zapitBouquet->bScanEpg, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
|
||||
|
||||
menu->exec(NULL, "");
|
||||
delete menu;
|
||||
delete selector;
|
||||
if (zapitBouquet && (old_epg != zapitBouquet->bScanEpg))
|
||||
save_bouquets = true;
|
||||
|
||||
printf("CBouquetList::doMenu: %d selected\n", select);
|
||||
if(select >= 0) {
|
||||
old_selected = select;
|
||||
@@ -548,6 +564,16 @@ int CBouquetList::show(bool bShowChannelList)
|
||||
fader.Stop();
|
||||
|
||||
CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO);
|
||||
if (save_bouquets) {
|
||||
save_bouquets = false;
|
||||
if (CNeutrinoApp::getInstance()->GetChannelMode() == LIST_MODE_FAV)
|
||||
g_bouquetManager->saveUBouquets();
|
||||
else
|
||||
g_bouquetManager->saveBouquets();
|
||||
|
||||
if (g_settings.epg_scan == CEpgScan::SCAN_SEL)
|
||||
CEpgScan::getInstance()->Start();
|
||||
}
|
||||
if(zapOnExit) {
|
||||
return (selected);
|
||||
} else {
|
||||
|
@@ -97,6 +97,7 @@ class CBouquetList
|
||||
int y;
|
||||
|
||||
bool favonly;
|
||||
bool save_bouquets;
|
||||
|
||||
void paintItem(int pos);
|
||||
void paint();
|
||||
|
Reference in New Issue
Block a user