fixed dayseparators in schedules menu

This commit is contained in:
louis
2015-05-14 12:09:44 +02:00
parent 8d7584d66e
commit 4ef2c61680
6 changed files with 14 additions and 6 deletions

View File

@@ -319,10 +319,12 @@ void cDisplayMenuItemMainView::CheckPlugins(void) {
cDisplayMenuItemSchedulesView::cDisplayMenuItemSchedulesView(cTemplateViewList *tmplList, const cEvent *event,
const cChannel *channel, eTimerMatch timerMatch,
eMenuCategory cat, bool isEpgSearchFav, bool current, bool selectable)
eMenuCategory cat, bool isEpgSearchFav, bool current,
bool selectable, string dayseparator)
: cDisplayMenuItemView(tmplList, current, selectable) {
this->event = event;
this->channel = channel;
this->dayseparator = dayseparator;
this->timerMatch = timerMatch;
this->cat = cat;
this->isEpgSearchFav = isEpgSearchFav;
@@ -384,6 +386,8 @@ void cDisplayMenuItemSchedulesView::SetTokens(void) {
} else {
stringTokens.insert(pair<string,string>("title", event->Title() ? ParseSeparator(event->Title()) : ""));
}
} else {
stringTokens.insert(pair<string,string>("title", dayseparator));
}
if (channel) {
stringTokens.insert(pair<string,string>("channelname", channel->Name() ? channel->Name() : ""));

View File

@@ -78,13 +78,14 @@ class cDisplayMenuItemSchedulesView: public cDisplayMenuItemView {
private:
const cEvent *event;
const cChannel *channel;
string dayseparator;
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 isEpgSearchFav, bool current, bool selectable);
eMenuCategory cat, bool isEpgSearchFav, bool current, bool selectable, string dayseparator);
virtual ~cDisplayMenuItemSchedulesView();
void SetTokens(void);
void Prepare(void);

View File

@@ -145,14 +145,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 isEpgSearchFav, bool current, bool selectable) {
eMenuCategory cat, bool isEpgSearchFav, bool current, bool selectable, string dayseparator) {
if (index >= itemCount)
return;
if (menuItems[index]) {
menuItems[index]->SetCurrent(current);
return;
}
cDisplayMenuItemView *item = new cDisplayMenuItemSchedulesView(tmplList, event, channel, timerMatch, cat, isEpgSearchFav, current, selectable);
cDisplayMenuItemView *item = new cDisplayMenuItemSchedulesView(tmplList, event, channel, timerMatch, cat, isEpgSearchFav, current, selectable, dayseparator);
menuItems[index] = item;
}

View File

@@ -26,7 +26,7 @@ public:
void AddDefaultMenuItem(int index, string *tabTexts, bool current, bool selectable);
string 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 isEpgSearchFav, bool current, bool selectable);
void AddSchedulesMenuItem(int index, const cEvent *event, const cChannel *channel, eTimerMatch timerMatch, eMenuCategory cat, bool isEpgSearchFav, bool current, bool selectable, string dayseparator);
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);