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 - fixed bug that global double vars are not working
Version 0.0.8 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()) { } else if (cat == mcSetup && rootView->SubViewAvailable()) {
list->AddSetupMenuItem(Index, Text, Current, Selectable); list->AddSetupMenuItem(Index, Text, Current, Selectable);
} else { } else {
rootView->CorrectDefaultMenu();
string *tabTexts = new string[MaxTabs]; string *tabTexts = new string[MaxTabs];
for (int i=0; i<MaxTabs; i++) { for (int i=0; i<MaxTabs; i++) {
const char *s = GetTabbedText(Text, i); const char *s = GetTabbedText(Text, i);

View File

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

View File

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