From 18d8ff083da37aebae850045637ad5936ecbeb2e Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 18 Feb 2020 22:45:43 +0100 Subject: [PATCH] usermenu: add read epg to epg function (thx to DboxOldie) Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3f3d3b2df65992f55ed31d6b00f16c0dfb945a00 Author: vanhofen Date: 2020-02-18 (Tue, 18 Feb 2020) Origin message was: ------------------ - usermenu: add read epg to epg function (thx to DboxOldie) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/miscsettings_menu.cpp | 7 +++++-- src/gui/user_menue.cpp | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/gui/miscsettings_menu.cpp b/src/gui/miscsettings_menu.cpp index 7ac66dd2f..03fc07a10 100644 --- a/src/gui/miscsettings_menu.cpp +++ b/src/gui/miscsettings_menu.cpp @@ -153,7 +153,7 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey) { return showMiscSettingsSelectWeatherLocation(); } - else if(actionKey == "epg_read_now") + else if(actionKey == "epg_read_now" || actionKey == "epg_read_now_usermenu") { struct stat my_stat; if (stat(g_settings.epg_dir.c_str(), &my_stat) == 0) @@ -168,7 +168,10 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey) g_Sectionsd->readSIfromXMLTV((*it).c_str()); } - return menu_return::RETURN_REPAINT; + if (actionKey == "epg_read_now_usermenu") + return menu_return::RETURN_EXIT_ALL; + else + return menu_return::RETURN_REPAINT; } return showMiscSettingsMenu(); diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index b28bc8ef5..c111a50b1 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -81,6 +81,7 @@ #include #include //NI #include +#include #include #include @@ -252,6 +253,11 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) } case SNeutrinoSettings::ITEM_EPG_MISC: { + keyhelper.get(&key,&icon); + menu_item = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_READ_NOW, g_settings.epg_read, NULL, new CMiscMenue(), "epg_read_now_usermenu", key, icon); + menu_item->setHint("", LOCALE_MENU_HINT_EPG_READ_NOW); + menu->addItem(menu_item, false); + dummy = g_Sectionsd->getIsScanningActive(); keyhelper.get(&key,&icon); menu_item = new CMenuOptionChooser(LOCALE_MAINMENU_PAUSESECTIONSD, &dummy, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this , key, icon );