src/gui/epgview.cpp: further corrections for followlist

Origin commit data
------------------
Branch: ni/coolstream
Commit: 5e284c68c3
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-11-04 (Sun, 04 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-04 22:13:36 +01:00
parent a3b8f9378a
commit 0d56d64975
3 changed files with 22 additions and 15 deletions

View File

@@ -446,12 +446,12 @@ static bool sortByDateTime (const CChannelEvent& a, const CChannelEvent& b)
return a.startTime< b.startTime; return a.startTime< b.startTime;
} }
int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_startzeit, bool doLoop ) int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_startzeit, bool doLoop, bool callFromfollowlist )
{ {
int res = menu_return::RETURN_REPAINT; int res = menu_return::RETURN_REPAINT;
static uint64_t id; static uint64_t id;
static time_t startzeit; static time_t startzeit;
call_fromfollowlist = callFromfollowlist;
if (a_startzeit) if (a_startzeit)
startzeit=*a_startzeit; startzeit=*a_startzeit;
id=a_id; id=a_id;
@@ -660,13 +660,13 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
} }
GetPrevNextEPGData( epgData.eventID, &epgData.epg_times.startzeit ); GetPrevNextEPGData( epgData.eventID, &epgData.epg_times.startzeit );
if (prev_id != 0) if ((prev_id != 0) && !call_fromfollowlist)
{ {
frameBuffer->paintBoxRel(sx+ 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_3); frameBuffer->paintBoxRel(sx+ 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_3);
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ 10, sy+ oy- 3, widthr, "<", COL_MENUCONTENT + 3); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ 10, sy+ oy- 3, widthr, "<", COL_MENUCONTENT + 3);
} }
if (next_id != 0) if ((next_id != 0) && !call_fromfollowlist)
{ {
frameBuffer->paintBoxRel(sx+ ox- botboxheight+ 8- 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_3); frameBuffer->paintBoxRel(sx+ ox- botboxheight+ 8- 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_3);
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ ox- botboxheight+ 8, sy+ oy- 3, widthr, ">", COL_MENUCONTENT + 3); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ ox- botboxheight+ 8, sy+ oy- 3, widthr, ">", COL_MENUCONTENT + 3);
@@ -717,7 +717,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
CNeutrinoApp::getInstance()->handleMsg(msg, data); CNeutrinoApp::getInstance()->handleMsg(msg, data);
break; break;
case CRCInput::RC_left: case CRCInput::RC_left:
if (prev_id != 0) if ((prev_id != 0) && !call_fromfollowlist)
{ {
frameBuffer->paintBoxRel(sx+ 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_1); frameBuffer->paintBoxRel(sx+ 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_1);
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ 10, sy+ oy- 3, widthr, "<", COL_MENUCONTENT + 1); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ 10, sy+ oy- 3, widthr, "<", COL_MENUCONTENT + 1);
@@ -728,7 +728,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
break; break;
case CRCInput::RC_right: case CRCInput::RC_right:
if (next_id != 0) if ((next_id != 0) && !call_fromfollowlist)
{ {
frameBuffer->paintBoxRel(sx+ ox- botboxheight+ 8- 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_1); frameBuffer->paintBoxRel(sx+ ox- botboxheight+ 8- 5, sy+ oy- botboxheight+ 4, botboxheight- 8, botboxheight- 8, COL_MENUCONTENT_PLUS_1);
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ ox- botboxheight+ 8, sy+ oy- 3, widthr, ">", COL_MENUCONTENT + 1); g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ ox- botboxheight+ 8, sy+ oy- 3, widthr, ">", COL_MENUCONTENT + 1);
@@ -847,8 +847,11 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
} }
case CRCInput::RC_blue: case CRCInput::RC_blue:
{ {
if(!followlist.empty()){ if(!followlist.empty() && !call_fromfollowlist){
hide(); hide();
time_t tmp_sZeit = epgData.epg_times.startzeit;
uint64_t tmp_eID = epgData.eventID;
CNeutrinoEventList *ee = new CNeutrinoEventList; CNeutrinoEventList *ee = new CNeutrinoEventList;
res = ee->exec(channel_id, g_Locale->getText(LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT),"","",followlist); // UTF-8 res = ee->exec(channel_id, g_Locale->getText(LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT),"","",followlist); // UTF-8
delete ee; delete ee;
@@ -861,7 +864,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
} }
} }
bigFonts = g_settings.bigFonts; bigFonts = g_settings.bigFonts;
show(channel_id,epgData.eventID,&epgData.epg_times.startzeit,false); show(channel_id,tmp_eID,&tmp_sZeit,false);
} }
break; break;
} }
@@ -897,8 +900,10 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
break; break;
case CRCInput::RC_favorites: case CRCInput::RC_favorites:
case CRCInput::RC_sat: case CRCInput::RC_sat:
if( !call_fromfollowlist){
g_RCInput->postMsg (msg, 0); g_RCInput->postMsg (msg, 0);
loop = false; loop = false;
}
break; break;
default: default:
@@ -1027,6 +1032,7 @@ void CEpgData::GetPrevNextEPGData( uint64_t id, time_t* startzeit )
bool CEpgData::hasFollowScreenings(const t_channel_id /*channel_id*/, const std::string &title) bool CEpgData::hasFollowScreenings(const t_channel_id /*channel_id*/, const std::string &title)
{ {
CChannelEventList::iterator e; CChannelEventList::iterator e;
if(!followlist.empty())
followlist.clear(); followlist.clear();
for (e = evtlist.begin(); e != evtlist.end(); ++e) for (e = evtlist.begin(); e != evtlist.end(); ++e)
{ {
@@ -1116,9 +1122,9 @@ void CEpgData::showTimerEventBar (bool pshow)
frameBuffer->paintBoxRel(sx,y,ox,h, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM);//round frameBuffer->paintBoxRel(sx,y,ox,h, COL_INFOBAR_SHADOW_PLUS_1, RADIUS_LARGE, CORNER_BOTTOM);//round
if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF)
::paintButtons(x, y, 0, has_follow_screenings ? 3:2, EpgButtons, h); ::paintButtons(x, y, 0, (has_follow_screenings && !call_fromfollowlist) ? 3:2, EpgButtons, h);
else else
::paintButtons(x, y, 0, has_follow_screenings ? 2:1, &EpgButtons[1], h); ::paintButtons(x, y, 0, (has_follow_screenings && !call_fromfollowlist) ? 2:1, &EpgButtons[1], h);
#if 0 #if 0
// Button: Timer Record & Channelswitch // Button: Timer Record & Channelswitch

View File

@@ -63,6 +63,7 @@ class CEpgData
int epg_done; int epg_done;
bool bigFonts; bool bigFonts;
bool has_follow_screenings; bool has_follow_screenings;
bool call_fromfollowlist;
time_t tmp_curent_zeit; time_t tmp_curent_zeit;
uint64_t prev_id; uint64_t prev_id;
@@ -92,7 +93,7 @@ class CEpgData
CEpgData(); CEpgData();
void start( ); void start( );
int show(const t_channel_id channel_id, uint64_t id = 0, time_t* startzeit = NULL, bool doLoop = true ); int show(const t_channel_id channel_id, uint64_t id = 0, time_t* startzeit = NULL, bool doLoop = true, bool callFromfollowlist = false );
void hide(); void hide();
}; };

View File

@@ -606,7 +606,7 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c
hide(); hide();
//FIXME res = g_EpgData->show(evtlist[selected].sub ? GET_CHANNEL_ID_FROM_EVENT_ID(evtlist[selected].eventID) : channel_id, evtlist[selected].eventID, &evtlist[selected].startTime); //FIXME res = g_EpgData->show(evtlist[selected].sub ? GET_CHANNEL_ID_FROM_EVENT_ID(evtlist[selected].eventID) : channel_id, evtlist[selected].eventID, &evtlist[selected].startTime);
res = g_EpgData->show(evtlist[selected].channelID, evtlist[selected].eventID, &evtlist[selected].startTime); res = g_EpgData->show(evtlist[selected].channelID, evtlist[selected].eventID, &evtlist[selected].startTime, true, showfollow );
if ( res == menu_return::RETURN_EXIT_ALL ) if ( res == menu_return::RETURN_EXIT_ALL )
{ {
loop = false; loop = false;