diff options
author | louis <louis.braun@gmx.de> | 2015-01-10 10:10:31 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2015-01-10 10:10:31 +0100 |
commit | 74febbfe86b63ac894b40f1d6c5fb2de8c6973b5 (patch) | |
tree | 93f7ae2924f4d847db955b1593d0df990200a647 | |
parent | abcb357b25051bdbcf65c392ad85a3de0bd22b3c (diff) | |
download | vdr-plugin-skindesigner-74febbfe86b63ac894b40f1d6c5fb2de8c6973b5.tar.gz vdr-plugin-skindesigner-74febbfe86b63ac894b40f1d6c5fb2de8c6973b5.tar.bz2 |
fixed bug that EPGSearch Favorites Menu was not displayed correctly
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | displaymenu.c | 8 | ||||
-rw-r--r-- | skins/blackhole/xmlfiles/displaymenuschedules.xml | 22 | ||||
-rw-r--r-- | skins/metrixhd/xmlfiles/displaymenuschedules.xml | 19 | ||||
-rw-r--r-- | skins/nopacity/xmlfiles/displaymenuschedules.xml | 26 | ||||
-rw-r--r-- | skinskeleton/xmlfiles/displaymenuschedules.xml | 3 | ||||
-rw-r--r-- | views/displaymenuitemcurrentview.c | 6 | ||||
-rw-r--r-- | views/displaymenuitemcurrentview.h | 3 | ||||
-rw-r--r-- | views/displaymenuitemview.c | 8 | ||||
-rw-r--r-- | views/displaymenuitemview.h | 3 | ||||
-rw-r--r-- | views/displaymenulistview.c | 4 | ||||
-rw-r--r-- | views/displaymenulistview.h | 2 | ||||
-rw-r--r-- | views/displaymenurootview.h | 1 | ||||
-rw-r--r-- | views/displaymenuview.c | 4 | ||||
-rw-r--r-- | views/displaymenuview.h | 3 |
15 files changed, 98 insertions, 18 deletions
@@ -140,4 +140,6 @@ Version 0.1.2 - display only active remote timers in main menu - fixed two possible null pointer accesses in displaymenurootview -- fixed bug in displayvolumeview +- fixed bug that EPGSearch Favorites Menu was not displayed correctly, + introduced "whatsonfavorites" Token in displaymenuschedules + diff --git a/displaymenu.c b/displaymenu.c index f5f64ec..5a1a3e6 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -94,6 +94,11 @@ bool cSDDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current, return false; if (config.blockFlush) rootView->LockFlush(); + bool isFav = false; + if (MenuCategory() == mcSchedule && Channel) { + isFav = true; + rootView->SetEpgSearchFavorite(); + } const cChannel *channel = Channel; if (!channel) { channel = rootView->GetChannel(); @@ -102,10 +107,11 @@ bool cSDDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current, channel = Channels.GetByChannelID(Event->ChannelID()); } rootView->SetChannel(channel); + cDisplayMenuListView *list = rootView->GetListView(); if (!list) return false; - list->AddSchedulesMenuItem(Index, Event, channel, TimerMatch, MenuCategory(), Current, Selectable); + list->AddSchedulesMenuItem(Index, Event, channel, TimerMatch, MenuCategory(), isFav, Current, Selectable); if (state == vsIdle) state = vsMenuUpdate; return true; diff --git a/skins/blackhole/xmlfiles/displaymenuschedules.xml b/skins/blackhole/xmlfiles/displaymenuschedules.xml index 4304bef..7bf5d29 100644 --- a/skins/blackhole/xmlfiles/displaymenuschedules.xml +++ b/skins/blackhole/xmlfiles/displaymenuschedules.xml @@ -11,10 +11,11 @@ {whatson} true if menu "What's on" is displayed {whatsonnow} true if menu "What's on now" is displayed {whatsonnext} true if menu "What's on next" is displayed + {whatsonfavorites} true if EPGSearch Favorites menu is displayed --> <header> <area x="0" y="0" width="83%" height="8%" layer="3"> - <drawtext condition="{whatsonnow}||{whatsonnext}" x="5" valign="center" font="{semibold}" fontsize="100%" color="{clrWhite}" text="{title}" /> + <drawtext condition="{whatsonnow}||{whatsonnext}||{whatsonfavorites}" x="5" valign="center" font="{semibold}" fontsize="100%" color="{clrWhite}" text="{title}" /> <drawimage name="logo" condition="{whatson}" imagetype="channellogo" path="{channelid}" x="1%" width="5%" height="90%" align="left" valign="center" /> <drawtext condition="{whatson}" x="{posx(logo)} + {width(logo)}+20" valign="center" font="{semibold}" fontsize="100%" color="{clrWhite}" text="{channelnumber} - {channelname}" /> </area> @@ -55,6 +56,7 @@ {whatson} true if menu "What's on" is displayed {whatsonnow} true if menu "What's on now" is displayed {whatsonnext} true if menu "What's on next" is displayed + {whatsonfavorites} true if EPGSearch Favorites menu is displayed {timerpartitial} true if partitial timer is set for the event {timerfull} true if full timer is set for the event {hasVPS} true if event has VPS information @@ -127,6 +129,23 @@ <areascroll scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" condition="not{separator}++{whatsonnext}++{current}" x="11%" width="39%" layer="3"> <drawtext name="menutext" x="0" y="35%" font="{regular}" fontsize="60%" color="{clrWhite}" text="{title}" /> </areascroll> + <!-- element whatsonfavorites --> + <area condition="not{separator}++{whatsonfavorites}" x="1%" width="9%" layer="3"> + <drawimage name="logo" imagetype="channellogo" path="{channelid}" width="90%" height="90%" align="center" valign="center" /> + </area> + <area condition="not{separator}++{whatsonfavorites}++not{current}" x="11%" width="39%" layer="3"> + <drawtext x="0" y="5%" font="{regular}" fontsize="35%" color="{clrGray}" text="{start} - {stop}" /> + </area> + <areascroll scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" condition="not{separator}++{whatsonfavorites}++not{current}" x="11%" width="39%" layer="3"> + <drawtext name="menutext" x="0" y="35%" font="{regular}" fontsize="60%" color="{clrGray}" text="{title}" /> + </areascroll> + <!-- current element whatsonfavorites --> + <area condition="not{separator}++{whatsonfavorites}++{current}" x="11%" width="39%" layer="3"> + <drawtext x="0" y="5%" font="{regular}" fontsize="35%" color="{clrWhite}" text="{start} - {stop}" /> + </area> + <areascroll scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" condition="not{separator}++{whatsonfavorites}++{current}" x="11%" width="39%" layer="3"> + <drawtext name="menutext" x="0" y="35%" font="{regular}" fontsize="60%" color="{clrWhite}" text="{title}" /> + </areascroll> <!-- day or channel separator --> <area condition="{separator}" x="1%" width="50%" layer="3"> <drawtext x="0" valign="center" font="{regular}" fontsize="70%" color="{clrWhite}" text="{title}" /> @@ -165,6 +184,7 @@ {whatson} true if menu "What's on" is displayed {whatsonnow} true if menu "What's on now" is displayed {whatsonnext} true if menu "What's on next" is displayed + {whatsonfavorites} true if EPGSearch Favorites menu is displayed {schedule[]} array with next 10 schedules, only for whatsonnow and whatsonnext {schedule[title]} title of event {schedule[shorttext]} shorttext of event diff --git a/skins/metrixhd/xmlfiles/displaymenuschedules.xml b/skins/metrixhd/xmlfiles/displaymenuschedules.xml index 75a29dc..58300c6 100644 --- a/skins/metrixhd/xmlfiles/displaymenuschedules.xml +++ b/skins/metrixhd/xmlfiles/displaymenuschedules.xml @@ -11,11 +11,12 @@ {whatson} true if menu "What's on" is displayed {whatsonnow} true if menu "What's on now" is displayed {whatsonnext} true if menu "What's on next" is displayed + {whatsonfavorites} true if EPGSearch Favorites menu is displayed --> <header> <area x="0" y="0" width="38%" height="10%" layer="2"> - <drawimage condition="{whatsonnow}||{whatsonnext}" name="menuicon" imagetype="menuicon" path="{icon}" x="5" valign="center" width="{areaheight}*8/10" height="80%"/> - <drawtext condition="{whatsonnow}||{whatsonnext}" x="{width(menuicon)} + 15" valign="center" font="{light}" fontsize="80%" color="{clrWhite}" text="{title}" /> + <drawimage condition="{whatsonnow}||{whatsonnext}||{whatsonfavorites}" name="menuicon" imagetype="menuicon" path="{icon}" x="5" valign="center" width="{areaheight}*8/10" height="80%"/> + <drawtext condition="{whatsonnow}||{whatsonnext}||{whatsonfavorites}" x="{width(menuicon)} + 15" valign="center" font="{light}" fontsize="80%" color="{clrWhite}" text="{title}" /> <drawimage name="logo" condition="{whatson}" imagetype="channellogo" path="{channelid}" x="0" width="15%" height="100%" align="left" valign="center" /> <drawtext condition="{whatson}" x="{width(logo)}+20" valign="center" font="{light}" fontsize="80%" color="{clrWhite}" text="{channelnumber} - {channelname}" /> </area> @@ -47,6 +48,7 @@ {whatson} true if menu "What's on" is displayed {whatsonnow} true if menu "What's on now" is displayed {whatsonnext} true if menu "What's on next" is displayed + {whatsonfavorites} true if EPGSearch Favorites menu is displayed {timerpartitial} true if partitial timer is set for the event {timerfull} true if full timer is set for the event {hasVPS} true if event has VPS information @@ -104,6 +106,19 @@ <areascroll condition="not{separator}++{whatsonnext}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="7%" width="52%" layer="4"> <drawtext name="menutext" x="10" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" /> </areascroll> + <!-- WHATSONFAVORITES --> + <area condition="not{separator}++{whatsonfavorites}" x="1%" width="6%" layer="3"> + <drawimage name="logo" imagetype="channellogo" path="{channelid}" x="0" width="100%" height="100%" valign="center" /> + </area> + <area condition="not{separator}++{whatsonfavorites}++{timerfull}" x="53%" width="6%" layer="4"> + <drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.9*{areaheight} - 10" width="0.9*{areaheight}" height="0.9*{areaheight}" valign="center" /> + </area> + <area condition="not{separator}++{whatsonfavorites}++{timerpartitial}" x="53%" width="6%" layer="5"> + <drawimage imagetype="icon" path="ico_activetimer" x="{areawidth} - 0.5*{areaheight} - 10" width="0.5*{areaheight}" height="0.5*{areaheight}" valign="center" /> + </area> + <areascroll condition="not{separator}++{whatsonfavorites}" scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" x="7%" width="52%" layer="4"> + <drawtext name="menutext" x="10" valign="center" font="{light}" fontsize="95%" color="{clrWhite}" text="{start} {title}" /> + </areascroll> <!-- Separator --> <area condition="{separator}" x="0" width="68%" layer="3"> <drawtext x="20" valign="center" font="{light}" fontsize="95%" color="{clrBlueLight}" text="{title}" /> diff --git a/skins/nopacity/xmlfiles/displaymenuschedules.xml b/skins/nopacity/xmlfiles/displaymenuschedules.xml index ddba121..130e5e0 100644 --- a/skins/nopacity/xmlfiles/displaymenuschedules.xml +++ b/skins/nopacity/xmlfiles/displaymenuschedules.xml @@ -9,10 +9,11 @@ {whatson} true if menu "What's on" is displayed {whatsonnow} true if menu "What's on now" is displayed {whatsonnext} true if menu "What's on next" is displayed + {whatsonfavorites} true if EPGSearch Favorites menu is displayed --> <header> <area x="1%" y="0" width="64%" height="10%" layer="2"> - <drawtext condition="{whatsonnow}||{whatsonnext}" x="5" valign="center" font="{vdrOsd}" fontsize="80%" color="{clrWhite}" text="{title}" /> + <drawtext condition="{whatsonnow}||{whatsonnext}||{whatsonfavorites}" x="5" valign="center" font="{vdrOsd}" fontsize="80%" color="{clrWhite}" text="{title}" /> <drawimage name="logo" condition="{whatson}" imagetype="channellogo" path="{channelid}" x="0" width="15%" height="100%" align="left" valign="center" /> <drawtext condition="{whatson}" x="{width(logo)}+20" valign="center" font="{vdrOsd}" fontsize="50%" color="{clrWhite}" text="{channelnumber} - {channelname}" /> </area> @@ -45,6 +46,7 @@ {whatson} true if menu "What's on" is displayed {whatsonnow} true if menu "What's on now" is displayed {whatsonnext} true if menu "What's on next" is displayed + {whatsonfavorites} true if EPGSearch Favorites menu is displayed {timerpartitial} true if partitial timer is set for the event {timerfull} true if full timer is set for the event {hasVPS} true if event has VPS information @@ -123,7 +125,27 @@ <areascroll scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" condition="not{separator}++{whatsonnext}++{current}" x="9%" width="18%" layer="3"> <drawtext name="menutext" x="0" y="40%" font="{vdrOsd}" fontsize="55%" color="{clrFontMenuItemSelected}" text="{title}" /> </areascroll> - <!-- day or channel separator --> + <!-- element whatsonfavorites --> + <area condition="not{separator}++{whatsonfavorites}" x="5" width="8%" layer="3"> + <drawimage name="logo" imagetype="channellogo" path="{channelid}" x="0" width="100%" height="94%" valign="center" /> + </area> + <area condition="not{separator}++{whatsonfavorites}++not{current}" x="9%" width="18%" layer="3"> + <drawtext x="0" y="5%" font="{vdrOsd}" fontsize="40%" color="{clrFontMenuItem}" text="{start} - {stop}" /> + <drawimage condition="{timerfull}" imagetype="icon" path="ico_activetimer" x="{areawidth} - {areaheight}*5/10 - 10" y="10" width="{areaheight}*5/10" height="{areaheight}*5/10" /> + <drawimage condition="{timerpartitial}" imagetype="icon" path="ico_activetimer" x="{areawidth} - {areaheight}*3/10 - 10" y="10" width="{areaheight}*3/10" height="{areaheight}*3/10" /> + </area> + <areascroll scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" condition="not{separator}++{whatsonfavorites}++not{current}" x="9%" width="18%" layer="3"> + <drawtext name="menutext" x="0" y="40%" font="{vdrOsd}" fontsize="55%" color="{clrFontMenuItem}" text="{title}" /> + </areascroll> + <!-- current element whatsonfavorites --> + <area condition="not{separator}++{whatsonfavorites}++{current}" x="9%" width="18%" layer="3"> + <drawtext x="0" y="5%" font="{vdrOsd}" fontsize="40%" color="{clrFontMenuItemSelected}" text="{start} - {stop}" /> + <drawimage condition="{timerfull}" imagetype="icon" path="ico_activetimer" x="{areawidth} - {areaheight}*5/10 - 10" y="10" width="{areaheight}*5/10" height="{areaheight}*5/10" /> + <drawimage condition="{timerpartitial}" imagetype="icon" path="ico_activetimer" x="{areawidth} - {areaheight}*3/10 - 10" y="10" width="{areaheight}*3/10" height="{areaheight}*3/10" /> + </area> + <areascroll scrollelement="menutext" mode="forthandback" orientation="horizontal" delay="1000" scrollspeed="medium" condition="not{separator}++{whatsonfavorites}++{current}" x="9%" width="18%" layer="3"> + <drawtext name="menutext" x="0" y="40%" font="{vdrOsd}" fontsize="55%" color="{clrFontMenuItemSelected}" text="{title}" /> + </areascroll> <!-- day or channel separator --> <area condition="{separator}" x="0" width="28%" layer="3"> <drawimage name="sep" imagetype="icon" path="ico_daydelimiter" x="10" valign="center" width="{areaheight}-10" height="{areaheight}-10"/> <drawtext x="{width(sep)} + 20" valign="center" font="{vdrOsd}" fontsize="60%" color="{clrFontInactive}" text="{title}" /> diff --git a/skinskeleton/xmlfiles/displaymenuschedules.xml b/skinskeleton/xmlfiles/displaymenuschedules.xml index ad4c7ae..58c579d 100644 --- a/skinskeleton/xmlfiles/displaymenuschedules.xml +++ b/skinskeleton/xmlfiles/displaymenuschedules.xml @@ -11,6 +11,7 @@ {whatson} true if menu "What's on" is displayed {whatsonnow} true if menu "What's on now" is displayed {whatsonnext} true if menu "What's on next" is displayed + {whatsonfavorites} true if EPGSearch Favorites menu is displayed --> <header> </header> @@ -41,6 +42,7 @@ {whatson} true if menu "What's on" is displayed {whatsonnow} true if menu "What's on now" is displayed {whatsonnext} true if menu "What's on next" is displayed + {whatsonfavorites} true if EPGSearch Favorites menu is displayed {timerpartitial} true if partitial timer is set for the event {timerfull} true if full timer is set for the event {hasVPS} true if event has VPS information @@ -80,6 +82,7 @@ {whatson} true if menu "What's on" is displayed {whatsonnow} true if menu "What's on now" is displayed {whatsonnext} true if menu "What's on next" is displayed + {whatsonfavorites} true if EPGSearch Favorites menu is displayed {schedule[]} array with next 10 schedules, only for whatsonnow and whatsonnext {schedule[title]} title of event {schedule[shorttext]} shorttext of event diff --git a/views/displaymenuitemcurrentview.c b/views/displaymenuitemcurrentview.c index de84e8b..b60d4ef 100644 --- a/views/displaymenuitemcurrentview.c +++ b/views/displaymenuitemcurrentview.c @@ -104,12 +104,13 @@ void cDisplayMenuItemCurrentMainView::Action(void) { * cDisplayMenuItemCurrentSchedulesView *************************************************************/ -cDisplayMenuItemCurrentSchedulesView::cDisplayMenuItemCurrentSchedulesView(cTemplateViewElement *tmplCurrent, const cEvent *event, const cChannel *channel, eTimerMatch timerMatch, eMenuCategory cat) +cDisplayMenuItemCurrentSchedulesView::cDisplayMenuItemCurrentSchedulesView(cTemplateViewElement *tmplCurrent, const cEvent *event, const cChannel *channel, eTimerMatch timerMatch, eMenuCategory cat, bool isEpgSearchFav) : cDisplayMenuItemCurrentView(tmplCurrent) { this->event = event; this->channel = channel; this->timerMatch = timerMatch; this->cat = cat; + this->isEpgSearchFav = isEpgSearchFav; } cDisplayMenuItemCurrentSchedulesView::~cDisplayMenuItemCurrentSchedulesView() { @@ -120,9 +121,10 @@ void cDisplayMenuItemCurrentSchedulesView::Prepare(void) { void cDisplayMenuItemCurrentSchedulesView::Render(void) { - intTokens.insert(pair<string,int>("whatson", (cat == mcSchedule) ? true: false)); + intTokens.insert(pair<string,int>("whatson", (cat == mcSchedule)&&(!isEpgSearchFav) ? true: false)); intTokens.insert(pair<string,int>("whatsonnow", (cat == mcScheduleNow) ? true: false)); intTokens.insert(pair<string,int>("whatsonnext", (cat == mcScheduleNext) ? true: false)); + intTokens.insert(pair<string,int>("whatsonfavorites", isEpgSearchFav ? true: false)); if (timerMatch == tmFull) { intTokens.insert(pair<string,int>("timerpartitial", false)); intTokens.insert(pair<string,int>("timerfull", true)); diff --git a/views/displaymenuitemcurrentview.h b/views/displaymenuitemcurrentview.h index e88742f..680d9c8 100644 --- a/views/displaymenuitemcurrentview.h +++ b/views/displaymenuitemcurrentview.h @@ -42,10 +42,11 @@ private: const cChannel *channel; eTimerMatch timerMatch; eMenuCategory cat; + bool isEpgSearchFav; void Action(void); void ReadSchedules(vector< map<string,string> > *schedulesTokens); public: - cDisplayMenuItemCurrentSchedulesView(cTemplateViewElement *tmplCurrent, const cEvent *event, const cChannel *channel, eTimerMatch timerMatch, eMenuCategory cat); + cDisplayMenuItemCurrentSchedulesView(cTemplateViewElement *tmplCurrent, const cEvent *event, const cChannel *channel, eTimerMatch timerMatch, eMenuCategory cat, bool isEpgSearchFav); virtual ~cDisplayMenuItemCurrentSchedulesView(); void Prepare(void); void Render(void); diff --git a/views/displaymenuitemview.c b/views/displaymenuitemview.c index d6b43a4..12ed4ee 100644 --- a/views/displaymenuitemview.c +++ b/views/displaymenuitemview.c @@ -267,12 +267,13 @@ void cDisplayMenuItemMainView::SplitMenuText(void) { cDisplayMenuItemSchedulesView::cDisplayMenuItemSchedulesView(cTemplateViewList *tmplList, const cEvent *event,
const cChannel *channel, eTimerMatch timerMatch,
- eMenuCategory cat, bool current, bool selectable)
+ eMenuCategory cat, bool isEpgSearchFav, bool current, bool selectable)
: cDisplayMenuItemView(tmplList, current, selectable) {
this->event = event;
this->channel = channel;
this->timerMatch = timerMatch;
this->cat = cat;
+ this->isEpgSearchFav = isEpgSearchFav;
}
cDisplayMenuItemSchedulesView::~cDisplayMenuItemSchedulesView() {
@@ -285,9 +286,10 @@ void cDisplayMenuItemSchedulesView::SetTokens(void) { intTokens.insert(pair<string,int>("current", current));
intTokens.insert(pair<string,int>("separator", !selectable));
intTokens.insert(pair<string,int>("nummenuitem", num+1));
- intTokens.insert(pair<string,int>("whatson", (cat == mcSchedule) ? true: false));
+ intTokens.insert(pair<string,int>("whatson", (cat == mcSchedule)&&(!isEpgSearchFav) ? true: false));
intTokens.insert(pair<string,int>("whatsonnow", (cat == mcScheduleNow) ? true: false));
intTokens.insert(pair<string,int>("whatsonnext", (cat == mcScheduleNext) ? true: false));
+ intTokens.insert(pair<string,int>("whatsonfavorites", isEpgSearchFav ? true: false));
if (timerMatch == tmFull) {
intTokens.insert(pair<string,int>("timerpartitial", false));
intTokens.insert(pair<string,int>("timerfull", true));
@@ -360,7 +362,7 @@ void cDisplayMenuItemSchedulesView::Render(void) { if (current) {
cTemplateViewElement *tmplCurrent = tmplList->GetListElementCurrent();
if (tmplCurrent) {
- currentView = new cDisplayMenuItemCurrentSchedulesView(tmplCurrent, event, channel, timerMatch, cat);
+ currentView = new cDisplayMenuItemCurrentSchedulesView(tmplCurrent, event, channel, timerMatch, cat, isEpgSearchFav);
currentView->Start();
}
}
diff --git a/views/displaymenuitemview.h b/views/displaymenuitemview.h index d47dadd..e9cfd5f 100644 --- a/views/displaymenuitemview.h +++ b/views/displaymenuitemview.h @@ -74,10 +74,11 @@ private: const cChannel *channel; eTimerMatch timerMatch; eMenuCategory cat; + bool isEpgSearchFav; string ParseSeparator(string sep); public: cDisplayMenuItemSchedulesView(cTemplateViewList *tmplList, const cEvent *event, const cChannel *channel, eTimerMatch timerMatch, - eMenuCategory cat, bool current, bool selectable); + eMenuCategory cat, bool isEpgSearchFav, bool current, bool selectable); virtual ~cDisplayMenuItemSchedulesView(); void SetTokens(void); void Prepare(void); diff --git a/views/displaymenulistview.c b/views/displaymenulistview.c index 6416857..3a51b82 100644 --- a/views/displaymenulistview.c +++ b/views/displaymenulistview.c @@ -138,14 +138,14 @@ void cDisplayMenuListView::AddSetupMenuItem(int index, const char *itemText, boo }
void cDisplayMenuListView::AddSchedulesMenuItem(int index, const cEvent *event, const cChannel *channel, eTimerMatch timerMatch,
- eMenuCategory cat, bool current, bool selectable) {
+ eMenuCategory cat, bool isEpgSearchFav, bool current, bool selectable) {
if (index >= itemCount)
return;
if (menuItems[index]) {
menuItems[index]->SetCurrent(current);
return;
}
- cDisplayMenuItemView *item = new cDisplayMenuItemSchedulesView(tmplList, event, channel, timerMatch, cat, current, selectable);
+ cDisplayMenuItemView *item = new cDisplayMenuItemSchedulesView(tmplList, event, channel, timerMatch, cat, isEpgSearchFav, current, selectable);
menuItems[index] = item;
}
diff --git a/views/displaymenulistview.h b/views/displaymenulistview.h index 2d9d30f..a407020 100644 --- a/views/displaymenulistview.h +++ b/views/displaymenulistview.h @@ -23,7 +23,7 @@ public: void AddDefaultMenuItem(int index, string *tabTexts, bool current, bool selectable); void AddMainMenuItem(int index, const char *itemText, bool current, bool selectable); void AddSetupMenuItem(int index, const char *itemText, bool current, bool selectable); - void AddSchedulesMenuItem(int index, const cEvent *event, const cChannel *channel, eTimerMatch timerMatch, eMenuCategory cat, bool current, bool selectable); + void AddSchedulesMenuItem(int index, const cEvent *event, const cChannel *channel, eTimerMatch timerMatch, eMenuCategory cat, bool isEpgSearchFav, bool current, bool selectable); void AddChannelsMenuItem(int index, const cChannel *channel, bool withProvider, bool current, bool selectable); void AddTimersMenuItem(int index, const cTimer *timer, bool current, bool selectable); void AddRecordingMenuItem(int index, const cRecording *recording, int level, int total, int isNew, bool current, bool selectable); diff --git a/views/displaymenurootview.h b/views/displaymenurootview.h index 33a78a9..b9c8c81 100644 --- a/views/displaymenurootview.h +++ b/views/displaymenurootview.h @@ -50,6 +50,7 @@ public: void SetTitle(const char *title); void SetChannel(const cChannel *channel) { view->SetChannel(channel); }; const cChannel *GetChannel(void) { return view->GetChannel(); }; + void SetEpgSearchFavorite(void) { if (view) view->SetEpgSearchFavorite(); }; void SetButtonTexts(const char *Red, const char *Green, const char *Yellow, const char *Blue); void SetTabs(int tab1, int tab2, int tab3, int tab4, int tab5); void SetMessage(eMessageType type, const char *text); diff --git a/views/displaymenuview.c b/views/displaymenuview.c index e7ec491..1487ce1 100644 --- a/views/displaymenuview.c +++ b/views/displaymenuview.c @@ -599,6 +599,7 @@ void cDisplayMenuMainView::DrawCustomTokens(void) { cDisplayMenuSchedulesView::cDisplayMenuSchedulesView(cTemplateView *tmplView, eMenuCategory menuCat, bool menuInit) : cDisplayMenuView(tmplView, menuInit) { cat = menuCat; channel = NULL; + isEpgSearchFavoritesMenu = false; } cDisplayMenuSchedulesView::~cDisplayMenuSchedulesView() { @@ -614,9 +615,10 @@ bool cDisplayMenuSchedulesView::DrawHeader(void) { map < string, string > stringTokens; map < string, int > intTokens; - intTokens.insert(pair<string,int>("whatson", (cat == mcSchedule) ? true: false)); + intTokens.insert(pair<string,int>("whatson", (cat == mcSchedule)&&(!isEpgSearchFavoritesMenu) ? true: false)); intTokens.insert(pair<string,int>("whatsonnow", (cat == mcScheduleNow) ? true: false)); intTokens.insert(pair<string,int>("whatsonnext", (cat == mcScheduleNext) ? true: false)); + intTokens.insert(pair<string,int>("whatsonfavorites", isEpgSearchFavoritesMenu ? true: false)); stringTokens.insert(pair<string,string>("title", menuTitle)); stringTokens.insert(pair<string,string>("vdrversion", VDRVERSION)); diff --git a/views/displaymenuview.h b/views/displaymenuview.h index da1c55c..c66ae39 100644 --- a/views/displaymenuview.h +++ b/views/displaymenuview.h @@ -18,6 +18,7 @@ public: void SetTitle(const char *title) {menuTitle = title; }; virtual void SetChannel(const cChannel *channel) {}; virtual const cChannel *GetChannel(void) { return NULL; }; + virtual void SetEpgSearchFavorite(void) {}; void SetButtonTexts(string *buttonTexts) { this->buttonTexts = buttonTexts; }; bool DrawBackground(void); virtual bool DrawHeader(void); @@ -52,11 +53,13 @@ public: class cDisplayMenuSchedulesView : public cDisplayMenuView { private: const cChannel *channel; + bool isEpgSearchFavoritesMenu; public: cDisplayMenuSchedulesView(cTemplateView *tmplView, eMenuCategory menuCat, bool menuInit); virtual ~cDisplayMenuSchedulesView(); void SetChannel(const cChannel *channel) { if (channel) this->channel = channel; }; const cChannel *GetChannel(void) { return channel; }; + void SetEpgSearchFavorite(void) { isEpgSearchFavoritesMenu = true; }; bool DrawHeader(void); }; |