mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed dayseparators in schedules menu
This commit is contained in:
parent
8d7584d66e
commit
4ef2c61680
1
HISTORY
1
HISTORY
@ -323,4 +323,5 @@ Version 0.4.5
|
||||
- implemented shiftout for views
|
||||
- fixed blinking for animated views
|
||||
- chachged displaymessage in menus to detachable
|
||||
- fixed dayseparators in schedules menu
|
||||
|
||||
|
@ -122,7 +122,7 @@ bool cSDDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current,
|
||||
cDisplayMenuListView *list = rootView->GetListView();
|
||||
if (!list)
|
||||
return false;
|
||||
list->AddSchedulesMenuItem(Index, Event, channel, TimerMatch, MenuCategory(), isFav, Current, Selectable);
|
||||
list->AddSchedulesMenuItem(Index, Event, channel, TimerMatch, MenuCategory(), isFav, Current, Selectable, "");
|
||||
if (state == vsIdle)
|
||||
state = vsMenuUpdate;
|
||||
return true;
|
||||
@ -209,6 +209,8 @@ void cSDDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool Sel
|
||||
}
|
||||
} else if (cat == mcSetup && rootView->SubViewAvailable()) {
|
||||
list->AddSetupMenuItem(Index, Text, Current, Selectable);
|
||||
} else if ((cat == mcSchedule || cat == mcScheduleNow || cat == mcScheduleNext) && rootView->SubViewAvailable()) {
|
||||
list->AddSchedulesMenuItem(Index, NULL, NULL, tmNone, MenuCategory(), false, Current, Selectable, Text);
|
||||
} else {
|
||||
rootView->CorrectDefaultMenu();
|
||||
string *tabTexts = new string[MaxTabs];
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user