src/gui/eventlist.cpp restore channel name after call search if not used

This commit is contained in:
Jacek Jendrzej
2016-06-01 15:41:08 +02:00
parent 30a3093d9f
commit be2417068e
2 changed files with 12 additions and 13 deletions

View File

@@ -647,7 +647,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
oldIndex = -1; oldIndex = -1;
oldEventID = -1; oldEventID = -1;
bgRightBoxPaint = false; bgRightBoxPaint = false;
in_search = findEvents(); in_search = findEvents(channel_id, channelname);
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]);
} }
else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites || msg == CRCInput::RC_www) { else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites || msg == CRCInput::RC_www) {
@@ -1034,12 +1034,11 @@ int CEventListHandler::exec(CMenuTarget* parent, const std::string &/*actionkey*
} }
/************************************************************************************************/ /************************************************************************************************/
bool CEventList::findEvents(void) bool CEventList::findEvents(t_channel_id channel_id, std::string channelname)
/************************************************************************************************/ /************************************************************************************************/
{ {
bool res = false; bool res = false;
int event = 0; int event = 0;
t_channel_id channel_id = 0;
if((m_search_keyword.empty() || m_search_keyword == m_search_autokeyword) && evtlist[selected].eventID != 0) if((m_search_keyword.empty() || m_search_keyword == m_search_autokeyword) && evtlist[selected].eventID != 0)
{ {
@@ -1129,8 +1128,6 @@ bool CEventList::findEvents(void)
current_event++; current_event++;
} }
if(evtlist.empty()) if(evtlist.empty())
{
if ( evtlist.empty() )
{ {
CChannelEvent evt; CChannelEvent evt;
//evt.description = m_search_keyword + ": " + g_Locale->getText(LOCALE_EPGVIEWER_NOTFOUND); //evt.description = m_search_keyword + ": " + g_Locale->getText(LOCALE_EPGVIEWER_NOTFOUND);
@@ -1138,7 +1135,6 @@ bool CEventList::findEvents(void)
evt.eventID = 0; evt.eventID = 0;
evtlist.push_back(evt); evtlist.push_back(evt);
} }
}
if (current_event == (unsigned int)-1) if (current_event == (unsigned int)-1)
current_event = 0; current_event = 0;
selected= current_event; selected= current_event;
@@ -1163,7 +1159,10 @@ bool CEventList::findEvents(void)
} }
} }
if(event)
paintHead(0, search_head_name); paintHead(0, search_head_name);
else
paintHead(channel_id, channelname);
paint(); paint();
showFunctionBar(true, channel_id); showFunctionBar(true, channel_id);
return(res); return(res);

View File

@@ -79,7 +79,7 @@ class CEventList : public CListHelpers
event_id_t oldEventID; event_id_t oldEventID;
bool bgRightBoxPaint; bool bgRightBoxPaint;
bool findEvents(void); bool findEvents(t_channel_id channel_id, std::string channelname);
// Eventfinder end // Eventfinder end
CFrameBuffer *frameBuffer; CFrameBuffer *frameBuffer;