mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
eventlist: -add notifier to search menu, ported from tuxcvs, THX Gaucho316
Origin commit data
------------------
Commit: 87fe3bd406
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-11-01 (Thu, 01 Nov 2012)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user