mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
using default menu list in case an invalid MenuCategory is set
This commit is contained in:
parent
0b9e3787a2
commit
ce67dea08a
2
HISTORY
2
HISTORY
@ -33,5 +33,7 @@ Version 0.0.2
|
|||||||
- if a subview is completely not set in a skin, the default menu is used
|
- if a subview is completely not set in a skin, the default menu is used
|
||||||
- fixed a bug if displaydetailedtext is called without correct menucat (mailbox plugin)
|
- fixed a bug if displaydetailedtext is called without correct menucat (mailbox plugin)
|
||||||
- implemented function drawslope, see Wiki for documentation
|
- implemented function drawslope, see Wiki for documentation
|
||||||
|
- using default menu list in case an invalid MenuCategory is set
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,6 +12,10 @@ cDisplayMenuRootView::cDisplayMenuRootView(cTemplateView *rootView) : cView(root
|
|||||||
view = NULL;
|
view = NULL;
|
||||||
listView = NULL;
|
listView = NULL;
|
||||||
detailView = NULL;
|
detailView = NULL;
|
||||||
|
buttonTexts[0] = "";
|
||||||
|
buttonTexts[1] = "";
|
||||||
|
buttonTexts[2] = "";
|
||||||
|
buttonTexts[3] = "";
|
||||||
defaultBackgroundDrawn = false;
|
defaultBackgroundDrawn = false;
|
||||||
defaultHeaderDrawn = false;
|
defaultHeaderDrawn = false;
|
||||||
defaultButtonsDrawn = false;
|
defaultButtonsDrawn = false;
|
||||||
@ -216,14 +220,24 @@ void cDisplayMenuRootView::SetMessage(eMessageType type, const char *text) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cDisplayMenuRootView::SetDetailedViewEvent(const cEvent *event) {
|
void cDisplayMenuRootView::SetDetailedViewEvent(const cEvent *event) {
|
||||||
if (!detailView)
|
if (!detailView) {
|
||||||
|
if (viewType != svMenuDetailedEpg) {
|
||||||
|
SetMenu(mcEvent, true);
|
||||||
|
} else {
|
||||||
detailView = new cDisplayMenuDetailView(subView);
|
detailView = new cDisplayMenuDetailView(subView);
|
||||||
|
}
|
||||||
|
}
|
||||||
detailView->SetEvent(event);
|
detailView->SetEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cDisplayMenuRootView::SetDetailedViewRecording(const cRecording *recording) {
|
void cDisplayMenuRootView::SetDetailedViewRecording(const cRecording *recording) {
|
||||||
if (!detailView)
|
if (!detailView) {
|
||||||
|
if (viewType != svMenuDetailedRecording) {
|
||||||
|
SetMenu(mcRecordingInfo, true);
|
||||||
|
} else {
|
||||||
detailView = new cDisplayMenuDetailView(subView);
|
detailView = new cDisplayMenuDetailView(subView);
|
||||||
|
}
|
||||||
|
}
|
||||||
detailView->SetRecording(recording);
|
detailView->SetRecording(recording);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,7 +245,6 @@ void cDisplayMenuRootView::SetDetailedViewText(const char *text) {
|
|||||||
if (!detailView) {
|
if (!detailView) {
|
||||||
if (viewType != svMenuDetailedText) {
|
if (viewType != svMenuDetailedText) {
|
||||||
SetMenu(mcText, true);
|
SetMenu(mcText, true);
|
||||||
SetButtonTexts(NULL, NULL, NULL, NULL);
|
|
||||||
} else {
|
} else {
|
||||||
detailView = new cDisplayMenuDetailView(subView);
|
detailView = new cDisplayMenuDetailView(subView);
|
||||||
}
|
}
|
||||||
@ -281,7 +294,9 @@ int cDisplayMenuRootView::GetMaxItems(void) {
|
|||||||
if (listView) {
|
if (listView) {
|
||||||
return listView->GetMaxItems();
|
return listView->GetMaxItems();
|
||||||
}
|
}
|
||||||
return 0;
|
//wrong menucat
|
||||||
|
SetMenu(mcUnknown, true);
|
||||||
|
return listView->GetMaxItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
int cDisplayMenuRootView::GetListViewWidth(void) {
|
int cDisplayMenuRootView::GetListViewWidth(void) {
|
||||||
|
@ -12,6 +12,7 @@ cDisplayMenuView::cDisplayMenuView(cTemplateView *tmplView, bool menuInit) : cVi
|
|||||||
else
|
else
|
||||||
SetFadeTime(0);
|
SetFadeTime(0);
|
||||||
cat = mcUndefined;
|
cat = mcUndefined;
|
||||||
|
buttonTexts = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cDisplayMenuView::~cDisplayMenuView() {
|
cDisplayMenuView::~cDisplayMenuView() {
|
||||||
@ -106,10 +107,10 @@ bool cDisplayMenuView::DrawColorButtons(void) {
|
|||||||
map < string, string > stringTokens;
|
map < string, string > stringTokens;
|
||||||
map < string, int > intTokens;
|
map < string, int > intTokens;
|
||||||
|
|
||||||
stringTokens.insert(pair<string,string>("red", buttonTexts[0]));
|
stringTokens.insert(pair<string,string>("red", buttonTexts ? buttonTexts[0] : ""));
|
||||||
stringTokens.insert(pair<string,string>("green", buttonTexts[1]));
|
stringTokens.insert(pair<string,string>("green", buttonTexts ? buttonTexts[1]: ""));
|
||||||
stringTokens.insert(pair<string,string>("yellow", buttonTexts[2]));
|
stringTokens.insert(pair<string,string>("yellow", buttonTexts ? buttonTexts[2]: ""));
|
||||||
stringTokens.insert(pair<string,string>("blue", buttonTexts[3]));
|
stringTokens.insert(pair<string,string>("blue", buttonTexts ? buttonTexts[3] : ""));
|
||||||
|
|
||||||
int colorKeys[4] = { Setup.ColorKey0, Setup.ColorKey1, Setup.ColorKey2, Setup.ColorKey3 };
|
int colorKeys[4] = { Setup.ColorKey0, Setup.ColorKey1, Setup.ColorKey2, Setup.ColorKey3 };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user