-add: show sore screenings in in extra window

This commit is contained in:
satbaby
2012-08-06 20:22:43 +02:00
parent 36b5be520e
commit ab24c127c8
8 changed files with 56 additions and 23 deletions

View File

@@ -299,6 +299,7 @@ epgextended.presenter Moderator
epgextended.year_of_production Produktionsjahr epgextended.year_of_production Produktionsjahr
epglist.noevents Keine EPG-Information verfügbar. epglist.noevents Keine EPG-Information verfügbar.
epgviewer.More_Screenings Weitere Termine auf diesem Kanal epgviewer.More_Screenings Weitere Termine auf diesem Kanal
epgviewer.More_Screenings_short Weitere Termine
epgviewer.nodetailed Keine ausführlichen Informationen verfügbar epgviewer.nodetailed Keine ausführlichen Informationen verfügbar
epgviewer.notfound Keine Programminformationen (EPG) gefunden epgviewer.notfound Keine Programminformationen (EPG) gefunden
eventfinder.head EPG-Suche eventfinder.head EPG-Suche

View File

@@ -223,6 +223,7 @@ EPGPlus.stretch_mode Stretch Mode
EPGPlus.swap_mode swap mode EPGPlus.swap_mode swap mode
EPGPlus.view_mode view mode EPGPlus.view_mode view mode
epgviewer.More_Screenings More Screenings on this Channel epgviewer.More_Screenings More Screenings on this Channel
epgviewer.More_Screenings_short More Screenings
epgviewer.nodetailed No detailed informations available epgviewer.nodetailed No detailed informations available
epgviewer.notfound no epg found epgviewer.notfound no epg found
eventfinder.head Search in EPG eventfinder.head Search in EPG

View File

@@ -592,10 +592,12 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
// -- display more screenings on the same channel // -- display more screenings on the same channel
// -- 2002-05-03 rasc // -- 2002-05-03 rasc
has_follow_screenings = false;
if (hasFollowScreenings(channel_id, epgData.title)) { if (hasFollowScreenings(channel_id, epgData.title)) {
processTextToArray(""); // UTF-8 processTextToArray(""); // UTF-8
processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_MORE_SCREENINGS)) + ':'); // UTF-8 processTextToArray(std::string(g_Locale->getText(LOCALE_EPGVIEWER_MORE_SCREENINGS)) + ':'); // UTF-8
FollowScreenings(channel_id, epgData.title); FollowScreenings(channel_id, epgData.title);
has_follow_screenings = true;
} }
COSDFader fader(g_settings.menu_Content_alpha); COSDFader fader(g_settings.menu_Content_alpha);
@@ -847,7 +849,24 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
printf("timerd not available\n"); printf("timerd not available\n");
break; break;
} }
case CRCInput::RC_blue:
{
if(!followlist.empty()){
hide();
CNeutrinoEventList *ee;
ee = new CNeutrinoEventList;
ee->exec(channel_id, g_Locale->getText(LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT),"","",followlist); // UTF-8
delete ee;
if (!bigFonts && g_settings.bigFonts) {
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO1]->getSize() * BIG_FONT_FAKTOR));
g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->setSize((int)(g_Font[SNeutrinoSettings::FONT_TYPE_EPG_INFO2]->getSize() * BIG_FONT_FAKTOR));
}
bigFonts = g_settings.bigFonts;
show(channel_id,epgData.eventID,&epgData.epg_times.startzeit,false);
}
break;
}
case CRCInput::RC_info: case CRCInput::RC_info:
case CRCInput::RC_help: case CRCInput::RC_help:
bigFonts = bigFonts ? false : true; bigFonts = bigFonts ? false : true;
@@ -1072,7 +1091,9 @@ int CEpgData::FollowScreenings (const t_channel_id /*channel_id*/, const std::st
const struct button_label EpgButtons[] = const struct button_label EpgButtons[] =
{ {
{ NEUTRINO_ICON_BUTTON_RED , LOCALE_TIMERBAR_RECORDEVENT }, { NEUTRINO_ICON_BUTTON_RED , LOCALE_TIMERBAR_RECORDEVENT },
{ NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TIMERBAR_CHANNELSWITCH } { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_TIMERBAR_CHANNELSWITCH },
{ NEUTRINO_ICON_BUTTON_BLUE, LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT }
}; };
void CEpgData::showTimerEventBar (bool pshow) void CEpgData::showTimerEventBar (bool pshow)
@@ -1097,9 +1118,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, 2, EpgButtons, h); ::paintButtons(x, y, 0, has_follow_screenings ? 3:2, EpgButtons, h);
else else
::paintButtons(x, y, 0, 1, &EpgButtons[1], h); ::paintButtons(x, y, 0, has_follow_screenings ? 2:1, &EpgButtons[1], h);
#if 0 #if 0
// Button: Timer Record & Channelswitch // Button: Timer Record & Channelswitch

