From 550ca1dedb3c95bb8db7096af0d8f296c19bfde5 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 27 Sep 2013 14:17:11 +0400 Subject: [PATCH] gui/miscsettings_menu.cpp: add 'info' action key in epg settings to show current eit event count --- src/gui/miscsettings_menu.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/gui/miscsettings_menu.cpp b/src/gui/miscsettings_menu.cpp index 0a2bfc008..84b59ffa4 100644 --- a/src/gui/miscsettings_menu.cpp +++ b/src/gui/miscsettings_menu.cpp @@ -45,11 +45,13 @@ #include #include +#include #include #include #include +#include #include @@ -115,6 +117,14 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey) return menu_return::RETURN_REPAINT; } #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(); } @@ -311,7 +321,7 @@ void CMiscMenue::showMiscSettingsMenuEnergy(CMenuWidget *ms_energy) void CMiscMenue::showMiscSettingsMenuEpg(CMenuWidget *ms_epg) { 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); mc1->setHint("", LOCALE_MENU_HINT_EPG_SAVE_STANDBY);