mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 08:21:07 +02:00
epgview: fix content of small bottom box in movieplayer mode
Origin commit data
------------------
Branch: ni/coolstream
Commit: 99de005c68
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-08-10 (Wed, 10 Aug 2016)
Origin message was:
------------------
- epgview: fix content of small bottom box in movieplayer mode
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -663,8 +663,6 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
|||||||
tmdb_active = false;
|
tmdb_active = false;
|
||||||
stars = 0;
|
stars = 0;
|
||||||
|
|
||||||
int height = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getHeight();
|
|
||||||
|
|
||||||
t_channel_id epg_id = channel_id;
|
t_channel_id epg_id = channel_id;
|
||||||
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(channel_id);
|
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(channel_id);
|
||||||
if (channel)
|
if (channel)
|
||||||
@@ -875,48 +873,44 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
|||||||
if (headerPic)
|
if (headerPic)
|
||||||
headerPic->paint(CC_SAVE_SCREEN_NO);
|
headerPic->paint(CC_SAVE_SCREEN_NO);
|
||||||
|
|
||||||
//show date-time....
|
|
||||||
frameBuffer->paintBoxRel(sx, sy+oy-botboxheight, ox, botboxheight, COL_MENUHEAD_PLUS_0);
|
|
||||||
std::string fromto;
|
|
||||||
int widthl,widthr;
|
|
||||||
fromto = epg_start;
|
|
||||||
fromto += " - ";
|
|
||||||
fromto += epg_end;
|
|
||||||
|
|
||||||
widthl = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getRenderWidth(fromto);
|
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+40, sy+oy-3, widthl, fromto, COL_MENUHEAD_TEXT);
|
|
||||||
widthr = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getRenderWidth(epg_date);
|
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ox-40-widthr, sy+oy-3, widthr, epg_date, COL_MENUHEAD_TEXT);
|
|
||||||
|
|
||||||
int showPos = 0;
|
int showPos = 0;
|
||||||
textCount = epgText.size();
|
textCount = epgText.size();
|
||||||
showText(showPos, sy + toph);
|
showText(showPos, sy + toph);
|
||||||
// show Timer Event Buttons
|
|
||||||
showTimerEventBar(true, isCurrentEPG(channel_id), mp_info);
|
|
||||||
|
|
||||||
//show progressbar
|
// small bottom box
|
||||||
if (!mp_info && epg_done!= -1)
|
frameBuffer->paintBoxRel(sx, sy+oy-botboxheight, ox, botboxheight, COL_MENUHEAD_PLUS_0);
|
||||||
|
if (!mp_info)
|
||||||
{
|
{
|
||||||
int pbx = sx + 10 + widthl + 10 + ((ox-104-widthr-widthl-10-10-20)>>1);
|
static int iw = 0, ih = 0, io = 0;
|
||||||
CProgressBar pb(pbx, sy+oy-height, 104, height-6);
|
|
||||||
pb.setType(CProgressBar::PB_TIMESCALE);
|
|
||||||
pb.setValues(epg_done, 100);
|
|
||||||
pb.paint(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int iw = 0, ih = 0;
|
|
||||||
if (!iw && !ih)
|
if (!iw && !ih)
|
||||||
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_LEFT, &iw, &ih);
|
frameBuffer->getIconSize(NEUTRINO_ICON_BUTTON_LEFT, &iw, &ih);
|
||||||
|
if (!io && iw)
|
||||||
|
io = iw + 10;
|
||||||
|
|
||||||
GetPrevNextEPGData( epgData.eventID, &epgData.epg_times.startzeit );
|
std::string fromto = epg_start + " - " + epg_end;
|
||||||
if (!call_fromfollowlist) {
|
|
||||||
int iy = sy + oy - 3 - height/2 - iw/2;
|
int widthl = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getRenderWidth(fromto);
|
||||||
|
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+10+io, sy+oy-3, widthl, fromto, COL_MENUHEAD_TEXT);
|
||||||
|
int widthr = g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->getRenderWidth(epg_date);
|
||||||
|
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_DATE]->RenderString(sx+ox-10-io-widthr, sy+oy-3, widthr, epg_date, COL_MENUHEAD_TEXT);
|
||||||
|
|
||||||
|
GetPrevNextEPGData(epgData.eventID, &epgData.epg_times.startzeit);
|
||||||
|
if (!call_fromfollowlist)
|
||||||
|
{
|
||||||
|
int iy = sy + oy - botboxheight + (botboxheight - iw)/2;
|
||||||
if (prev_id)
|
if (prev_id)
|
||||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_LEFT, sx + 5, iy);
|
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_LEFT, sx + 10, iy);
|
||||||
if (next_id)
|
if (next_id)
|
||||||
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RIGHT, sx + ox - iw - 5, iy);
|
frameBuffer->paintIcon(NEUTRINO_ICON_BUTTON_RIGHT, sx + ox - iw - 10, iy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// why we do not show movie progress?
|
||||||
|
showProgressBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
// show Timer Event Buttons
|
||||||
|
showTimerEventBar(true, isCurrentEPG(channel_id), mp_info);
|
||||||
|
|
||||||
if ( doLoop )
|
if ( doLoop )
|
||||||
{
|
{
|
||||||
neutrino_msg_t msg = 0;
|
neutrino_msg_t msg = 0;
|
||||||
@@ -945,17 +939,13 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
CNeutrinoApp::getInstance()->handleMsg(msg, data);
|
CNeutrinoApp::getInstance()->handleMsg(msg, data);
|
||||||
|
|
||||||
if (!mp_info)
|
if (!mp_info)
|
||||||
{
|
{
|
||||||
if (data == g_InfoViewer->getUpdateTimer()) {
|
if (data == g_InfoViewer->getUpdateTimer())
|
||||||
|
{
|
||||||
GetEPGData(channel_id, id, &startzeit, false);
|
GetEPGData(channel_id, id, &startzeit, false);
|
||||||
if ( epg_done!= -1 ) {
|
showProgressBar();
|
||||||
int pbx = sx + 10 + widthl + 10 + ((ox-104-widthr-widthl-10-10-20)>>1);
|
|
||||||
CProgressBar pb(pbx, sy+oy-height, 104, height-6);
|
|
||||||
pb.setType(CProgressBar::PB_TIMESCALE);
|
|
||||||
pb.setValues(epg_done, 100);
|
|
||||||
pb.paint(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -967,21 +957,15 @@ 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) && !call_fromfollowlist)
|
if ((prev_id != 0) && !call_fromfollowlist && !mp_info)
|
||||||
{
|
{
|
||||||
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_TEXT_PLUS_1);
|
|
||||||
|
|
||||||
show(channel_id, prev_id, &prev_zeit, false);
|
show(channel_id, prev_id, &prev_zeit, false);
|
||||||
showPos=0;
|
showPos=0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CRCInput::RC_right:
|
case CRCInput::RC_right:
|
||||||
if ((next_id != 0) && !call_fromfollowlist)
|
if ((next_id != 0) && !call_fromfollowlist && !mp_info)
|
||||||
{
|
{
|
||||||
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_TEXT_PLUS_1);
|
|
||||||
|
|
||||||
show(channel_id, next_id, &next_zeit, false);
|
show(channel_id, next_id, &next_zeit, false);
|
||||||
showPos=0;
|
showPos=0;
|
||||||
}
|
}
|
||||||
@@ -1433,6 +1417,22 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st
|
|||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CEpgData::showProgressBar()
|
||||||
|
{
|
||||||
|
//show progressbar
|
||||||
|
if (epg_done != -1)
|
||||||
|
{
|
||||||
|
int w = 104;
|
||||||
|
int x = sx + (ox - w)/2;
|
||||||
|
int h = botboxheight - 12;
|
||||||
|
int y = sy + oy - botboxheight + (botboxheight - h)/2;
|
||||||
|
|
||||||
|
CProgressBar pb(x, y, w, h);
|
||||||
|
pb.setType(CProgressBar::PB_TIMESCALE);
|
||||||
|
pb.setValues(epg_done, 100);
|
||||||
|
pb.paint(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// -- Just display or hide TimerEventbar
|
// -- Just display or hide TimerEventbar
|
||||||
|
@@ -94,6 +94,7 @@ class CEpgData
|
|||||||
bool hasFollowScreenings(const t_channel_id channel_id, const std::string & title);
|
bool hasFollowScreenings(const t_channel_id channel_id, const std::string & title);
|
||||||
int FollowScreenings(const t_channel_id channel_id, const std::string & title);
|
int FollowScreenings(const t_channel_id channel_id, const std::string & title);
|
||||||
void showTimerEventBar(bool show, bool adzap = false, bool mp_info = false);
|
void showTimerEventBar(bool show, bool adzap = false, bool mp_info = false);
|
||||||
|
void showProgressBar();
|
||||||
bool isCurrentEPG(const t_channel_id channel_id);
|
bool isCurrentEPG(const t_channel_id channel_id);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Reference in New Issue
Block a user