View File

@@ -62,6 +62,7 @@ class CEpgData
std::string epg_end; std::string epg_end;
int epg_done; int epg_done;
bool bigFonts; bool bigFonts;
bool has_follow_screenings;
time_t tmp_curent_zeit; time_t tmp_curent_zeit;
uint64_t prev_id; uint64_t prev_id;

View File

@@ -248,12 +248,12 @@ void CNeutrinoEventList::readEvents(const t_channel_id channel_id)
} }
int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& channelname, const std::string& channelname_prev, const std::string& channelname_next) // UTF-8 int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& channelname, const std::string& channelname_prev, const std::string& channelname_next,const CChannelEventList &followlist) // UTF-8
{ {
neutrino_msg_t msg; neutrino_msg_t msg;
neutrino_msg_data_t data; neutrino_msg_data_t data;
bool in_search = false; bool in_search = false;
showfollow = false;
// Calculate iheight // Calculate iheight
struct button_label tmp_button[1] = { { NEUTRINO_ICON_BUTTON_RED, NONEXISTANT_LOCALE } }; struct button_label tmp_button[1] = { { NEUTRINO_ICON_BUTTON_RED, NONEXISTANT_LOCALE } };
iheight = ::paintButtons(0, 0, 0, 1, tmp_button, 0, 0, false, COL_INFOBAR_SHADOW, NULL, 0, false); iheight = ::paintButtons(0, 0, 0, 1, tmp_button, 0, 0, false, COL_INFOBAR_SHADOW, NULL, 0, false);
@@ -300,8 +300,13 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c
COSDFader fader(g_settings.menu_Content_alpha); COSDFader fader(g_settings.menu_Content_alpha);
fader.StartFadeIn(); fader.StartFadeIn();
if(!followlist.empty()){
readEvents(channel_id); insert_iterator <std::vector<CChannelEvent> >ii(evtlist,evtlist.begin());
copy(followlist.begin(), followlist.end(), ii);
showfollow = true;
}else{
readEvents(channel_id);
}
UpdateTimerList(); UpdateTimerList();
if(channelname_prev.empty(), channelname_next.empty()){ if(channelname_prev.empty(), channelname_next.empty()){
@@ -385,7 +390,7 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c
showFunctionBar(paint_buttonbar, channel_id); showFunctionBar(paint_buttonbar, channel_id);
} }
//sort //sort
else if (msg == (neutrino_msg_t)g_settings.key_channelList_sort) else if (!showfollow && (msg == (neutrino_msg_t)g_settings.key_channelList_sort))
{ {
uint64_t selected_id = evtlist[selected].eventID; uint64_t selected_id = evtlist[selected].eventID;
if(sort_mode==0) if(sort_mode==0)
@@ -635,7 +640,7 @@ int CNeutrinoEventList::exec(const t_channel_id channel_id, const std::string& c
} }
} }
} }
else if ( msg==CRCInput::RC_green ) else if (!showfollow && ( msg==CRCInput::RC_green ))
{ {
in_search = findEvents(); in_search = findEvents();
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]);
@@ -938,11 +943,12 @@ void CNeutrinoEventList::showFunctionBar (bool show, t_channel_id channel_id)
bx+=w_button+4; bx+=w_button+4;
} }
} }
// Button: Search
FunctionBarHeight = std::max(::paintButtons(bx, by, w_button, NUM_EVENTLIST_SECOND_BUTTON, EventListSecondButton), FunctionBarHeight);
bx+=w_button+4;
if(!showfollow){
// Button: Search
FunctionBarHeight = std::max(::paintButtons(bx, by, w_button, NUM_EVENTLIST_SECOND_BUTTON, EventListSecondButton), FunctionBarHeight);
bx+=w_button+4;
}
// Button: Timer Channelswitch // Button: Timer Channelswitch
if ((uint) g_settings.key_channelList_addremind != CRCInput::RC_nokey) { if ((uint) g_settings.key_channelList_addremind != CRCInput::RC_nokey) {
if (!g_settings.minimode) { if (!g_settings.minimode) {
@@ -961,14 +967,15 @@ void CNeutrinoEventList::showFunctionBar (bool show, t_channel_id channel_id)
FunctionBarHeight = std::max(::paintButtons(bx, by, w_button, NUM_EVENTLIST_THIRD_BUTTON, EventListThirdButton), FunctionBarHeight); FunctionBarHeight = std::max(::paintButtons(bx, by, w_button, NUM_EVENTLIST_THIRD_BUTTON, EventListThirdButton), FunctionBarHeight);
bx+=w_button+4; bx+=w_button+4;
} }
if(!showfollow){
// Button: Event Re-Sort // Button: Event Re-Sort
if ((uint) g_settings.key_channelList_sort != CRCInput::RC_nokey) { if ((uint) g_settings.key_channelList_sort != CRCInput::RC_nokey) {
// FIXME : display other icons depending on g_settings.key_channelList_sort // FIXME : display other icons depending on g_settings.key_channelList_sort
keyhelper.get(&dummy, &icon, g_settings.key_channelList_sort); keyhelper.get(&dummy, &icon, g_settings.key_channelList_sort);
EventListFourthButton[0].button = icon; EventListFourthButton[0].button = icon;
FunctionBarHeight = std::max(::paintButtons(bx, by, w_button, NUM_EVENTLIST_THIRD_BUTTON, EventListFourthButton), FunctionBarHeight); FunctionBarHeight = std::max(::paintButtons(bx, by, w_button, NUM_EVENTLIST_THIRD_BUTTON, EventListFourthButton), FunctionBarHeight);
// bx+=w_button+4; // bx+=w_button+4;
}
} }
} }

