src/gui/epgview.cpp:show always all screening

Origin commit data
------------------
Branch: ni/coolstream
Commit: 27fe0fe6e0
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-11-03 (Sat, 03 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-03 11:20:15 +01:00
parent b95b9917bc
commit 97f6724e1f
2 changed files with 16 additions and 10 deletions

View File

@@ -152,7 +152,7 @@ void CEpgData::start()
toph = topboxheight; 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() ); //printf("line: >%s<\n", text.c_str() );
if (text==" ") 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 aktLine = "";
std::string aktWord = ""; std::string aktWord = "";
@@ -249,7 +249,6 @@ void CEpgData::showText( int startPos, int ypos )
if(epgText[i].second){ if(epgText[i].second){
std::string::size_type pos1 = epgText[i].first.find_first_not_of(tok, 0); 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); std::string::size_type pos2 = epgText[i].first.find_first_of(tok, pos1);
while( pos2 != string::npos || pos1 != string::npos ){ while( pos2 != string::npos || pos1 != string::npos ){
switch(count){ switch(count){
case 1: case 1:
@@ -262,7 +261,7 @@ void CEpgData::showText( int startPos, int ypos )
offset += digi; offset += digi;
break; 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++; count++;
pos1 = epgText[i].first.find_first_not_of(tok, pos2); pos1 = epgText[i].first.find_first_not_of(tok, pos2);
pos2 = epgText[i].first.find_first_of(tok, pos1); pos2 = epgText[i].first.find_first_of(tok, pos1);
@@ -270,8 +269,9 @@ void CEpgData::showText( int startPos, int ypos )
offset = 0; offset = 0;
count = 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 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; int sbc = ((textSize - 1)/ medlinecount) + 1;
@@ -1030,7 +1030,7 @@ bool CEpgData::hasFollowScreenings(const t_channel_id /*channel_id*/, const std:
followlist.clear(); followlist.clear();
for (e = evtlist.begin(); e != evtlist.end(); ++e) for (e = evtlist.begin(); e != evtlist.end(); ++e)
{ {
if (e->startTime <= tmp_curent_zeit) if (e->startTime == tmp_curent_zeit)
continue; continue;
if (! e->eventID) if (! e->eventID)
continue; continue;
@@ -1047,6 +1047,7 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st
struct tm *tmStartZeit; struct tm *tmStartZeit;
std::string screening_dates,screening_nodual; std::string screening_dates,screening_nodual;
int count = 0; int count = 0;
int flag = 1;
char tmpstr[256]={0}; char tmpstr[256]={0};
screening_dates = screening_nodual = ""; 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 ); strftime(tmpstr, sizeof(tmpstr), ". %H:%M", tmStartZeit );
screening_dates += tmpstr; screening_dates += tmpstr;
if (e->startTime <= tmp_curent_zeit)
flag = 2;
else
flag = 1;
if (screening_dates != screening_nodual) { if (screening_dates != screening_nodual) {
screening_nodual=screening_dates; screening_nodual=screening_dates;
processTextToArray(screening_dates, true ); // UTF-8 processTextToArray(screening_dates, flag ); // UTF-8
} }
} }
return count; return count;

View File

@@ -73,7 +73,7 @@ class CEpgData
int ox, oy, sx, sy, toph, sb; int ox, oy, sx, sy, toph, sb;
int emptyLineCount, info1_lines; int emptyLineCount, info1_lines;
int textCount; int textCount;
typedef std::pair<std::string,bool> epg_pair; typedef std::pair<std::string,int> epg_pair;
std::vector<epg_pair> epgText; std::vector<epg_pair> epgText;
int topheight,topboxheight; int topheight,topboxheight;
int buttonheight,botboxheight; 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 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 GetPrevNextEPGData( uint64_t id, time_t* startzeit );
void addTextToArray( const std::string & text, bool screening ); void addTextToArray( const std::string & text, int screening );
void processTextToArray(std::string text, bool screening = false); void processTextToArray(std::string text, int screening = 0);
void showText( int startPos, int ypos ); void showText( int startPos, int ypos );
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);