add option to adzap: zap on timer activation

Origin commit data
------------------
Branch: ni/coolstream
Commit: 710009728e
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2019-04-28 (Sun, 28 Apr 2019)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2019-04-28 00:32:34 +02:00
committed by vanhofen
parent 23b553a97e
commit 03203eead3
8 changed files with 48 additions and 0 deletions

View File

@@ -318,6 +318,14 @@ int CAdZapMenu::exec(CMenuTarget *parent, const std::string & actionKey)
void CAdZapMenu::ShowMenu()
{
#define ADZAP_ZAP_OPTION_COUNT 3
const CMenuOptionChooser::keyval ADZAP_ZAP_OPTIONS[ADZAP_ZAP_OPTION_COUNT] =
{
{ SNeutrinoSettings::ADZAP_ZAP_OFF,LOCALE_ADZAP_ZAP_OFF},
{ SNeutrinoSettings::ADZAP_ZAP_TO_LAST,LOCALE_ADZAP_ZAP_TO_LAST_CHANNEL},
{ SNeutrinoSettings::ADZAP_ZAP_TO_STRAT,LOCALE_ADZAP_ZAP_TO_STRAT_CHANNEL},
};
bool show_monitor = monitorLifeTime.tv_sec;
CMenuWidget *menu = new CMenuWidget(LOCALE_ADZAP, NEUTRINO_ICON_SETTINGS, width);
@@ -330,6 +338,10 @@ void CAdZapMenu::ShowMenu()
oc->setHint(NEUTRINO_ICON_HINT_ADZAP, LOCALE_MENU_HINT_ADZAP_WRITEDATA);
menu->addItem(oc);
CMenuOptionChooser *oc_zap = new CMenuOptionChooser(LOCALE_ADZAP_ZAP, &g_settings.adzap_zapOnActivation, ADZAP_ZAP_OPTIONS, ADZAP_ZAP_OPTION_COUNT, true);
oc_zap->setHint(NEUTRINO_ICON_HINT_ADZAP, LOCALE_MENU_HINT_ADZAP_ZAP);
menu->addItem(oc_zap);
menu->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_ADZAP_SWITCHBACK));
neutrino_locale_t minute = LOCALE_ADZAP_MINUTE;