diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 5e9d660d0..6798da110 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1612,7 +1612,7 @@ personalize.pinhint Personalisierungs PIN Code eingeben personalize.pinprotect ja personalize.pinstatus mit PIN personalize.plugins Plugins -personalize.usermenu_plugin_type Plugin Typ +personalize.usermenu_plugin_types Anzuzeigende Plugin-Typen wählen personalize.usermenu_preferred_buttons Bevorzugte Tasten zuweisen personalize.usermenu_show_cancel Zeige Schalter "Abbrechen" personalize.visible sichtbar @@ -1971,6 +1971,7 @@ usermenu.head Benutzermenü usermenu.item_bar ---- Trennung ---- usermenu.item_epg_misc EPG Funktionen usermenu.item_none (frei) +usermenu.item_plugin_types Plugin-Typen usermenu.item_vtxt Teletext usermenu.msg_info_is_empty Es wurde kein Name für dieses Menü vergeben.\nVerwende Standardname:\n usermenu.msg_warning_name Sie haben mehrere Menüpunkte für dieses Menü angelegt,\naber keinen neuen Namen festgelegt.\nEs ist daher empfohlen, einen neuen Namen zu vergeben! diff --git a/data/locale/english.locale b/data/locale/english.locale index e666ec168..5812d0dab 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1612,7 +1612,7 @@ personalize.pinhint Enter the Personalization PIN Code personalize.pinprotect Yes personalize.pinstatus Require PIN personalize.plugins Plugins -personalize.usermenu_plugin_type Plugin type +personalize.usermenu_plugin_types Choose Plugin types to show personalize.usermenu_preferred_buttons Assigning of preferred keys personalize.usermenu_show_cancel Show "Cancel"-Button personalize.visible Visible @@ -1971,6 +1971,7 @@ usermenu.head User menu usermenu.item_bar ---- Boarder ---- usermenu.item_epg_misc EPG functions usermenu.item_none (empty) +usermenu.item_plugin_types Plugin types usermenu.item_vtxt Videotext usermenu.msg_info_is_empty You don't have definied a name for this menu!\nUsing default name:\n usermenu.msg_warning_name You have more than one items created for this menu,\nbut none new name for this menue defined.\nIt is recommended to enter a new name! diff --git a/src/gui/personalize.cpp b/src/gui/personalize.cpp index e5fda5015..9aaac7edf 100644 --- a/src/gui/personalize.cpp +++ b/src/gui/personalize.cpp @@ -195,15 +195,6 @@ const CMenuOptionChooser::keyval PERSONALIZE_PROTECT_MODE_OPTIONS[CPersonalizeGu { CPersonalizeGui::PERSONALIZE_PROTECT_MODE_PIN_PROTECTED , LOCALE_PERSONALIZE_PINPROTECT },// The menu/option is protected by a PIN }; -#define PERSONALIZE_UMENU_PLUGIN_TYPE_MAX 4 -const CMenuOptionChooser::keyval PERSONALIZE_UMENU_PLUGIN_TYPE[PERSONALIZE_UMENU_PLUGIN_TYPE_MAX] = -{ - { CPlugins::P_TYPE_GAME , LOCALE_MAINMENU_GAMES }, - { CPlugins::P_TYPE_TOOL , LOCALE_MAINMENU_TOOLS }, - { CPlugins::P_TYPE_SCRIPT , LOCALE_MAINMENU_SCRIPTS }, - { CPlugins::P_TYPE_LUA , LOCALE_MAINMENU_LUA } -}; - CPersonalizeGui::CPersonalizeGui() : CPINProtection(g_settings.personalize_pincode) { width = 0; @@ -461,8 +452,16 @@ void CPersonalizeGui::ShowUserMenu(CMenuWidget* p_widget, vectoraddItem(GenericMenuSeparatorLine); p_widget->addItem(GenericMenuSeparator); - p_widget->addItem(new CMenuOptionChooser(LOCALE_PERSONALIZE_USERMENU_PLUGIN_TYPE, &g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE], PERSONALIZE_UMENU_PLUGIN_TYPE, PERSONALIZE_UMENU_PLUGIN_TYPE_MAX, true)); p_widget->addItem(new CMenuOptionChooser(LOCALE_PERSONALIZE_USERMENU_SHOW_CANCEL, &g_settings.personalize[SNeutrinoSettings::P_UMENU_SHOW_CANCEL], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + + pluginSelectionMenu = new CMenuWidget(LOCALE_PERSONALIZE_USERMENU_PLUGIN_TYPES, NEUTRINO_ICON_SETTINGS); + pluginSelectionMenu->addIntroItems(LOCALE_MAINMENU_SETTINGS); + pluginSelectionMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_GAMES, &g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_GAMES], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + pluginSelectionMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_TOOLS, &g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_TOOLS], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + pluginSelectionMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_SCRIPTS, &g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_SCRIPTS], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + pluginSelectionMenu->addItem(new CMenuOptionChooser(LOCALE_MAINMENU_LUA, &g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_LUA], OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true)); + + p_widget->addItem(new CMenuForwarder(LOCALE_PERSONALIZE_USERMENU_PLUGIN_TYPES, true, NULL, pluginSelectionMenu)); } diff --git a/src/gui/personalize.h b/src/gui/personalize.h index cb537d4b4..817176cb9 100644 --- a/src/gui/personalize.h +++ b/src/gui/personalize.h @@ -146,6 +146,7 @@ class CPersonalizeGui : public CMenuTarget, public CChangeObserver, public CPINP CMenuWidget* fkeyMenu; CMenuWidget* plMenu; CMenuWidget* tmpW; + CMenuWidget *pluginSelectionMenu; int width, widget_count, shortcut, options_count; bool show_usermenu, show_pin_setup; diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index 7a1ce177f..e76c25ee5 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -324,25 +324,34 @@ bool CUserMenu::showUserMenu(int button) menu->addItem(menu_item, false); break; #endif - case SNeutrinoSettings::ITEM_PLUGIN: + case SNeutrinoSettings::ITEM_PLUGIN_TYPES: { char id[5]; int cnt = 0; for (unsigned int count = 0; count < (unsigned int) g_PluginList->getNumberOfPlugins(); count++) { - bool show = g_PluginList->getType(count) == g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE]; + bool show = false; + if (g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_GAMES]) + show = show || g_PluginList->getType(count) == CPlugins::P_TYPE_GAME; + if (g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_TOOLS]) + show = show || g_PluginList->getType(count) == CPlugins::P_TYPE_TOOL; + if (g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_SCRIPTS]) + show = show || g_PluginList->getType(count) == CPlugins::P_TYPE_SCRIPT; +#if ENABLE_LUA + if (g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE_LUA]) + show = show || g_PluginList->getType(count) == CPlugins::P_TYPE_LUA; +#endif if (show && !g_PluginList->isHidden(count)) { sprintf(id, "%d", count); menu_items++; - menu_prev = SNeutrinoSettings::ITEM_PLUGIN; + menu_prev = SNeutrinoSettings::ITEM_PLUGIN_TYPES; neutrino_msg_t d_key = g_PluginList->getKey(count); //printf("[neutrino usermenu] plugin %d, set key %d...\n", count, g_PluginList->getKey(count)); StreamFeaturesChanger = new CStreamFeaturesChangeExec(); keyhelper.get(&key,&icon, d_key); menu_item = new CMenuForwarder(g_PluginList->getName(count), true, NULL, StreamFeaturesChanger, id, key, icon); - menu->addItem(menu_item, 0); cnt++; } diff --git a/src/gui/user_menue_setup.cpp b/src/gui/user_menue_setup.cpp index 539065c2e..2c7ae6de2 100644 --- a/src/gui/user_menue_setup.cpp +++ b/src/gui/user_menue_setup.cpp @@ -79,7 +79,7 @@ const CMenuOptionChooser::keyval USERMENU_ITEM_OPTIONS[USERMENU_ITEM_OPTION_COUN { SNeutrinoSettings::ITEM_REMOTE, LOCALE_RCLOCK_MENUEADD }, { SNeutrinoSettings::ITEM_FAVORITS, LOCALE_FAVORITES_MENUEADD }, { SNeutrinoSettings::ITEM_TECHINFO, LOCALE_EPGMENU_STREAMINFO }, - { SNeutrinoSettings::ITEM_PLUGIN, LOCALE_TIMERLIST_PLUGIN }, + { SNeutrinoSettings::ITEM_PLUGIN_TYPES, LOCALE_USERMENU_ITEM_PLUGIN_TYPES }, { SNeutrinoSettings::ITEM_VTXT, LOCALE_USERMENU_ITEM_VTXT }, { SNeutrinoSettings::ITEM_IMAGEINFO, LOCALE_SERVICEMENU_IMAGEINFO }, { SNeutrinoSettings::ITEM_BOXINFO, LOCALE_EXTRA_DBOXINFO }, diff --git a/src/system/locals.h b/src/system/locals.h index fff99ba4c..3e94dbda8 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1639,7 +1639,7 @@ typedef enum LOCALE_PERSONALIZE_PINPROTECT, LOCALE_PERSONALIZE_PINSTATUS, LOCALE_PERSONALIZE_PLUGINS, - LOCALE_PERSONALIZE_USERMENU_PLUGIN_TYPE, + LOCALE_PERSONALIZE_USERMENU_PLUGIN_TYPES, LOCALE_PERSONALIZE_USERMENU_PREFERRED_BUTTONS, LOCALE_PERSONALIZE_USERMENU_SHOW_CANCEL, LOCALE_PERSONALIZE_VISIBLE, @@ -1998,6 +1998,7 @@ typedef enum LOCALE_USERMENU_ITEM_BAR, LOCALE_USERMENU_ITEM_EPG_MISC, LOCALE_USERMENU_ITEM_NONE, + LOCALE_USERMENU_ITEM_PLUGIN_TYPES, LOCALE_USERMENU_ITEM_VTXT, LOCALE_USERMENU_MSG_INFO_IS_EMPTY, LOCALE_USERMENU_MSG_WARNING_NAME, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 7700d888d..cdfab817f 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1639,7 +1639,7 @@ const char * locale_real_names[] = "personalize.pinprotect", "personalize.pinstatus", "personalize.plugins", - "personalize.usermenu_plugin_type", + "personalize.usermenu_plugin_types", "personalize.usermenu_preferred_buttons", "personalize.usermenu_show_cancel", "personalize.visible", @@ -1998,6 +1998,7 @@ const char * locale_real_names[] = "usermenu.item_bar", "usermenu.item_epg_misc", "usermenu.item_none", + "usermenu.item_plugin_types", "usermenu.item_vtxt", "usermenu.msg_info_is_empty", "usermenu.msg_warning_name", diff --git a/src/system/settings.cpp b/src/system/settings.cpp index 42bb69cd1..098c47c80 100644 --- a/src/system/settings.cpp +++ b/src/system/settings.cpp @@ -103,10 +103,14 @@ const struct personalize_settings_t personalize_settings[SNeutrinoSettings::P_SE {"personalize_feat_key_vtxt" , CPersonalizeGui::PERSONALIZE_FEAT_KEY_BLUE}, {"personalize_feat_key_rclock" , CPersonalizeGui::PERSONALIZE_FEAT_KEY_AUTO}, - //plugin type - {"personalize_usermenu_plugin_type" , CPlugins::P_TYPE_TOOL }, //user menu {"personalize_usermenu_show_cancel" , true}, + + //plugin types + {"personalize_usermenu_plugin_type_games" , false}, + {"personalize_usermenu_plugin_type_tools" , true}, + {"personalize_usermenu_plugin_type_scripts" , false}, + {"personalize_usermenu_plugin_type_lua" , true}, }; CScanSettings::CScanSettings(void) diff --git a/src/system/settings.h b/src/system/settings.h index b4aa6ee09..b84dbe163 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -234,11 +234,15 @@ struct SNeutrinoSettings P_FEAT_KEY_VTXT, P_FEAT_KEY_RC_LOCK, - //plugins type - P_UMENU_PLUGIN_TYPE, //user menu P_UMENU_SHOW_CANCEL, + //plugins types + P_UMENU_PLUGIN_TYPE_GAMES, + P_UMENU_PLUGIN_TYPE_TOOLS, + P_UMENU_PLUGIN_TYPE_SCRIPTS, + P_UMENU_PLUGIN_TYPE_LUA, + P_SETTINGS_MAX }; @@ -654,7 +658,7 @@ struct SNeutrinoSettings ITEM_VTXT = 11, ITEM_TECHINFO = 13, ITEM_REMOTE = 14, - ITEM_PLUGIN = 15, + ITEM_PLUGIN_TYPES = 15, ITEM_IMAGEINFO = 16, ITEM_BOXINFO = 17, ITEM_CAM = 18,