displaying default menu list if menu category is set to another category but SetItem() is called

This commit is contained in:
louis 2014-12-06 11:17:15 +01:00
parent 3280b839d1
commit 562c0b3f00
4 changed files with 29 additions and 17 deletions

View File

@ -103,3 +103,6 @@ Version 0.0.7
- fixed bug that global double vars are not working
Version 0.0.8
- displaying default menu list if menu category is set to another category
but SetItem() is called

View File

@ -190,6 +190,7 @@ 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 {
rootView->CorrectDefaultMenu();
string *tabTexts = new string[MaxTabs];
for (int i=0; i<MaxTabs; i++) {
const char *s = GetTabbedText(Text, i);

View File

@ -65,23 +65,24 @@ bool cDisplayMenuRootView::createOsd(void) {
8 mcTimerEdit,
9 mcRecording,
10 mcRecordingInfo,
11 mcPlugin,
12 mcPluginSetup,
13 mcSetup,
14 mcSetupOsd,
15 mcSetupEpg,
16 mcSetupDvb,
17 mcSetupLnb,
18 mcSetupCam,
19 mcSetupRecord,
20 mcSetupReplay,
21 mcSetupMisc,
22 mcSetupPlugins,
23 mcCommand,
24 mcEvent,
25 mcText,
26 mcFolder,
27 mcCam
11 mcRecordingEdit,
12 mcPlugin,
13 mcPluginSetup,
14 mcSetup,
15 mcSetupOsd,
16 mcSetupEpg,
17 mcSetupDvb,
18 mcSetupLnb,
19 mcSetupCam,
20 mcSetupRecord,
21 mcSetupReplay,
22 mcSetupMisc,
23 mcSetupPlugins,
24 mcCommand,
25 mcEvent,
26 mcText,
27 mcFolder,
28 mcCam
*/
void cDisplayMenuRootView::SetMenu(eMenuCategory menuCat, bool menuInit) {
@ -202,6 +203,12 @@ void cDisplayMenuRootView::SetMenu(eMenuCategory menuCat, bool menuInit) {
}
}
void cDisplayMenuRootView::CorrectDefaultMenu(void) {
if (viewType > svMenuDefault) {
SetMenu(mcUnknown, true);
}
}
void cDisplayMenuRootView::SetPluginMenu(string name, int menu, int type) {
if (pluginName.compare(name) || menu != pluginMenu || type != pluginMenuType)
pluginMenuChanged = true;

View File

@ -44,6 +44,7 @@ public:
virtual ~cDisplayMenuRootView();
bool createOsd(void);
void SetMenu(eMenuCategory menuCat, bool menuInit);
void CorrectDefaultMenu(void);
void SetPluginMenu(string name, int menu, int type);
void SetTitle(const char *title);
void SetChannel(const cChannel *channel) { view->SetChannel(channel); };