From fe6b8fc72b847bb2f77817d7278b8c8502d88965 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 6 Dec 2021 19:25:46 +0100 Subject: [PATCH] - neutrino-menu: formatting code using astyle; some manual code nicenings Conflicts: src/neutrino_menue.cpp src/neutrino_menue.h Signed-off-by: Thilo Graf --- src/neutrino_menue.cpp | 207 ++++++++++++++++++++++------------------- src/neutrino_menue.h | 101 ++++++++++---------- 2 files changed, 160 insertions(+), 148 deletions(-) diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index 1db765fc8..0d0676509 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -44,6 +44,7 @@ #include "gui/dboxinfo.h" #include "gui/epgplus.h" #include "gui/favorites.h" +// #include "gui/hdd_info.h" #include "gui/hdd_menu.h" #include "gui/imageinfo.h" #include "gui/info_menue.h" @@ -77,60 +78,61 @@ #include "driver/record.h" #include "driver/display.h" - -extern CPlugins * g_Plugins; -extern CRemoteControl * g_RemoteControl; -extern CCAMMenuHandler * g_CamHandler; -// extern bool has_hdd; -// extern char current_timezone[50]; -// extern bool autoshift; +extern CPlugins *g_Plugins; +extern CRemoteControl *g_RemoteControl; +extern CCAMMenuHandler *g_CamHandler; +//extern bool has_hdd; +//extern char current_timezone[50]; +//extern bool autoshift; #define MENU_WIDTH 35 const mn_widget_struct_t menu_widgets[MENU_MAX] = { - {LOCALE_MAINMENU_HEAD, NEUTRINO_ICON_MAINMENU, MENU_WIDTH}, /* 0 = MENU_MAIN*/ - {LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, MENU_WIDTH}, /* 1 = MENU_SETTINGS*/ - {LOCALE_SERVICEMENU_HEAD, NEUTRINO_ICON_SETTINGS, MENU_WIDTH} /* 2 = MENU_SERVICE*/ + {LOCALE_MAINMENU_HEAD, NEUTRINO_ICON_MAINMENU, MENU_WIDTH}, /* 0 = MENU_MAIN */ + {LOCALE_MAINSETTINGS_HEAD, NEUTRINO_ICON_SETTINGS, MENU_WIDTH}, /* 1 = MENU_SETTINGS */ + {LOCALE_SERVICEMENU_HEAD, NEUTRINO_ICON_SETTINGS, MENU_WIDTH} /* 2 = MENU_SERVICE */ }; -//init all menues +// init all menues void CNeutrinoApp::InitMenu() { printf("[neutrino] init menus...\n"); - //personalize: neutrino.h, neutrino.cpp + // personalize: neutrino.h, neutrino.cpp personalize.enableUsermenu(); - personalize.enablePluginMenu(); + //personalize.enablePluginMenu(); personalize.enablePinSetup(); personalize.addWidgets(menu_widgets, MENU_MAX); InitMenuMain(); - InitMenuSettings(); - InitMenuService(); - //add submenu for media + InitMenuSettings(); + InitMenuService(); + + // add submenu for media CMediaPlayerMenu::getInstance()->initMenuMedia(new CMenuWidget(LOCALE_MAINMENU_MEDIA, NEUTRINO_ICON_MULTIMEDIA, MENU_WIDTH), &personalize); personalize.addPersonalizedItems(); - //add PLUGIN_INTEGRATION_SETTING plugins unsigned int nextShortcut; + + // add PLUGIN_INTEGRATION_SETTING plugins CMenuWidget &menuSettings = personalize.getWidget(MENU_SETTINGS); nextShortcut = (unsigned int)menuSettings.getNextShortcut(); menuSettings.integratePlugins(PLUGIN_INTEGRATION_SETTING, nextShortcut); - //add PLUGIN_INTEGRATION_SERVICE plugins + // add PLUGIN_INTEGRATION_SERVICE plugins CMenuWidget &menuService = personalize.getWidget(MENU_SERVICE); nextShortcut = (unsigned int)menuService.getNextShortcut(); menuService.integratePlugins(PLUGIN_INTEGRATION_SERVICE, nextShortcut); - //add PLUGIN_INTEGRATION_MAIN plugins + // add PLUGIN_INTEGRATION_MAIN plugins CMenuWidget &menuMain = personalize.getWidget(MENU_MAIN); nextShortcut = (unsigned int)menuMain.getNextShortcut(); menuMain.integratePlugins(PLUGIN_INTEGRATION_MAIN, nextShortcut); } -//init main menu +// init main menu void CNeutrinoApp::InitMenuMain() { dprintf(DEBUG_DEBUG, "init mainmenue\n"); @@ -138,39 +140,41 @@ void CNeutrinoApp::InitMenuMain() // Dynamic renumbering personalize.setShortcut(); - //top + // top personalize.addItem(MENU_MAIN, GenericMenuSeparator, NULL, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); - //1st section*************************************************************************************************** + // 1st section ******************************************************** - //tv <-> radio toggle + // tv <-> radio toggle CMenuForwarder *tvradio_switch = new CMenuForwarder(LOCALE_MAINMENU_TVRADIO_SWITCH, true, NULL, this, "tv_radio_switch", CRCInput::RC_red); tvradio_switch->setHint(NEUTRINO_ICON_HINT_TVRADIO_SWITCH, LOCALE_MENU_HINT_TVRADIO_SWITCH); personalize.addItem(MENU_MAIN, tvradio_switch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, NULL, DCOND_MODE_TS); - //tv-mode + // tv-mode CMenuForwarder *tvswitch = new CMenuForwarder(LOCALE_MAINMENU_TVMODE, true, NULL, this, "tv", CRCInput::RC_red); tvswitch->setHint(NEUTRINO_ICON_HINT_TVMODE, LOCALE_MENU_HINT_TVMODE); personalize.addItem(MENU_MAIN, tvswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TV_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_TV | DCOND_MODE_TS); //observed - //radio-mode + // radio-mode CMenuForwarder *radioswitch = new CMenuForwarder(LOCALE_MAINMENU_RADIOMODE, true, NULL, this, "radio", CRCInput::RC_green); radioswitch->setHint(NEUTRINO_ICON_HINT_RADIOMODE, LOCALE_MENU_HINT_RADIOMODE); personalize.addItem(MENU_MAIN, radioswitch, &g_settings.personalize[SNeutrinoSettings::P_MAIN_RADIO_MODE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, tvradio_switch, DCOND_MODE_RADIO | DCOND_MODE_TS); //observed - //timer + // timer CMenuForwarder *timerlist = new CMenuForwarder(LOCALE_TIMERLIST_NAME, true, NULL, new CTimerList(), NULL, CRCInput::RC_yellow); timerlist->setHint(NEUTRINO_ICON_HINT_TIMERS, LOCALE_MENU_HINT_TIMERS); personalize.addItem(MENU_MAIN, timerlist, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TIMER]); - //multimedia menu + // multimedia menu CMenuForwarder *media = new CMenuForwarder(LOCALE_MAINMENU_MEDIA, true, NULL, CMediaPlayerMenu::getInstance(), NULL, CRCInput::RC_blue); media->setHint(NEUTRINO_ICON_HINT_MEDIA, LOCALE_MENU_HINT_MEDIA); personalize.addItem(MENU_MAIN, media, &g_settings.personalize[SNeutrinoSettings::P_MAIN_MEDIA]); - //avinput mode - if ((g_info.hw_caps->has_SCART_input) || (g_info.hw_caps->has_HDMI_input)) { + // avinput mode + if ((g_info.hw_caps->has_SCART_input) || (g_info.hw_caps->has_HDMI_input)) + { personalize.addSeparator(MENU_MAIN); + CMenuForwarder *avinputmode = new CMenuForwarder(LOCALE_MAINMENU_AVINPUTMODE, true, NULL, this, "avinput"); avinputmode->setHint(NEUTRINO_ICON_HINT_AVINPUTMODE, LOCALE_MENU_HINT_AVINPUTMODE); personalize.addItem(MENU_MAIN, avinputmode, &g_settings.personalize[SNeutrinoSettings::P_MAIN_AVINPUT]); @@ -182,42 +186,44 @@ void CNeutrinoApp::InitMenuMain() #endif } - CMenuForwarder * mf; - //games + CMenuForwarder *mf; + + // games bool show_games = g_Plugins->hasPlugin(CPlugins::P_TYPE_GAME); - mf = new CMenuForwarder(LOCALE_MAINMENU_GAMES, show_games, NULL, new CPluginList(LOCALE_MAINMENU_GAMES,CPlugins::P_TYPE_GAME)); + mf = new CMenuForwarder(LOCALE_MAINMENU_GAMES, show_games, NULL, new CPluginList(LOCALE_MAINMENU_GAMES, CPlugins::P_TYPE_GAME)); mf->setHint(NEUTRINO_ICON_HINT_GAMES, LOCALE_MENU_HINT_GAMES); personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_GAMES]); #if 0 - //tools + // tools bool show_tools = g_Plugins->hasPlugin(CPlugins::P_TYPE_TOOL); - mf = new CMenuForwarder(LOCALE_MAINMENU_TOOLS, show_tools, NULL, new CPluginList(LOCALE_MAINMENU_TOOLS,CPlugins::P_TYPE_TOOL)); + mf = new CMenuForwarder(LOCALE_MAINMENU_TOOLS, show_tools, NULL, new CPluginList(LOCALE_MAINMENU_TOOLS, CPlugins::P_TYPE_TOOL)); mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_TOOLS); personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_TOOLS]); - //scripts + // scripts bool show_scripts = g_Plugins->hasPlugin(CPlugins::P_TYPE_SCRIPT); - mf = new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, show_scripts, NULL, new CPluginList(LOCALE_MAINMENU_SCRIPTS,CPlugins::P_TYPE_SCRIPT)); + mf = new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, show_scripts, NULL, new CPluginList(LOCALE_MAINMENU_SCRIPTS, CPlugins::P_TYPE_SCRIPT)); mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_SCRIPTS); personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SCRIPTS]); - //lua + // lua bool show_lua = g_Plugins->hasPlugin(CPlugins::P_TYPE_LUA); - mf = new CMenuForwarder(LOCALE_MAINMENU_LUA, show_lua, NULL, new CPluginList(LOCALE_MAINMENU_LUA,CPlugins::P_TYPE_LUA)); + mf = new CMenuForwarder(LOCALE_MAINMENU_LUA, show_lua, NULL, new CPluginList(LOCALE_MAINMENU_LUA, CPlugins::P_TYPE_LUA)); mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_LUA); personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_LUA]); #else + // plugins bool show_plugins = g_Plugins->hasPlugin(CPlugins::P_TYPE_NO_GAME); mf = new CMenuForwarder(LOCALE_MAINMENU_LUA, show_plugins, NULL, new CPluginList(LOCALE_MAINMENU_LUA, CPlugins::P_TYPE_NO_GAME)); mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_LUA); personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_LUA]); #endif - //separator + // separator personalize.addSeparator(MENU_MAIN); - //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 mf = new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, &personalize.getWidget(MENU_SETTINGS)); @@ -229,41 +235,49 @@ void CNeutrinoApp::InitMenuMain() mf->setHint(NEUTRINO_ICON_HINT_SERVICE, LOCALE_MENU_HINT_SERVICE); personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SERVICE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); - //separator + // separator personalize.addSeparator(MENU_MAIN); - //3rd section*************************************************************************************************** + // 3rd section ******************************************************** - //10. -- only 10 shortcuts (1-9, 0), the next could be the last also!(10. => 0) - //sleeptimer + // sleeptimer mf = new CMenuForwarder(LOCALE_MAINMENU_SLEEPTIMER, true, NULL, new CSleepTimerWidget); mf->setHint(NEUTRINO_ICON_HINT_SLEEPTIMER, LOCALE_MENU_HINT_SLEEPTIMER); personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SLEEPTIMER]); - //reboot + // reboot mf = new CMenuForwarder(LOCALE_MAINMENU_REBOOT, true, NULL, this, "reboot"); mf->setHint(NEUTRINO_ICON_HINT_REBOOT, LOCALE_MENU_HINT_REBOOT); personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_REBOOT]); - - //shutdown - if (g_info.hw_caps->can_shutdown) { - mf = new CMenuForwarder(LOCALE_MAINMENU_SHUTDOWN, true, NULL, this, "shutdown", CRCInput::RC_standby); - mf->setHint(NEUTRINO_ICON_HINT_SHUTDOWN, LOCALE_MENU_HINT_SHUTDOWN); - personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SHUTDOWN]); - } - - //separator +#if 0 + // standby + mf = new CMenuForwarder(LOCALE_MAINMENU_STANDBY, true, NULL, this, "standby"); + mf->setHint(NEUTRINO_ICON_HINT_SHUTDOWN, LOCALE_MENU_HINT_STANDBY); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_STANDBY]); +#endif + // shutdown + mf = new CMenuForwarder(LOCALE_MAINMENU_SHUTDOWN, true, NULL, this, "shutdown", CRCInput::RC_standby); + mf->setHint(NEUTRINO_ICON_HINT_SHUTDOWN, LOCALE_MENU_HINT_SHUTDOWN); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SHUTDOWN]); +#if 0 + // blank screen + mf = new CMenuForwarder(LOCALE_BLANK_SCREEN, true, NULL, this, "blank_screen", CRCInput::RC_pause); + mf->setHint(NEUTRINO_ICON_HINT_BLANK_SCREEN, LOCALE_MENU_HINT_BLANK_SCREEN); + personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_BLANK_SCREEN], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, NULL, DCOND_MODE_TS); +#endif + // separator personalize.addSeparator(MENU_MAIN); - //4th section*************************************************************************************************** + // 4th section ******************************************************** - //infomenu + // infomenu mf = new CMenuForwarder(LOCALE_MESSAGEBOX_INFO, true, NULL, new CInfoMenu(), NULL, CRCInput::RC_info); mf->setHint(NEUTRINO_ICON_HINT_INFO, LOCALE_MENU_HINT_INFO); personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_INFOMENU]); - //cisettings - if (cCA::GetInstance()->GetNumberCISlots() > 0 || cCA::GetInstance()->GetNumberSmartCardSlots() > 0) { + // cisettings + if (cCA::GetInstance()->GetNumberCISlots() > 0 || cCA::GetInstance()->GetNumberSmartCardSlots() > 0) + { mf = new CMenuForwarder(LOCALE_CI_SETTINGS, true, NULL, g_CamHandler); mf->setHint(NEUTRINO_ICON_HINT_CI, LOCALE_MENU_HINT_CI); personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_CISETTINGS]); @@ -274,7 +288,7 @@ void CNeutrinoApp::InitMenuMain() #endif } -//settings menue +// settings menue void CNeutrinoApp::InitMenuSettings() { dprintf(DEBUG_DEBUG, "init settings menue...\n"); @@ -288,9 +302,9 @@ void CNeutrinoApp::InitMenuSettings() personalize.addIntroItems(MENU_SETTINGS); static int show = CPersonalizeGui::PERSONALIZE_MODE_VISIBLE; - //*************************************************************************************************** + // save - CMenuForwarder * mf; + CMenuForwarder *mf; mf = new CMenuForwarder(LOCALE_MAINSETTINGS_SAVESETTINGSNOW, true, NULL, this, "savesettings", CRCInput::RC_red); mf->setHint(NEUTRINO_ICON_HINT_SAVE_SETTINGS, LOCALE_MENU_HINT_SAVE_SETTINGS); personalize.addItem(MENU_SETTINGS, mf, &show, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); @@ -298,7 +312,6 @@ void CNeutrinoApp::InitMenuSettings() // settings manager mf = new CMenuForwarder(LOCALE_MAINSETTINGS_MANAGE, true, NULL, new CSettingsManager(), NULL, CRCInput::RC_green); personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_SETTINGS_MANAGER], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ACCESS_OPTION); - mf->setHint(NEUTRINO_ICON_HINT_MANAGE_SETTINGS, LOCALE_MENU_HINT_MANAGE_SETTINGS); // personalize @@ -307,18 +320,16 @@ void CNeutrinoApp::InitMenuSettings() personalize.addItem(MENU_SETTINGS, mf, &show, false, CPersonalizeGui::PERSONALIZE_SHOW_NO); // miscSettings - mf = new CMenuForwarder(LOCALE_MAINSETTINGS_MISC, true, NULL, new CMiscMenue() , NULL, CRCInput::RC_blue); + mf = new CMenuForwarder(LOCALE_MAINSETTINGS_MISC, true, NULL, new CMiscMenue(), NULL, CRCInput::RC_blue); mf->setHint(NEUTRINO_ICON_HINT_EXTENDED, LOCALE_MENU_HINT_EXTENDED); personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_MISC]); //separator personalize.addSeparator(MENU_SETTINGS); - //1st section*************************************************************************************************** + // 1st section ******************************************************** - //use only 10 shortcuts (1-9, 0), >9 means -> no shortcut - - // video. + // video mf = new CMenuForwarder(LOCALE_MAINSETTINGS_VIDEO, true, NULL, g_videoSettings); mf->setHint(NEUTRINO_ICON_HINT_VIDEO, LOCALE_MENU_HINT_VIDEO); personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_VIDEO]); @@ -339,7 +350,8 @@ void CNeutrinoApp::InitMenuSettings() personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_NETWORK]); // record settings - if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { + if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) + { mf = new CMenuForwarder(LOCALE_MAINSETTINGS_RECORDING, true, NULL, new CRecordSetup()); mf->setHint(NEUTRINO_ICON_HINT_RECORDING, LOCALE_MENU_HINT_RECORDING); personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_RECORDING]); @@ -361,14 +373,13 @@ void CNeutrinoApp::InitMenuSettings() personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_VFD]); // drive settings - if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) { + if (g_settings.recording_type != CNeutrinoApp::RECORDING_OFF) + { mf = new CMenuForwarder(LOCALE_HDD_SETTINGS, true, NULL, CHDDMenuHandler::getInstance()); mf->setHint(NEUTRINO_ICON_HINT_HDD, LOCALE_MENU_HINT_HDD); personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_DRIVES]); } - // energy - // cisettings mf = new CMenuForwarder(LOCALE_CI_SETTINGS, true, NULL, g_CamHandler); mf->setHint(NEUTRINO_ICON_HINT_CI, LOCALE_MENU_HINT_CI); @@ -385,8 +396,7 @@ void CNeutrinoApp::InitMenuSettings() personalize.addItem(MENU_SETTINGS, mf, &g_settings.personalize[SNeutrinoSettings::P_MSET_MEDIAPLAYER]); } - -/* service menu*/ +// service menu void CNeutrinoApp::InitMenuService() { dprintf(DEBUG_DEBUG, "init service menu...\n"); @@ -399,7 +409,7 @@ void CNeutrinoApp::InitMenuService() // back button, no personalized personalize.addIntroItems(MENU_SERVICE); - //1st section*************************************************************************************************** + // 1st section ******************************************************** bool force_fesetup = false; #if BOXMODEL_VUPLUS_ALL @@ -407,75 +417,78 @@ void CNeutrinoApp::InitMenuService() force_fesetup = true; #endif - CMenuForwarder * mf; + CMenuForwarder *mf; + // tuner setup - if (CFEManager::getInstance()->haveSat() || CFEManager::getInstance()->getFrontendCount() > 1 || force_fesetup) { + if (CFEManager::getInstance()->haveSat() || CFEManager::getInstance()->getFrontendCount() > 1 || force_fesetup) + { mf = new CMenuForwarder(LOCALE_SATSETUP_FE_SETUP, true, NULL, CScanSetup::getInstance(), "setup_frontend", CRCInput::RC_red); mf->setHint(NEUTRINO_ICON_HINT_SETTINGS, LOCALE_MENU_HINT_SCAN_FESETUP); personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_TUNER]); } // channel scan - mf = new CMenuForwarder(LOCALE_SERVICEMENU_SCANTS , true, NULL, CScanSetup::getInstance(), "", CRCInput::RC_green); + mf = new CMenuForwarder(LOCALE_SERVICEMENU_SCANTS, true, NULL, CScanSetup::getInstance(), "", CRCInput::RC_green); mf->setHint(NEUTRINO_ICON_HINT_SERVICE_SCAN, LOCALE_MENU_HINT_SERVICE_SCAN); personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_SCANTS], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, NULL, DCOND_MODE_TS); - //reload channels - mf = new CMenuForwarder(LOCALE_SERVICEMENU_RELOAD , true, NULL, CScanSetup::getInstance(), "reloadchannels", CRCInput::RC_yellow); + // reload channels + mf = new CMenuForwarder(LOCALE_SERVICEMENU_RELOAD, true, NULL, CScanSetup::getInstance(), "reloadchannels", CRCInput::RC_yellow); mf->setHint(NEUTRINO_ICON_HINT_RELOAD_CHANNELS, LOCALE_MENU_HINT_RELOAD_CHANNELS); personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RELOAD_CHANNELS]); - //bouquet edit + // bouquet edit // TODO: this needs a neutrino restart after changing parentallock_prompt to activate :-( CLockedMenuForwarder *lf; lf = new CLockedMenuForwarder(LOCALE_BOUQUETEDITOR_NAME, g_settings.parentallock_pincode, g_settings.parentallock_prompt == PARENTALLOCK_PROMPT_CHANGETOLOCKED, true, NULL, new CBEBouquetWidget(), NULL, CRCInput::RC_blue); /* does not work with CLockedMenuForwarder yet? lf->setHint(NEUTRINO_ICON_HINT_BEDIT, LOCALE_MENU_HINT_BEDIT); */ - personalize.addItem(MENU_SERVICE, lf, &g_settings.personalize[SNeutrinoSettings::P_MSER_BOUQUET_EDIT]); - //channel reset + // channel reset CDataResetNotifier *resetNotifier = new CDataResetNotifier(); - mf = new CMenuForwarder(LOCALE_RESET_CHANNELS , true, NULL, resetNotifier, "channels"); - + mf = new CMenuForwarder(LOCALE_RESET_CHANNELS, true, NULL, resetNotifier, "channels"); mf->setHint(NEUTRINO_ICON_HINT_DELETE_CHANNELS, LOCALE_MENU_HINT_DELETE_CHANNELS); personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RESET_CHANNELS]); - /* todo: only show if (g_settings.make_removed_list) */ + // TODO: only show if (g_settings.make_removed_list) mf = new CMenuForwarder(LOCALE_RESET_REMOVED, true, NULL, resetNotifier, "delete_removed"); mf->setHint(NEUTRINO_ICON_HINT_DELETE_CHANNELS, LOCALE_MENU_HINT_DELETE_REMOVED); personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RESET_CHANNELS]); - //separator + // separator personalize.addSeparator(MENU_SERVICE); + // 3rd section ******************************************************** - personalize.addSeparator(MENU_SERVICE); - - //restart neutrino - mf = new CMenuForwarder(LOCALE_SERVICEMENU_RESTART , true, NULL, this, "restart", CRCInput::RC_standby); + // restart neutrino + mf = new CMenuForwarder(LOCALE_SERVICEMENU_RESTART, true, NULL, this, "restart", CRCInput::RC_standby); mf->setHint(NEUTRINO_ICON_HINT_SOFT_RESTART, LOCALE_MENU_HINT_SOFT_RESTART); personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RESTART]); - - //reload plugins +#if 0 + // restart tuner + mf = new CMenuForwarder(LOCALE_SERVICEMENU_RESTART_TUNER, true, NULL, this, "restarttuner"); + mf->setHint(NEUTRINO_ICON_HINT_RELOAD_CHANNELS, LOCALE_MENU_HINT_RESTART_TUNER); + personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RESTART_TUNER]); +#endif + // reload plugins mf = new CMenuForwarder(LOCALE_SERVICEMENU_GETPLUGINS, true, NULL, this, "reloadplugins"); mf->setHint(NEUTRINO_ICON_HINT_RELOAD_CHANNELS, LOCALE_MENU_HINT_RELOAD_PLUGINS); personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_RELOAD_PLUGINS]); - //separator + // separator personalize.addSeparator(MENU_SERVICE); - //2nd section*************************************************************************************************** + // 4th section ******************************************************** - //infomenu + // infomenu mf = new CMenuForwarder(LOCALE_MESSAGEBOX_INFO, true, NULL, new CInfoMenu(), NULL, CRCInput::RC_info); mf->setHint(NEUTRINO_ICON_HINT_INFO, LOCALE_MENU_HINT_INFO); personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_SERVICE_INFOMENU]); - //firmware update + // firmware update mf = new CMenuForwarder(LOCALE_SERVICEMENU_UPDATE, true, NULL, new CSoftwareUpdate()); - mf->setHint(NEUTRINO_ICON_HINT_SW_UPDATE, LOCALE_MENU_HINT_SW_UPDATE); personalize.addItem(MENU_SERVICE, mf, &g_settings.personalize[SNeutrinoSettings::P_MSER_SOFTUPDATE], false, CPersonalizeGui::PERSONALIZE_SHOW_AS_ITEM_OPTION, NULL, DCOND_MODE_TS); } diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index 0df2e3d74..ff138f691 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -7,7 +7,7 @@ Headerfile: neutrino_menue.h, Copyright (C) 2011 Thilo Graf 'dbt' Homepage: http://www.dbox2-tuning.net - + License: GPL This library is free software; you can redistribute it and/or @@ -25,33 +25,32 @@ Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. - + NOTE for ignorant distributors: It's not allowed to distribute any compiled parts of this code, if you don't accept the terms of GPL. Please read it and understand it right! - This means for you: Hold it, if not, leave it! You could face legal action! + This means for you: Hold it, if not, leave it! You could face legal action! Otherwise ask the copyright owners, anything else would be theft! */ - #ifndef __neutrino_menue__ #define __neutrino_menue__ -//enums for menu widget indicies, +// enums for menu widget indicies enum MN_WIDGET_ID { - //settings manager + // settings manager MN_WIDGET_ID_SETTINGS_MNGR, - //network setup + // network setup MN_WIDGET_ID_NETWORKSETUP, MN_WIDGET_ID_NETWORKSETUP_NTP, MN_WIDGET_ID_NETWORKSETUP_MOUNTS, - - //proxysetup + + // proxysetup MN_WIDGET_ID_PROXYSETUP, - - //osd setup + + // osd setup MN_WIDGET_ID_OSDSETUP, MN_WIDGET_ID_OSDSETUP_MENUS, MN_WIDGET_ID_OSDSETUP_CHANNELLIST, @@ -68,26 +67,26 @@ enum MN_WIDGET_ID MN_WIDGET_ID_OSDSETUP_VOLUME, MN_WIDGET_ID_OSDSETUP_INFOCLOCK, MN_WIDGET_ID_OSDSETUP_PROGRESSBAR, - //actually it does not matter, but these 6 entries must be the same order as in menu + // actually it does not matter, but these 6 entries must be the same order as in menu MN_WIDGET_ID_OSDSETUP_FONTSIZE_MENU, MN_WIDGET_ID_OSDSETUP_FONTSIZE_CHANNELLIST, MN_WIDGET_ID_OSDSETUP_FONTSIZE_EVENTLIST, MN_WIDGET_ID_OSDSETUP_FONTSIZE_EPG, MN_WIDGET_ID_OSDSETUP_FONTSIZE_INFOBAR, - - //language setup + + // language setup MN_WIDGET_ID_LANGUAGESETUP, MN_WIDGET_ID_LANGUAGESETUP_LOCALE, MN_WIDGET_ID_LANGUAGESETUP_PREFAUDIO_LANGUAGE, - - //recording settings + + // recording settings MN_WIDGET_ID_RECORDSETUP, MN_WIDGET_ID_RECORDSETUP_TIMESHIFT, MN_WIDGET_ID_RECORDSETUP_TIMERSETTINGS, MN_WIDGET_ID_RECORDSETUP_AUDIOSETTINGS, MN_WIDGET_ID_RECORDSETUP_DATASETTINGS, - - //vfd setup + + // vfd setup MN_WIDGET_ID_VFDSETUP, MN_WIDGET_ID_VFDSETUP_LCD_SLIDERS, MN_WIDGET_ID_VFDSETUP_LED_SETUP, @@ -97,7 +96,7 @@ enum MN_WIDGET_ID MN_WIDGET_ID_LCD4L_SETUP, #endif - //keybind setup + // keybind setup MN_WIDGET_ID_KEYSETUP, MN_WIDGET_ID_KEYSETUP_KEYBINDING, MN_WIDGET_ID_KEYSETUP_KEYBINDING_MODES, @@ -106,22 +105,22 @@ enum MN_WIDGET_ID MN_WIDGET_ID_KEYSETUP_KEYBINDING_MOVIEPLAYER, MN_WIDGET_ID_KEYSETUP_KEYBINDING_MOVIEBROWSER, MN_WIDGET_ID_KEYSETUP_KEYBINDING_SPECIAL, - - //picture viewer setup + + // picture viewer setup MN_WIDGET_ID_PVIEWERSETUP, - - //audio setup + + // audio setup MN_WIDGET_ID_AUDIOSETUP, - //webtv/webradio setup + // webtv/webradio setup MN_WIDGET_ID_WEBRADIOSETUP, MN_WIDGET_ID_WEBTVSETUP, MN_WIDGET_ID_LIVESTREAM_RESOLUTION, - //xmltv setup + // xmltv setup MN_WIDGET_ID_XMLTVSETUP, - //misc settings + // misc settings MN_WIDGET_ID_MISCSETUP, MN_WIDGET_ID_MISCSETUP_GENERAL, MN_WIDGET_ID_MISCSETUP_ENERGY, @@ -131,56 +130,56 @@ enum MN_WIDGET_ID MN_WIDGET_ID_MISCSETUP_ONLINESERVICES, MN_WIDGET_ID_MISCSETUP_PLUGINS, - //media menu + // media menu MN_WIDGET_ID_MEDIA, MN_WIDGET_ID_MEDIA_MOVIEPLAYER, - - //parentallock setup + + // parentallock setup MN_WIDGET_ID_PLOCKSETUP, - - //drive setup + + // drive setup MN_WIDGET_ID_DRIVESETUP, - - //zapit settings (start channel) + + // zapit settings (start channel) MN_WIDGET_ID_ZAPIT, - - //cec setup + + // cec setup MN_WIDGET_ID_CEC, - - //infomenue + + // infomenue MN_WIDGET_ID_INFOMENUE, - - //personalize + + // personalize MN_WIDGET_ID_PERSONALIZE, - //personalize: to personalize option menues + // personalize: to personalize option menues MN_WIDGET_ID_PERSONALIZE_MAIN, MN_WIDGET_ID_PERSONALIZE_SETTINGS, MN_WIDGET_ID_PERSONALIZE_SERVICE, MN_WIDGET_ID_PERSONALIZE_MEDIA, MN_WIDGET_ID_PERSONALIZE_MOVIEPLAYER, - //personalize: to personalize sub menues + // personalize: to personalize sub menues MN_WIDGET_ID_PERSONALIZE_USERMENU, MN_WIDGET_ID_PERSONALIZE_FEATUREKEYS, MN_WIDGET_ID_PERSONALIZE_PLUGINS, - //user menu setup + // user menu setup MN_WIDGET_ID_USERMENU_RED, MN_WIDGET_ID_USERMENU_GREEN, MN_WIDGET_ID_USERMENU_YELLOW, MN_WIDGET_ID_USERMENU_BLUE, - //update file selector + // update file selector MN_WIDGET_ID_IMAGESELECTOR, MN_WIDGET_ID_MTDREAD_SELECTOR, MN_WIDGET_ID_MTDWRITE_SELECTOR, MN_WIDGET_ID_FILESELECTOR, MN_WIDGET_ID_MTDREAD_ROOT0, - - //software update + + // software update MN_WIDGET_ID_SOFTWAREUPDATE, MN_WIDGET_ID_MTDEXPERT, - - //software update settings + + // software update settings MN_WIDGET_ID_SOFTWAREUPDATE_SETTINGS, MN_WIDGET_ID_SCAN_MAIN, @@ -196,13 +195,13 @@ enum MN_WIDGET_ID MN_WIDGET_ID_TESTMENU_COMPONENTS, MN_WIDGET_ID_TESTMENU_HINT_MSG_TESTS, - //network services + // network services MN_WIDGET_ID_NETWORKSETUP_SERVICES, - //options select menue + // options select menue MN_WIDGET_ID_MENU_SELECT_STRING, - //glcd menues + // glcd menues MN_WIDGET_ID_GLCD_SETTINGS, MN_WIDGET_ID_GLCD_STANDBY_SETTINGS, MN_WIDGET_ID_GLCD_BRIGHTNESS_SETTINGS, @@ -210,7 +209,7 @@ enum MN_WIDGET_ID MN_WIDGET_ID_GLCD_THEME_POSITION_SETTINGS, #if ENABLE_QUADPIP - //quadpip + // quadpip MN_WIDGET_ID_QUADPIP, #endif