From bca7b507261da784bebcf446aec75d25885345e3 Mon Sep 17 00:00:00 2001 From: thilo Date: Wed, 15 Feb 2012 18:21:25 +0000 Subject: [PATCH] *neutrino games: move games into features menu ...games are still available in main menue, but not default visible. If user wants to use games as usual, he can customize it in the personalize setup. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2093 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/user_menue.cpp | 11 +++++++++++ src/gui/user_menue_setup.cpp | 3 ++- src/neutrino.cpp | 4 ++-- src/system/settings.cpp | 2 +- src/system/settings.h | 1 + 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index 1e59c7b46..9b2aa87d8 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -54,6 +54,7 @@ #include "gui/imageinfo.h" #include "gui/dboxinfo.h" #include "gui/cam_menu.h" +#include "gui/pluginlist.h" #include #include @@ -125,6 +126,7 @@ bool CUserMenu::showUserMenu(int button) CImageInfo *imageinfo = NULL; CDBoxInfoWidget *boxinfo = NULL; CNeutrinoApp * neutrino = NULL; + CPluginList * games = NULL; std::string txt = g_settings.usermenu_text[button]; neutrino_locale_t caption = user_menu[button].caption; @@ -288,6 +290,14 @@ bool CUserMenu::showUserMenu(int button) menu_item = new CMenuForwarder(LOCALE_EPGMENU_STREAMINFO, true, NULL, streamInfo, "-1", key, icon ); menu->addItem(menu_item, false); break; + case SNeutrinoSettings::ITEM_GAMES: + menu_items++; + menu_prev = SNeutrinoSettings::ITEM_GAMES; + games = new CPluginList(LOCALE_MAINMENU_GAMES,CPlugins::P_TYPE_GAME); + keyhelper.get(&key,&icon); + menu_item = new CMenuForwarder(LOCALE_MAINMENU_GAMES, g_PluginList->hasPlugin(CPlugins::P_TYPE_GAME), NULL, games, "-1", key, icon ); + menu->addItem(menu_item, false); + break; case SNeutrinoSettings::ITEM_PLUGIN: { char id[5]; @@ -434,6 +444,7 @@ bool CUserMenu::showUserMenu(int button) if (StreamFeaturesChanger) delete StreamFeaturesChanger; if (imageinfo) delete imageinfo; if (boxinfo) delete boxinfo; + if (games) delete games; if (menu) delete menu; return 0; } diff --git a/src/gui/user_menue_setup.cpp b/src/gui/user_menue_setup.cpp index e69a25f52..559564a6c 100644 --- a/src/gui/user_menue_setup.cpp +++ b/src/gui/user_menue_setup.cpp @@ -89,7 +89,8 @@ const CMenuOptionChooser::keyval USERMENU_ITEM_OPTIONS[USERMENU_ITEM_OPTION_COUN { SNeutrinoSettings::ITEM_IMAGEINFO, LOCALE_SERVICEMENU_IMAGEINFO }, { SNeutrinoSettings::ITEM_BOXINFO, LOCALE_EXTRA_DBOXINFO }, { SNeutrinoSettings::ITEM_CAM, LOCALE_CI_SETTINGS }, - { SNeutrinoSettings::ITEM_CLOCK, LOCALE_CLOCK_SWITCH_ON } + { SNeutrinoSettings::ITEM_CLOCK, LOCALE_CLOCK_SWITCH_ON }, + { SNeutrinoSettings::ITEM_GAMES, LOCALE_MAINMENU_GAMES } }; int CUserMenuSetup::exec(CMenuTarget* parent, const std::string &) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 63a4f6b47..0ddb98b9f 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -695,8 +695,8 @@ int CNeutrinoApp::loadSetup(const char * fname) const char* usermenu_default[SNeutrinoSettings::BUTTON_MAX]={ "2,3,4,13", // RED "6", // GREEN - "7", // YELLOW - "12,10,11,19,14,15" // BLUE + "7", // YELLOW + "12,10,11,20,19,14,15" // BLUE }; char txt1[81]; std::string txt2; diff --git a/src/system/settings.cpp b/src/system/settings.cpp index ad6e4e950..18c8ffc8b 100644 --- a/src/system/settings.cpp +++ b/src/system/settings.cpp @@ -44,7 +44,7 @@ const struct personalize_settings_t personalize_settings[SNeutrinoSettings::P_SE {"personalize_timer" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE}, {"personalize_media" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE}, - {"personalize_games" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE}, + {"personalize_games" , CPersonalizeGui::PERSONALIZE_MODE_NOTVISIBLE}, {"personalize_scripts" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE}, {"personalize_settings" , CPersonalizeGui::PERSONALIZE_PROTECT_MODE_NOT_PROTECTED}, {"personalize_service" , CPersonalizeGui::PERSONALIZE_PROTECT_MODE_NOT_PROTECTED}, diff --git a/src/system/settings.h b/src/system/settings.h index 6a7e3ed2e..8395f72aa 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -568,6 +568,7 @@ struct SNeutrinoSettings ITEM_BOXINFO = 17, ITEM_CAM = 18, ITEM_CLOCK = 19, + ITEM_GAMES = 20, #if 0 ITEM_MOVIEPLAYER_TS, #endif