gui/miscsettings_menu.cpp: add 'info' action key in epg settings to show current eit event count

This commit is contained in:
[CST] Focus
2013-09-27 14:17:11 +04:00
parent 537a60fe6b
commit 550ca1dedb

View File

@@ -45,11 +45,13 @@
#include <gui/widget/icons.h> #include <gui/widget/icons.h>
#include <gui/widget/stringinput.h> #include <gui/widget/stringinput.h>
#include <gui/widget/messagebox.h>
#include <driver/screen_max.h> #include <driver/screen_max.h>
#include <system/debug.h> #include <system/debug.h>
#include <zapit/femanager.h> #include <zapit/femanager.h>
#include <eitd/sectionsd.h>
#include <cs_api.h> #include <cs_api.h>
@@ -115,6 +117,14 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey)
return menu_return::RETURN_REPAINT; return menu_return::RETURN_REPAINT;
} }
#endif /*ONE_KEY_PLUGIN*/ #endif /*ONE_KEY_PLUGIN*/
else if(actionKey == "info")
{
unsigned num = CEitManager::getInstance()->getEventsCount();
char str[128];
sprintf(str, "Event count: %d", num);
ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, str, CMessageBox::mbrBack, CMessageBox::mbBack);
return menu_return::RETURN_REPAINT;
}
return showMiscSettingsMenu(); return showMiscSettingsMenu();
} }
@@ -311,7 +321,7 @@ void CMiscMenue::showMiscSettingsMenuEnergy(CMenuWidget *ms_energy)
void CMiscMenue::showMiscSettingsMenuEpg(CMenuWidget *ms_epg) void CMiscMenue::showMiscSettingsMenuEpg(CMenuWidget *ms_epg)
{ {
ms_epg->addIntroItems(LOCALE_MISCSETTINGS_EPG_HEAD); ms_epg->addIntroItems(LOCALE_MISCSETTINGS_EPG_HEAD);
ms_epg->addKey(CRCInput::RC_info, this, "info");
CMenuOptionChooser * mc1 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE_STANDBY, &g_settings.epg_save_standby, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.epg_save); CMenuOptionChooser * mc1 = new CMenuOptionChooser(LOCALE_MISCSETTINGS_EPG_SAVE_STANDBY, &g_settings.epg_save_standby, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, g_settings.epg_save);
mc1->setHint("", LOCALE_MENU_HINT_EPG_SAVE_STANDBY); mc1->setHint("", LOCALE_MENU_HINT_EPG_SAVE_STANDBY);