mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
src/gui/epgview.cpp:show always all screening
Origin commit data
------------------
Commit: 27fe0fe6e0
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-11-03 (Sat, 03 Nov 2012)
This commit is contained in:
@@ -152,7 +152,7 @@ void CEpgData::start()
|
||||
toph = topboxheight;
|
||||
}
|
||||
|
||||
void CEpgData::addTextToArray(const std::string & text, bool screening) // UTF-8
|
||||
void CEpgData::addTextToArray(const std::string & text, int screening) // UTF-8
|
||||
{
|
||||
//printf("line: >%s<\n", text.c_str() );
|
||||
if (text==" ")
|
||||
@@ -170,7 +170,7 @@ void CEpgData::addTextToArray(const std::string & text, bool screening) // UTF-8
|
||||
}
|
||||
}
|
||||
|
||||
void CEpgData::processTextToArray(std::string text, bool screening) // UTF-8
|
||||
void CEpgData::processTextToArray(std::string text, int screening) // UTF-8
|
||||
{
|
||||
std::string aktLine = "";
|
||||
std::string aktWord = "";
|
||||
@@ -249,7 +249,6 @@ void CEpgData::showText( int startPos, int ypos )
|
||||
if(epgText[i].second){
|
||||
std::string::size_type pos1 = epgText[i].first.find_first_not_of(tok, 0);
|
||||
std::string::size_type pos2 = epgText[i].first.find_first_of(tok, pos1);
|
||||
|
||||
while( pos2 != string::npos || pos1 != string::npos ){
|
||||
switch(count){
|
||||
case 1:
|
||||
@@ -262,7 +261,7 @@ void CEpgData::showText( int startPos, int ypos )
|
||||
offset += digi;
|
||||
break;
|
||||
}
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10+offset, y+medlineheight, ox- 15- 15, epgText[i].first.substr(pos1, pos2 - pos1), COL_MENUCONTENT, 0, true); // UTF-8
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10+offset, y+medlineheight, ox- 15- 15, epgText[i].first.substr(pos1, pos2 - pos1), (epgText[i].second==2)? COL_MENUCONTENTINACTIVE: COL_MENUCONTENT, 0, true); // UTF-8
|
||||
count++;
|
||||
pos1 = epgText[i].first.find_first_not_of(tok, pos2);
|
||||
pos2 = epgText[i].first.find_first_of(tok, pos1);
|
||||
@@ -270,8 +269,9 @@ void CEpgData::showText( int startPos, int ypos )
|
||||
offset = 0;
|
||||
count = 0;
|
||||
}
|
||||
else
|
||||
else{
|
||||
g_Font[( i< info1_lines ) ?SNeutrinoSettings::FONT_TYPE_EPG_INFO1:SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->RenderString(sx+10, y+medlineheight, ox- 15- 15, epgText[i].first, COL_MENUCONTENT, 0, true); // UTF-8
|
||||
}
|
||||
}
|
||||
|
||||
int sbc = ((textSize - 1)/ medlinecount) + 1;
|
||||
@@ -1030,7 +1030,7 @@ bool CEpgData::hasFollowScreenings(const t_channel_id /*channel_id*/, const std:
|
||||
followlist.clear();
|
||||
for (e = evtlist.begin(); e != evtlist.end(); ++e)
|
||||
{
|
||||
if (e->startTime <= tmp_curent_zeit)
|
||||
if (e->startTime == tmp_curent_zeit)
|
||||
continue;
|
||||
if (! e->eventID)
|
||||
continue;
|
||||
@@ -1047,6 +1047,7 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st
|
||||
struct tm *tmStartZeit;
|
||||
std::string screening_dates,screening_nodual;
|
||||
int count = 0;
|
||||
int flag = 1;
|
||||
char tmpstr[256]={0};
|
||||
|
||||
screening_dates = screening_nodual = "";
|
||||
@@ -1066,9 +1067,14 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st
|
||||
|
||||
strftime(tmpstr, sizeof(tmpstr), ". %H:%M", tmStartZeit );
|
||||
screening_dates += tmpstr;
|
||||
if (e->startTime <= tmp_curent_zeit)
|
||||
flag = 2;
|
||||
else
|
||||
flag = 1;
|
||||
|
||||
if (screening_dates != screening_nodual) {
|
||||
screening_nodual=screening_dates;
|
||||
processTextToArray(screening_dates, true ); // UTF-8
|
||||
processTextToArray(screening_dates, flag ); // UTF-8
|
||||
}
|
||||
}
|
||||
return count;
|
||||
|
@@ -73,7 +73,7 @@ class CEpgData
|
||||
int ox, oy, sx, sy, toph, sb;
|
||||
int emptyLineCount, info1_lines;
|
||||
int textCount;
|
||||
typedef std::pair<std::string,bool> epg_pair;
|
||||
typedef std::pair<std::string,int> epg_pair;
|
||||
std::vector<epg_pair> epgText;
|
||||
int topheight,topboxheight;
|
||||
int buttonheight,botboxheight;
|
||||
@@ -81,8 +81,8 @@ class CEpgData
|
||||
|
||||
void GetEPGData(const t_channel_id channel_id, uint64_t id, time_t* startzeit, bool clear = true );
|
||||
void GetPrevNextEPGData( uint64_t id, time_t* startzeit );
|
||||
void addTextToArray( const std::string & text, bool screening );
|
||||
void processTextToArray(std::string text, bool screening = false);
|
||||
void addTextToArray( const std::string & text, int screening );
|
||||
void processTextToArray(std::string text, int screening = 0);
|
||||
void showText( int startPos, int ypos );
|
||||
bool hasFollowScreenings(const t_channel_id channel_id, const std::string & title);
|
||||
int FollowScreenings(const t_channel_id channel_id, const std::string & title);
|
||||
|
Reference in New Issue
Block a user