View File

@@ -118,13 +118,13 @@ class CNeutrinoEventList
int timerPost; int timerPost;
void UpdateTimerList(void); void UpdateTimerList(void);
bool HasTimerConflicts(time_t starttime, time_t duration, event_id_t * epg_ID); bool HasTimerConflicts(time_t starttime, time_t duration, event_id_t * epg_ID);
bool showfollow;
CTimerd::CTimerEventTypes isScheduled(t_channel_id channel_id, CChannelEvent * event, int * tID = NULL); CTimerd::CTimerEventTypes isScheduled(t_channel_id channel_id, CChannelEvent * event, int * tID = NULL);
public: public:
CNeutrinoEventList(); CNeutrinoEventList();
~CNeutrinoEventList(); ~CNeutrinoEventList();
int exec(const t_channel_id channel_id, const std::string& channelname, const std::string& prev = "", const std::string& next = ""); // UTF-8 int exec(const t_channel_id channel_id, const std::string& channelname, const std::string& prev = "", const std::string& next = "", const CChannelEventList &followlist = CChannelEventList ()); // UTF-8
}; };
class CEventListHandler : public CMenuTarget class CEventListHandler : public CMenuTarget

View File

@@ -250,6 +250,7 @@ typedef enum
LOCALE_EPGPLUS_SWAP_MODE, LOCALE_EPGPLUS_SWAP_MODE,
LOCALE_EPGPLUS_VIEW_MODE, LOCALE_EPGPLUS_VIEW_MODE,
LOCALE_EPGVIEWER_MORE_SCREENINGS, LOCALE_EPGVIEWER_MORE_SCREENINGS,
LOCALE_EPGVIEWER_MORE_SCREENINGS_SHORT,
LOCALE_EPGVIEWER_NODETAILED, LOCALE_EPGVIEWER_NODETAILED,
LOCALE_EPGVIEWER_NOTFOUND, LOCALE_EPGVIEWER_NOTFOUND,
LOCALE_EVENTFINDER_HEAD, LOCALE_EVENTFINDER_HEAD,

View File

@@ -250,6 +250,7 @@ const char * locale_real_names[] =
"EPGPlus.swap_mode", "EPGPlus.swap_mode",
"EPGPlus.view_mode", "EPGPlus.view_mode",
"epgviewer.More_Screenings", "epgviewer.More_Screenings",
"epgviewer.More_Screenings_short",
"epgviewer.nodetailed", "epgviewer.nodetailed",
"epgviewer.notfound", "epgviewer.notfound",
"eventfinder.head", "eventfinder.head",