- no need to assign mainmenu as an argument to realrun()

This commit is contained in:
svenhoefer
2016-06-23 15:42:14 +02:00
parent 62861c5f96
commit 0c0b1981f6
4 changed files with 18 additions and 19 deletions

View File

@@ -47,6 +47,7 @@
#include "global.h" #include "global.h"
#include "neutrino.h" #include "neutrino.h"
#include "neutrino_menue.h"
#include "version_pseudo.h" #include "version_pseudo.h"
#include <daemonc/remotecontrol.h> #include <daemonc/remotecontrol.h>
@@ -2172,7 +2173,7 @@ TIMER_STOP("################################## after all #######################
} }
delete hintBox; delete hintBox;
} }
RealRun(personalize.getWidget(0)/**main**/); RealRun();
ExitRun(true, (cs_get_revision() > 7)); 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_t msg;
neutrino_msg_data_t data; neutrino_msg_data_t data;

View File

@@ -120,7 +120,7 @@ private:
void getAnnounceEpgName(CTimerd::RecordingInfo * eventinfo, std::string &name); void getAnnounceEpgName(CTimerd::RecordingInfo * eventinfo, std::string &name);
void ExitRun(const bool write_si = true, int retcode = 0); void ExitRun(const bool write_si = true, int retcode = 0);
void RealRun(CMenuWidget &mainSettings); void RealRun();
void InitZapper(); void InitZapper();
void InitTimerdClient(); void InitTimerdClient();
void InitZapitClient(); void InitZapitClient();

View File

@@ -89,16 +89,6 @@ extern CCAMMenuHandler * g_CamHandler;
// extern char current_timezone[50]; // extern char current_timezone[50];
// extern bool autoshift; // extern bool autoshift;
enum
{
MENU_MAIN,
MENU_SETTINGS,
MENU_SERVICE,
MENU_SHUTDOWN,
MENU_MAX //3
};
#define MENU_WIDTH 35 #define MENU_WIDTH 35
const mn_widget_struct_t menu_widgets[MENU_MAX] = const mn_widget_struct_t menu_widgets[MENU_MAX] =
@@ -150,7 +140,7 @@ void CNeutrinoApp::InitMenuMain()
// Dynamic renumbering // Dynamic renumbering
personalize.setShortcut(); personalize.setShortcut();
CMenuWidget &menu = personalize.getWidget(MENU_MAIN)/**main**/; CMenuWidget &menu = personalize.getWidget(MENU_MAIN);
menu.addKey(CRCInput::RC_stop, this, "easyswitch"); menu.addKey(CRCInput::RC_stop, this, "easyswitch");
//top //top
@@ -235,7 +225,7 @@ void CNeutrinoApp::InitMenuMain()
//2nd section*************************************************************************************************** //2nd section***************************************************************************************************
// settings, also as pin protected option in personalize menu, as a result of parameter value CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION // 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); 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); 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"); dprintf(DEBUG_DEBUG, "init settings menue...\n");
//CMenuWidget &menu = personalize.getWidget(MENU_SETTINGS)/**settings**/; //CMenuWidget &menu = personalize.getWidget(MENU_SETTINGS);
// Dynamic renumbering // Dynamic renumbering
personalize.setShortcut(); personalize.setShortcut();
@@ -469,7 +459,7 @@ void CNeutrinoApp::InitMenuService()
{ {
dprintf(DEBUG_DEBUG, "init service menu...\n"); dprintf(DEBUG_DEBUG, "init service menu...\n");
//CMenuWidget &menu = personalize.getWidget(MENU_SERVICE)/**service**/; //CMenuWidget &menu = personalize.getWidget(MENU_SERVICE);
// Dynamic renumbering // Dynamic renumbering
personalize.setShortcut(); personalize.setShortcut();

View File

@@ -37,7 +37,6 @@
#ifndef __neutrino_menue__ #ifndef __neutrino_menue__
#define __neutrino_menue__ #define __neutrino_menue__
//enums for menu widget indicies, //enums for menu widget indicies,
enum MN_WIDGET_ID enum MN_WIDGET_ID
{ {
@@ -193,5 +192,14 @@ enum MN_WIDGET_ID
MN_WIDGET_ID_MAX MN_WIDGET_ID_MAX
}; };
enum
{
MENU_MAIN,
MENU_SETTINGS,
MENU_SERVICE,
MENU_SHUTDOWN,
MENU_MAX
};
#endif #endif