From 4836f13d796e5cc48e7460c3f62abe6482690ca7 Mon Sep 17 00:00:00 2001 From: thilo Date: Wed, 15 Feb 2012 18:21:28 +0000 Subject: [PATCH] *neutrino scripts: move scripts into features menu ...scripts are still available in main menue, but not default visible. If user wants to use scripts as usual, he can customize it in the personalize setup. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2094 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/user_menue.cpp | 10 ++++++++++ src/gui/user_menue_setup.cpp | 3 ++- src/neutrino.cpp | 2 +- src/system/settings.cpp | 2 +- src/system/settings.h | 1 + 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index 9b2aa87d8..a48e549f9 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -127,6 +127,7 @@ bool CUserMenu::showUserMenu(int button) CDBoxInfoWidget *boxinfo = NULL; CNeutrinoApp * neutrino = NULL; CPluginList * games = NULL; + CPluginList * scripts = NULL; std::string txt = g_settings.usermenu_text[button]; neutrino_locale_t caption = user_menu[button].caption; @@ -298,6 +299,14 @@ bool CUserMenu::showUserMenu(int button) 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_SCRIPTS: + menu_items++; + menu_prev = SNeutrinoSettings::ITEM_SCRIPTS; + scripts = new CPluginList(LOCALE_MAINMENU_SCRIPTS,CPlugins::P_TYPE_SCRIPT); + keyhelper.get(&key,&icon); + menu_item = new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, g_PluginList->hasPlugin(CPlugins::P_TYPE_SCRIPT), NULL, games, "-1", key, icon ); + menu->addItem(menu_item, false); + break; case SNeutrinoSettings::ITEM_PLUGIN: { char id[5]; @@ -445,6 +454,7 @@ bool CUserMenu::showUserMenu(int button) if (imageinfo) delete imageinfo; if (boxinfo) delete boxinfo; if (games) delete games; + if (scripts) delete scripts; if (menu) delete menu; return 0; } diff --git a/src/gui/user_menue_setup.cpp b/src/gui/user_menue_setup.cpp index 559564a6c..2f14b2c87 100644 --- a/src/gui/user_menue_setup.cpp +++ b/src/gui/user_menue_setup.cpp @@ -90,7 +90,8 @@ const CMenuOptionChooser::keyval USERMENU_ITEM_OPTIONS[USERMENU_ITEM_OPTION_COUN { SNeutrinoSettings::ITEM_BOXINFO, LOCALE_EXTRA_DBOXINFO }, { SNeutrinoSettings::ITEM_CAM, LOCALE_CI_SETTINGS }, { SNeutrinoSettings::ITEM_CLOCK, LOCALE_CLOCK_SWITCH_ON }, - { SNeutrinoSettings::ITEM_GAMES, LOCALE_MAINMENU_GAMES } + { SNeutrinoSettings::ITEM_GAMES, LOCALE_MAINMENU_GAMES }, + { SNeutrinoSettings::ITEM_SCRIPTS, LOCALE_MAINMENU_SCRIPTS } }; int CUserMenuSetup::exec(CMenuTarget* parent, const std::string &) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 0ddb98b9f..633c07106 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -696,7 +696,7 @@ int CNeutrinoApp::loadSetup(const char * fname) "2,3,4,13", // RED "6", // GREEN "7", // YELLOW - "12,10,11,20,19,14,15" // BLUE + "12,10,11,20,21,19,14,15" // BLUE }; char txt1[81]; std::string txt2; diff --git a/src/system/settings.cpp b/src/system/settings.cpp index 18c8ffc8b..16af322fb 100644 --- a/src/system/settings.cpp +++ b/src/system/settings.cpp @@ -45,7 +45,7 @@ const struct personalize_settings_t personalize_settings[SNeutrinoSettings::P_SE {"personalize_media" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE}, {"personalize_games" , CPersonalizeGui::PERSONALIZE_MODE_NOTVISIBLE}, - {"personalize_scripts" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE}, + {"personalize_scripts" , CPersonalizeGui::PERSONALIZE_MODE_NOTVISIBLE}, {"personalize_settings" , CPersonalizeGui::PERSONALIZE_PROTECT_MODE_NOT_PROTECTED}, {"personalize_service" , CPersonalizeGui::PERSONALIZE_PROTECT_MODE_NOT_PROTECTED}, {"personalize_sleeptimer" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE}, diff --git a/src/system/settings.h b/src/system/settings.h index 8395f72aa..e120c02d8 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -569,6 +569,7 @@ struct SNeutrinoSettings ITEM_CAM = 18, ITEM_CLOCK = 19, ITEM_GAMES = 20, + ITEM_SCRIPTS = 21, #if 0 ITEM_MOVIEPLAYER_TS, #endif