eventlist: -add notifier to search menu, ported from tuxcvs, THX Gaucho316

Origin commit data
------------------
Branch: ni/coolstream
Commit: 87fe3bd406
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-11-01 (Thu, 01 Nov 2012)


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

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2012-11-01 18:55:03 +01:00
parent c2300f8526
commit 1054045693
2 changed files with 40 additions and 10 deletions

View File

@@ -1241,6 +1241,7 @@ int CEventFinderMenu::showMenu(void)
/************************************************************************************************/
{
int res = menu_return::RETURN_REPAINT;
m_search_channelname_mf = NULL;
*m_event = false;
if(*m_search_list == CNeutrinoEventList::SEARCH_LIST_CHANNEL)
@@ -1264,24 +1265,51 @@ int CEventFinderMenu::showMenu(void)
CStringInputSMS stringInput(LOCALE_EVENTFINDER_KEYWORD,m_search_keyword, 20, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "abcdefghijklmnopqrstuvwxyz0123456789 -_/()<>=+.,:!?\\'");
CMenuForwarder* mf2 = new CMenuForwarder(LOCALE_EVENTFINDER_KEYWORD ,true, *m_search_keyword, &stringInput, NULL, CRCInput::RC_1 );
CMenuOptionChooser* mo0 = new CMenuOptionChooser(LOCALE_EVENTFINDER_SEARCH_WITHIN_LIST , m_search_list, SEARCH_LIST_OPTIONS, SEARCH_LIST_OPTION_COUNT, true, NULL, CRCInput::RC_2);
CMenuForwarderNonLocalized* mf1 = new CMenuForwarderNonLocalized("", *m_search_list != CNeutrinoEventList::SEARCH_LIST_ALL, m_search_channelname, this, "3", CRCInput::RC_3 );
CMenuForwarder* mf0 = new CMenuForwarder(LOCALE_EVENTFINDER_KEYWORD, true, *m_search_keyword, &stringInput, NULL, CRCInput::RC_1, NEUTRINO_ICON_BUTTON_1);
CMenuOptionChooser* mo0 = new CMenuOptionChooser(LOCALE_EVENTFINDER_SEARCH_WITHIN_LIST, m_search_list, SEARCH_LIST_OPTIONS, SEARCH_LIST_OPTION_COUNT, true, this, CRCInput::RC_2, NEUTRINO_ICON_BUTTON_2);
m_search_channelname_mf = new CMenuForwarderNonLocalized("", *m_search_list != CNeutrinoEventList::SEARCH_LIST_ALL, m_search_channelname, this, "3", CRCInput::RC_3, NEUTRINO_ICON_BUTTON_3);
CMenuOptionChooser* mo1 = new CMenuOptionChooser(LOCALE_EVENTFINDER_SEARCH_WITHIN_EPG, m_search_epg_item, SEARCH_EPG_OPTIONS, SEARCH_EPG_OPTION_COUNT, true, NULL, CRCInput::RC_4);
CMenuForwarder* mf0 = new CMenuForwarder(LOCALE_EVENTFINDER_START_SEARCH, true, NULL, this, "1", CRCInput::RC_5 );
CMenuForwarder* mf1 = new CMenuForwarder(LOCALE_EVENTFINDER_START_SEARCH, true, NULL, this, "5", CRCInput::RC_5, NEUTRINO_ICON_BUTTON_5);
CMenuWidget searchMenu(LOCALE_EVENTFINDER_HEAD, NEUTRINO_ICON_FEATURES);
searchMenu.addItem(GenericMenuSeparator);
searchMenu.addItem(mf2, false);
searchMenu.addItem(mf0);
searchMenu.addItem(GenericMenuSeparatorLine);
searchMenu.addItem(mo0, false);
searchMenu.addItem(mf1, false);
searchMenu.addItem(mo1, false);
searchMenu.addItem(mo0);
searchMenu.addItem(m_search_channelname_mf);
searchMenu.addItem(mo1);
searchMenu.addItem(GenericMenuSeparatorLine);
searchMenu.addItem(mf0, false);
searchMenu.addItem(mf1);
res = searchMenu.exec(NULL,"");
return(res);
}
/************************************************************************************************/
bool CEventFinderMenu::changeNotify(const neutrino_locale_t OptionName, void *)
/************************************************************************************************/
{
if (ARE_LOCALES_EQUAL(OptionName, LOCALE_EVENTFINDER_SEARCH_WITHIN_LIST))
{
if (*m_search_list == CNeutrinoEventList::SEARCH_LIST_CHANNEL)
{
m_search_channelname = g_Zapit->getChannelName(*m_search_channel_id);
m_search_channelname_mf->setActive(true);
}
else if (*m_search_list == CNeutrinoEventList::SEARCH_LIST_BOUQUET)
{
m_search_channelname = bouquetList->Bouquets[*m_search_bouquet_id]->channelList->getName();
m_search_channelname_mf->setActive(true);
}
else if (*m_search_list == CNeutrinoEventList::SEARCH_LIST_ALL)
{
m_search_channelname = "";
m_search_channelname_mf->setActive(false);
}
}
return false;
}