mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 15:58:31 +00:00
fixed dayseparators in schedules menu
This commit is contained in:
@@ -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() : ""));
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user