diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 2093e52dd..704f72d6f 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -51,12 +51,14 @@ #include #include #include +#include #include #include #include #include +#include #include 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 { diff --git a/src/gui/bouquetlist.h b/src/gui/bouquetlist.h index 1b5968fe2..0c8741c84 100644 --- a/src/gui/bouquetlist.h +++ b/src/gui/bouquetlist.h @@ -97,6 +97,7 @@ class CBouquetList int y; bool favonly; + bool save_bouquets; void paintItem(int pos); void paint();