mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
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:
@@ -1241,6 +1241,7 @@ int CEventFinderMenu::showMenu(void)
|
|||||||
/************************************************************************************************/
|
/************************************************************************************************/
|
||||||
{
|
{
|
||||||
int res = menu_return::RETURN_REPAINT;
|
int res = menu_return::RETURN_REPAINT;
|
||||||
|
m_search_channelname_mf = NULL;
|
||||||
*m_event = false;
|
*m_event = false;
|
||||||
|
|
||||||
if(*m_search_list == CNeutrinoEventList::SEARCH_LIST_CHANNEL)
|
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 -_/()<>=+.,:!?\\'");
|
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 );
|
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, NULL, CRCInput::RC_2);
|
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);
|
||||||
CMenuForwarderNonLocalized* mf1 = new CMenuForwarderNonLocalized("", *m_search_list != CNeutrinoEventList::SEARCH_LIST_ALL, m_search_channelname, this, "3", CRCInput::RC_3 );
|
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);
|
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);
|
CMenuWidget searchMenu(LOCALE_EVENTFINDER_HEAD, NEUTRINO_ICON_FEATURES);
|
||||||
|
|
||||||
searchMenu.addItem(GenericMenuSeparator);
|
searchMenu.addItem(GenericMenuSeparator);
|
||||||
searchMenu.addItem(mf2, false);
|
searchMenu.addItem(mf0);
|
||||||
searchMenu.addItem(GenericMenuSeparatorLine);
|
searchMenu.addItem(GenericMenuSeparatorLine);
|
||||||
searchMenu.addItem(mo0, false);
|
searchMenu.addItem(mo0);
|
||||||
searchMenu.addItem(mf1, false);
|
searchMenu.addItem(m_search_channelname_mf);
|
||||||
searchMenu.addItem(mo1, false);
|
searchMenu.addItem(mo1);
|
||||||
searchMenu.addItem(GenericMenuSeparatorLine);
|
searchMenu.addItem(GenericMenuSeparatorLine);
|
||||||
searchMenu.addItem(mf0, false);
|
searchMenu.addItem(mf1);
|
||||||
|
|
||||||
res = searchMenu.exec(NULL,"");
|
res = searchMenu.exec(NULL,"");
|
||||||
return(res);
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -134,9 +134,10 @@ class CEventListHandler : public CMenuTarget
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CEventFinderMenu : public CMenuTarget
|
class CEventFinderMenu : public CMenuTarget, CChangeObserver
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
CMenuForwarderNonLocalized* m_search_channelname_mf;
|
||||||
int* m_event;
|
int* m_event;
|
||||||
int* m_search_epg_item;
|
int* m_search_epg_item;
|
||||||
std::string* m_search_keyword;
|
std::string* m_search_keyword;
|
||||||
@@ -153,6 +154,7 @@ class CEventFinderMenu : public CMenuTarget
|
|||||||
t_channel_id* search_channel_id,
|
t_channel_id* search_channel_id,
|
||||||
t_bouquet_id* search_bouquet_id);
|
t_bouquet_id* search_bouquet_id);
|
||||||
int exec( CMenuTarget* parent, const std::string &actionkey);
|
int exec( CMenuTarget* parent, const std::string &actionkey);
|
||||||
|
bool changeNotify(const neutrino_locale_t OptionName, void *);
|
||||||
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user