diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 0d0268c3d..7c590d0b1 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -47,6 +47,7 @@ #include "global.h" #include "neutrino.h" +#include "neutrino_menue.h" #include "version_pseudo.h" #include @@ -2172,7 +2173,7 @@ TIMER_STOP("################################## after all ####################### } delete hintBox; } - RealRun(personalize.getWidget(0)/**main**/); + RealRun(); ExitRun(true, (cs_get_revision() > 7)); @@ -2260,9 +2261,9 @@ void CNeutrinoApp::screensaver(bool on) } } -void CNeutrinoApp::RealRun(CMenuWidget &_mainMenu) +void CNeutrinoApp::RealRun() { - mainMenu = &_mainMenu; + mainMenu = &personalize.getWidget(MENU_MAIN); neutrino_msg_t msg; neutrino_msg_data_t data; diff --git a/src/neutrino.h b/src/neutrino.h index d37880b3d..61f616bfd 100644 --- a/src/neutrino.h +++ b/src/neutrino.h @@ -120,7 +120,7 @@ private: void getAnnounceEpgName(CTimerd::RecordingInfo * eventinfo, std::string &name); void ExitRun(const bool write_si = true, int retcode = 0); - void RealRun(CMenuWidget &mainSettings); + void RealRun(); void InitZapper(); void InitTimerdClient(); void InitZapitClient(); diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index e1ccb6305..158074334 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -89,16 +89,6 @@ extern CCAMMenuHandler * g_CamHandler; // extern char current_timezone[50]; // extern bool autoshift; -enum -{ - MENU_MAIN, - MENU_SETTINGS, - MENU_SERVICE, - MENU_SHUTDOWN, - - MENU_MAX //3 -}; - #define MENU_WIDTH 35 const mn_widget_struct_t menu_widgets[MENU_MAX] = @@ -150,7 +140,7 @@ void CNeutrinoApp::InitMenuMain() // Dynamic renumbering personalize.setShortcut(); - CMenuWidget &menu = personalize.getWidget(MENU_MAIN)/**main**/; + CMenuWidget &menu = personalize.getWidget(MENU_MAIN); menu.addKey(CRCInput::RC_stop, this, "easyswitch"); //top @@ -235,7 +225,7 @@ void CNeutrinoApp::InitMenuMain() //2nd section*************************************************************************************************** // settings, also as pin protected option in personalize menu, as a result of parameter value CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION - mf = new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, &personalize.getWidget(MENU_SETTINGS)/**settings**/); + mf = new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, &personalize.getWidget(MENU_SETTINGS)); mf->setHint(NEUTRINO_ICON_HINT_SETTINGS, LOCALE_MENU_HINT_SETTINGS); personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SETTINGS], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); @@ -325,7 +315,7 @@ void CNeutrinoApp::InitMenuSettings() { dprintf(DEBUG_DEBUG, "init settings menue...\n"); - //CMenuWidget &menu = personalize.getWidget(MENU_SETTINGS)/**settings**/; + //CMenuWidget &menu = personalize.getWidget(MENU_SETTINGS); // Dynamic renumbering personalize.setShortcut(); @@ -469,7 +459,7 @@ void CNeutrinoApp::InitMenuService() { dprintf(DEBUG_DEBUG, "init service menu...\n"); - //CMenuWidget &menu = personalize.getWidget(MENU_SERVICE)/**service**/; + //CMenuWidget &menu = personalize.getWidget(MENU_SERVICE); // Dynamic renumbering personalize.setShortcut(); diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index bbc976c78..2bcc209c3 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -37,7 +37,6 @@ #ifndef __neutrino_menue__ #define __neutrino_menue__ - //enums for menu widget indicies, enum MN_WIDGET_ID { @@ -193,5 +192,14 @@ enum MN_WIDGET_ID MN_WIDGET_ID_MAX }; +enum +{ + MENU_MAIN, + MENU_SETTINGS, + MENU_SERVICE, + MENU_SHUTDOWN, + + MENU_MAX +}; #endif