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
|
- implemented shiftout for views
|
||||||
- fixed blinking for animated views
|
- fixed blinking for animated views
|
||||||
- chachged displaymessage in menus to detachable
|
- 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();
|
cDisplayMenuListView *list = rootView->GetListView();
|
||||||
if (!list)
|
if (!list)
|
||||||
return false;
|
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)
|
if (state == vsIdle)
|
||||||
state = vsMenuUpdate;
|
state = vsMenuUpdate;
|
||||||
return true;
|
return true;
|
||||||
@ -209,6 +209,8 @@ void cSDDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool Sel
|
|||||||
}
|
}
|
||||||
} else if (cat == mcSetup && rootView->SubViewAvailable()) {
|
} else if (cat == mcSetup && rootView->SubViewAvailable()) {
|
||||||
list->AddSetupMenuItem(Index, Text, Current, Selectable);
|
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 {
|
} else {
|
||||||
rootView->CorrectDefaultMenu();
|
rootView->CorrectDefaultMenu();
|
||||||
string *tabTexts = new string[MaxTabs];
|
string *tabTexts = new string[MaxTabs];
|
||||||
|
@ -319,10 +319,12 @@ void cDisplayMenuItemMainView::CheckPlugins(void) {
|
|||||||
|
|
||||||
cDisplayMenuItemSchedulesView::cDisplayMenuItemSchedulesView(cTemplateViewList *tmplList, const cEvent *event,
|
cDisplayMenuItemSchedulesView::cDisplayMenuItemSchedulesView(cTemplateViewList *tmplList, const cEvent *event,
|
||||||
const cChannel *channel, eTimerMatch timerMatch,
|
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) {
|
: cDisplayMenuItemView(tmplList, current, selectable) {
|
||||||
this->event = event;
|
this->event = event;
|
||||||
this->channel = channel;
|
this->channel = channel;
|
||||||
|
this->dayseparator = dayseparator;
|
||||||
this->timerMatch = timerMatch;
|
this->timerMatch = timerMatch;
|
||||||
this->cat = cat;
|
this->cat = cat;
|
||||||
this->isEpgSearchFav = isEpgSearchFav;
|
this->isEpgSearchFav = isEpgSearchFav;
|
||||||
@ -384,6 +386,8 @@ void cDisplayMenuItemSchedulesView::SetTokens(void) {
|
|||||||
} else {
|
} else {
|
||||||
stringTokens.insert(pair<string,string>("title", event->Title() ? ParseSeparator(event->Title()) : ""));
|
stringTokens.insert(pair<string,string>("title", event->Title() ? ParseSeparator(event->Title()) : ""));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
stringTokens.insert(pair<string,string>("title", dayseparator));
|
||||||
}
|
}
|
||||||
if (channel) {
|
if (channel) {
|
||||||
stringTokens.insert(pair<string,string>("channelname", channel->Name() ? channel->Name() : ""));
|
stringTokens.insert(pair<string,string>("channelname", channel->Name() ? channel->Name() : ""));
|
||||||
|
@ -78,13 +78,14 @@ class cDisplayMenuItemSchedulesView: public cDisplayMenuItemView {
|
|||||||
private:
|
private:
|
||||||
const cEvent *event;
|
const cEvent *event;
|
||||||
const cChannel *channel;
|
const cChannel *channel;
|
||||||
|
string dayseparator;
|
||||||
eTimerMatch timerMatch;
|
eTimerMatch timerMatch;
|
||||||
eMenuCategory cat;
|
eMenuCategory cat;
|
||||||
bool isEpgSearchFav;
|
bool isEpgSearchFav;
|
||||||
string ParseSeparator(string sep);
|
string ParseSeparator(string sep);
|
||||||
public:
|
public:
|
||||||
cDisplayMenuItemSchedulesView(cTemplateViewList *tmplList, const cEvent *event, const cChannel *channel, eTimerMatch timerMatch,
|
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();
|
virtual ~cDisplayMenuItemSchedulesView();
|
||||||
void SetTokens(void);
|
void SetTokens(void);
|
||||||
void Prepare(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,
|
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)
|
if (index >= itemCount)
|
||||||
return;
|
return;
|
||||||
if (menuItems[index]) {
|
if (menuItems[index]) {
|
||||||
menuItems[index]->SetCurrent(current);
|
menuItems[index]->SetCurrent(current);
|
||||||
return;
|
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;
|
menuItems[index] = item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ public:
|
|||||||
void AddDefaultMenuItem(int index, string *tabTexts, bool current, bool selectable);
|
void AddDefaultMenuItem(int index, string *tabTexts, bool current, bool selectable);
|
||||||
string AddMainMenuItem(int index, const char *itemText, 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 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 AddChannelsMenuItem(int index, const cChannel *channel, bool withProvider, bool current, bool selectable);
|
||||||
void AddTimersMenuItem(int index, const cTimer *timer, 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);
|
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