mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 00:11:08 +02:00
plugins: type for listed plugins on blue key is selectable
* add mainmenu items for tools and lua-extensions
(default not visible)
* add usermenu items for tools and lua-extensions
(default off)
Origin commit data
------------------
Commit: f9ad30f183
Author: vanhofen <vanhofen@gmx.de>
Date: 2014-02-04 (Tue, 04 Feb 2014)
Origin message was:
------------------
- plugins: type for listed plugins on blue key is selectable
* add mainmenu items for tools and lua-extensions
(default not visible)
* add usermenu items for tools and lua-extensions
(default off)
This commit is contained in:
@@ -740,6 +740,7 @@ mainmenu.channels Kanalliste
|
|||||||
mainmenu.clearsectionsd Lösche EPG Cache
|
mainmenu.clearsectionsd Lösche EPG Cache
|
||||||
mainmenu.games Spiele
|
mainmenu.games Spiele
|
||||||
mainmenu.head Hauptmenü
|
mainmenu.head Hauptmenü
|
||||||
|
mainmenu.lua Lua-Erweiterungen
|
||||||
mainmenu.media Multimedia
|
mainmenu.media Multimedia
|
||||||
mainmenu.movieplayer Movieplayer
|
mainmenu.movieplayer Movieplayer
|
||||||
mainmenu.pausesectionsd EPG auslesen
|
mainmenu.pausesectionsd EPG auslesen
|
||||||
@@ -756,6 +757,7 @@ mainmenu.shutdown Ausschalten
|
|||||||
mainmenu.shutdown_menu Ausschalt Optionen
|
mainmenu.shutdown_menu Ausschalt Optionen
|
||||||
mainmenu.sleeptimer SleepTimer
|
mainmenu.sleeptimer SleepTimer
|
||||||
mainmenu.standby Standby
|
mainmenu.standby Standby
|
||||||
|
mainmenu.tools Werkzeuge
|
||||||
mainmenu.tvmode TV-Modus
|
mainmenu.tvmode TV-Modus
|
||||||
mainmenu.tvradio_switch TV-Radio Umschaltung
|
mainmenu.tvradio_switch TV-Radio Umschaltung
|
||||||
mainsettings.audio Audio
|
mainsettings.audio Audio
|
||||||
@@ -953,6 +955,7 @@ menu.hint_leds_record Definiert, ob die Power-LEDs blinken sollen, wenn eine Auf
|
|||||||
menu.hint_leds_standby Definiert den Status der Power-LEDs im Standby
|
menu.hint_leds_standby Definiert den Status der Power-LEDs im Standby
|
||||||
menu.hint_leds_tv Definiert den Status der Power-LEDs im TV-Modus
|
menu.hint_leds_tv Definiert den Status der Power-LEDs im TV-Modus
|
||||||
menu.hint_load Laden der Neutrino-HD-Einstellungen aus einer Datei
|
menu.hint_load Laden der Neutrino-HD-Einstellungen aus einer Datei
|
||||||
|
menu.hint_lua Lua-Erweiterungen ausführen
|
||||||
menu.hint_make_hdlist Bei aktiver Option wird ein Bouquet namens 'HD' erzeugt, in dem alle HD-Sender zusammengefasst sind
|
menu.hint_make_hdlist Bei aktiver Option wird ein Bouquet namens 'HD' erzeugt, in dem alle HD-Sender zusammengefasst sind
|
||||||
menu.hint_make_newlist Nach einer Kanalsuche wird ein Bouquet namens 'neue Kanäle' erzeugt
|
menu.hint_make_newlist Nach einer Kanalsuche wird ein Bouquet namens 'neue Kanäle' erzeugt
|
||||||
menu.hint_make_removedlist Nach einer Kanalsuche wird ein Bouquet namens 'gelöschte Kanäle' erzeugt
|
menu.hint_make_removedlist Nach einer Kanalsuche wird ein Bouquet namens 'gelöschte Kanäle' erzeugt
|
||||||
@@ -1165,6 +1168,7 @@ menu.hint_theme Wählen Sie ein vordefiniertes Farbschema, speichern oder laden
|
|||||||
menu.hint_timeouts Gibt an, nach welcher Zeit in Sekunden die Menüs oder Infofenster sich automatisch schließen (0 deaktiviert)
|
menu.hint_timeouts Gibt an, nach welcher Zeit in Sekunden die Menüs oder Infofenster sich automatisch schließen (0 deaktiviert)
|
||||||
menu.hint_timers Hinzufügen, entfernen und bearbeiten geplanter Aufnahmen oder anderer Timer
|
menu.hint_timers Hinzufügen, entfernen und bearbeiten geplanter Aufnahmen oder anderer Timer
|
||||||
menu.hint_timezone Wählen Sie ihre Zeitzone aus
|
menu.hint_timezone Wählen Sie ihre Zeitzone aus
|
||||||
|
menu.hint_tools Werkzeuge ausführen
|
||||||
menu.hint_tvmode Schaltet zum TV-Modus
|
menu.hint_tvmode Schaltet zum TV-Modus
|
||||||
menu.hint_tvradio_switch Schaltet zwischen TV- und Radio-Modus um
|
menu.hint_tvradio_switch Schaltet zwischen TV- und Radio-Modus um
|
||||||
menu.hint_vfd Frontdisplay und Power-LEDs
|
menu.hint_vfd Frontdisplay und Power-LEDs
|
||||||
@@ -1607,6 +1611,7 @@ personalize.pinhint Personalisierungs PIN Code eingeben
|
|||||||
personalize.pinprotect ja
|
personalize.pinprotect ja
|
||||||
personalize.pinstatus mit PIN
|
personalize.pinstatus mit PIN
|
||||||
personalize.plugins Plugins
|
personalize.plugins Plugins
|
||||||
|
personalize.usermenu_plugin_type Plugin Typ
|
||||||
personalize.usermenu_preferred_buttons Bevorzugte Tasten zuweisen
|
personalize.usermenu_preferred_buttons Bevorzugte Tasten zuweisen
|
||||||
personalize.usermenu_show_cancel Zeige Schalter "Abbrechen"
|
personalize.usermenu_show_cancel Zeige Schalter "Abbrechen"
|
||||||
personalize.visible sichtbar
|
personalize.visible sichtbar
|
||||||
|
@@ -740,6 +740,7 @@ mainmenu.channels Channels
|
|||||||
mainmenu.clearsectionsd Clear EPG Cache
|
mainmenu.clearsectionsd Clear EPG Cache
|
||||||
mainmenu.games Games
|
mainmenu.games Games
|
||||||
mainmenu.head Main Menu
|
mainmenu.head Main Menu
|
||||||
|
mainmenu.lua Lua extensions
|
||||||
mainmenu.media Media
|
mainmenu.media Media
|
||||||
mainmenu.movieplayer Movieplayer
|
mainmenu.movieplayer Movieplayer
|
||||||
mainmenu.pausesectionsd Read EPG
|
mainmenu.pausesectionsd Read EPG
|
||||||
@@ -756,6 +757,7 @@ mainmenu.shutdown Shutdown (deep standby)
|
|||||||
mainmenu.shutdown_menu Shutdown
|
mainmenu.shutdown_menu Shutdown
|
||||||
mainmenu.sleeptimer SleepTimer
|
mainmenu.sleeptimer SleepTimer
|
||||||
mainmenu.standby Standby
|
mainmenu.standby Standby
|
||||||
|
mainmenu.tools Tools
|
||||||
mainmenu.tvmode TV-Mode
|
mainmenu.tvmode TV-Mode
|
||||||
mainmenu.tvradio_switch TV-Radio Switch
|
mainmenu.tvradio_switch TV-Radio Switch
|
||||||
mainsettings.audio Audio
|
mainsettings.audio Audio
|
||||||
@@ -953,6 +955,7 @@ menu.hint_leds_record LEDs state when box recording
|
|||||||
menu.hint_leds_standby LEDs state in soft-standby mode
|
menu.hint_leds_standby LEDs state in soft-standby mode
|
||||||
menu.hint_leds_tv Working LEDs state
|
menu.hint_leds_tv Working LEDs state
|
||||||
menu.hint_load Load Neutrino-HD GUI settings from file
|
menu.hint_load Load Neutrino-HD GUI settings from file
|
||||||
|
menu.hint_lua Run Lua extensions
|
||||||
menu.hint_make_hdlist Auto-create HD channel list based on\nchannel type and name
|
menu.hint_make_hdlist Auto-create HD channel list based on\nchannel type and name
|
||||||
menu.hint_make_newlist Create list of recently added channels
|
menu.hint_make_newlist Create list of recently added channels
|
||||||
menu.hint_make_removedlist Create list of recently removed channels
|
menu.hint_make_removedlist Create list of recently removed channels
|
||||||
@@ -1165,6 +1168,7 @@ menu.hint_theme Select pre-defined color theme\nSave or load theme from files
|
|||||||
menu.hint_timeouts Configure time to hide GUI windows\nin seconds
|
menu.hint_timeouts Configure time to hide GUI windows\nin seconds
|
||||||
menu.hint_timers Add/Remove/Edit scheduled\nrecording, reminders etc.
|
menu.hint_timers Add/Remove/Edit scheduled\nrecording, reminders etc.
|
||||||
menu.hint_timezone Select your timezone
|
menu.hint_timezone Select your timezone
|
||||||
|
menu.hint_tools Run tools
|
||||||
menu.hint_tvmode Switch box to TV mode
|
menu.hint_tvmode Switch box to TV mode
|
||||||
menu.hint_tvradio_switch Switches between TV and Radio mode
|
menu.hint_tvradio_switch Switches between TV and Radio mode
|
||||||
menu.hint_vfd Frontpanel LEDS, VFD options
|
menu.hint_vfd Frontpanel LEDS, VFD options
|
||||||
@@ -1607,6 +1611,7 @@ personalize.pinhint Enter the Personalization PIN Code
|
|||||||
personalize.pinprotect Yes
|
personalize.pinprotect Yes
|
||||||
personalize.pinstatus Require PIN
|
personalize.pinstatus Require PIN
|
||||||
personalize.plugins Plugins
|
personalize.plugins Plugins
|
||||||
|
personalize.usermenu_plugin_type Plugin type
|
||||||
personalize.usermenu_preferred_buttons Assigning of preferred keys
|
personalize.usermenu_preferred_buttons Assigning of preferred keys
|
||||||
personalize.usermenu_show_cancel Show "Cancel"-Button
|
personalize.usermenu_show_cancel Show "Cancel"-Button
|
||||||
personalize.visible Visible
|
personalize.visible Visible
|
||||||
|
@@ -195,7 +195,14 @@ 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
|
{ 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)
|
CPersonalizeGui::CPersonalizeGui() : CPINProtection(g_settings.personalize_pincode)
|
||||||
{
|
{
|
||||||
@@ -453,6 +460,8 @@ void CPersonalizeGui::ShowUserMenu(CMenuWidget* p_widget, vector<CUserMenuSetup*
|
|||||||
ShowPreverredKeySetup(fkeyMenu);
|
ShowPreverredKeySetup(fkeyMenu);
|
||||||
#endif
|
#endif
|
||||||
p_widget->addItem(GenericMenuSeparatorLine);
|
p_widget->addItem(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));
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -134,6 +134,8 @@ int CPluginList::exec(CMenuTarget* parent, const std::string & /*actionKey*/)
|
|||||||
tmp->number = count;
|
tmp->number = count;
|
||||||
tmp->name = g_PluginList->getName(count);
|
tmp->name = g_PluginList->getName(count);
|
||||||
tmp->desc = g_PluginList->getDescription(count);
|
tmp->desc = g_PluginList->getDescription(count);
|
||||||
|
if (tmp->desc == "")
|
||||||
|
tmp->desc = "---";
|
||||||
pluginlist.push_back(tmp);
|
pluginlist.push_back(tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -310,7 +312,7 @@ void CPluginList::paintHead()
|
|||||||
|
|
||||||
if (pluginlisttype == CPlugins::P_TYPE_GAME)
|
if (pluginlisttype == CPlugins::P_TYPE_GAME)
|
||||||
header.setIcon(NEUTRINO_ICON_GAMES);
|
header.setIcon(NEUTRINO_ICON_GAMES);
|
||||||
else if (pluginlisttype == CPlugins::P_TYPE_SCRIPT)
|
else
|
||||||
header.setIcon(NEUTRINO_ICON_SHELL);
|
header.setIcon(NEUTRINO_ICON_SHELL);
|
||||||
|
|
||||||
header.paint(CC_SAVE_SCREEN_NO);
|
header.paint(CC_SAVE_SCREEN_NO);
|
||||||
@@ -356,11 +358,10 @@ void CPluginList::paintItems()
|
|||||||
|
|
||||||
CPluginList::result_ CPluginList::pluginSelected()
|
CPluginList::result_ CPluginList::pluginSelected()
|
||||||
{
|
{
|
||||||
|
hide();
|
||||||
g_PluginList->startPlugin(pluginlist[selected]->number,0);
|
g_PluginList->startPlugin(pluginlist[selected]->number,0);
|
||||||
if (!g_PluginList->getScriptOutput().empty())
|
if (!g_PluginList->getScriptOutput().empty())
|
||||||
{
|
{
|
||||||
hide();
|
|
||||||
//ShowMsg(LOCALE_PLUGINS_RESULT, Latin1_to_UTF8(g_PluginList->getScriptOutput()), CMessageBox::mbrBack,CMessageBox::mbBack,NEUTRINO_ICON_SHELL);
|
|
||||||
ShowMsg(LOCALE_PLUGINS_RESULT, g_PluginList->getScriptOutput(), CMessageBox::mbrBack,CMessageBox::mbBack,NEUTRINO_ICON_SHELL);
|
ShowMsg(LOCALE_PLUGINS_RESULT, g_PluginList->getScriptOutput(), CMessageBox::mbrBack,CMessageBox::mbBack,NEUTRINO_ICON_SHELL);
|
||||||
}
|
}
|
||||||
paint();
|
paint();
|
||||||
|
@@ -134,7 +134,7 @@ void CPlugins::scanDir(const char *dir)
|
|||||||
else if (new_plugin.type == CPlugins::P_TYPE_LUA)
|
else if (new_plugin.type == CPlugins::P_TYPE_LUA)
|
||||||
new_plugin.pluginfile.append(".lua");
|
new_plugin.pluginfile.append(".lua");
|
||||||
#endif
|
#endif
|
||||||
else
|
else // CPlugins::P_TYPE_GAME or CPlugins::P_TYPE_TOOL
|
||||||
new_plugin.pluginfile.append(".so");
|
new_plugin.pluginfile.append(".so");
|
||||||
// We do not check if new_plugin.pluginfile exists since .cfg in
|
// We do not check if new_plugin.pluginfile exists since .cfg in
|
||||||
// PLUGINDIR_VAR can overwrite settings in read only dir
|
// PLUGINDIR_VAR can overwrite settings in read only dir
|
||||||
|
@@ -52,7 +52,6 @@ class CPlugins
|
|||||||
P_TYPE_GAME = 0x2,
|
P_TYPE_GAME = 0x2,
|
||||||
P_TYPE_TOOL = 0x4,
|
P_TYPE_TOOL = 0x4,
|
||||||
P_TYPE_SCRIPT = 0x8
|
P_TYPE_SCRIPT = 0x8
|
||||||
|
|
||||||
#if ENABLE_LUA
|
#if ENABLE_LUA
|
||||||
,
|
,
|
||||||
P_TYPE_LUA = 0x10
|
P_TYPE_LUA = 0x10
|
||||||
|
@@ -123,7 +123,11 @@ bool CUserMenu::showUserMenu(int button)
|
|||||||
CDBoxInfoWidget *boxinfo = NULL;
|
CDBoxInfoWidget *boxinfo = NULL;
|
||||||
CNeutrinoApp * neutrino = NULL;
|
CNeutrinoApp * neutrino = NULL;
|
||||||
CPluginList * games = NULL;
|
CPluginList * games = NULL;
|
||||||
|
CPluginList * tools = NULL;
|
||||||
CPluginList * scripts = NULL;
|
CPluginList * scripts = NULL;
|
||||||
|
#if ENABLE_LUA
|
||||||
|
CPluginList * lua = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
std::string txt = g_settings.usermenu_text[button];
|
std::string txt = g_settings.usermenu_text[button];
|
||||||
neutrino_locale_t caption = user_menu[button].caption;
|
neutrino_locale_t caption = user_menu[button].caption;
|
||||||
@@ -294,6 +298,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_item = new CMenuForwarder(LOCALE_MAINMENU_GAMES, g_PluginList->hasPlugin(CPlugins::P_TYPE_GAME), NULL, games, "-1", key, icon );
|
||||||
menu->addItem(menu_item, false);
|
menu->addItem(menu_item, false);
|
||||||
break;
|
break;
|
||||||
|
case SNeutrinoSettings::ITEM_TOOLS:
|
||||||
|
menu_items++;
|
||||||
|
menu_prev = SNeutrinoSettings::ITEM_TOOLS;
|
||||||
|
tools = new CPluginList(LOCALE_MAINMENU_TOOLS,CPlugins::P_TYPE_TOOL);
|
||||||
|
keyhelper.get(&key,&icon);
|
||||||
|
menu_item = new CMenuForwarder(LOCALE_MAINMENU_TOOLS, g_PluginList->hasPlugin(CPlugins::P_TYPE_TOOL), NULL, tools, "-1", key, icon );
|
||||||
|
menu->addItem(menu_item, false);
|
||||||
|
break;
|
||||||
case SNeutrinoSettings::ITEM_SCRIPTS:
|
case SNeutrinoSettings::ITEM_SCRIPTS:
|
||||||
menu_items++;
|
menu_items++;
|
||||||
menu_prev = SNeutrinoSettings::ITEM_SCRIPTS;
|
menu_prev = SNeutrinoSettings::ITEM_SCRIPTS;
|
||||||
@@ -302,17 +314,24 @@ bool CUserMenu::showUserMenu(int button)
|
|||||||
menu_item = new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, g_PluginList->hasPlugin(CPlugins::P_TYPE_SCRIPT), NULL, scripts, "-1", key, icon );
|
menu_item = new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, g_PluginList->hasPlugin(CPlugins::P_TYPE_SCRIPT), NULL, scripts, "-1", key, icon );
|
||||||
menu->addItem(menu_item, false);
|
menu->addItem(menu_item, false);
|
||||||
break;
|
break;
|
||||||
|
#if ENABLE_LUA
|
||||||
|
case SNeutrinoSettings::ITEM_LUA:
|
||||||
|
menu_items++;
|
||||||
|
menu_prev = SNeutrinoSettings::ITEM_LUA;
|
||||||
|
lua = new CPluginList(LOCALE_MAINMENU_LUA,CPlugins::P_TYPE_LUA);
|
||||||
|
keyhelper.get(&key,&icon);
|
||||||
|
menu_item = new CMenuForwarder(LOCALE_MAINMENU_LUA, g_PluginList->hasPlugin(CPlugins::P_TYPE_LUA), NULL, lua, "-1", key, icon );
|
||||||
|
menu->addItem(menu_item, false);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case SNeutrinoSettings::ITEM_PLUGIN:
|
case SNeutrinoSettings::ITEM_PLUGIN:
|
||||||
{
|
{
|
||||||
char id[5];
|
char id[5];
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
for (unsigned int count = 0; count < (unsigned int) g_PluginList->getNumberOfPlugins(); count++)
|
for (unsigned int count = 0; count < (unsigned int) g_PluginList->getNumberOfPlugins(); count++)
|
||||||
{
|
{
|
||||||
bool show = g_PluginList->getType(count) == CPlugins::P_TYPE_TOOL;
|
bool show = g_PluginList->getType(count) == g_settings.personalize[SNeutrinoSettings::P_UMENU_PLUGIN_TYPE];
|
||||||
|
|
||||||
#if ENABLE_LUA
|
|
||||||
show = show || g_PluginList->getType(count) == CPlugins::P_TYPE_LUA;
|
|
||||||
#endif
|
|
||||||
if (show && !g_PluginList->isHidden(count))
|
if (show && !g_PluginList->isHidden(count))
|
||||||
{
|
{
|
||||||
sprintf(id, "%d", count);
|
sprintf(id, "%d", count);
|
||||||
|
@@ -89,7 +89,9 @@ const CMenuOptionChooser::keyval USERMENU_ITEM_OPTIONS[USERMENU_ITEM_OPTION_COUN
|
|||||||
{ SNeutrinoSettings::ITEM_SCRIPTS, LOCALE_MAINMENU_SCRIPTS },
|
{ SNeutrinoSettings::ITEM_SCRIPTS, LOCALE_MAINMENU_SCRIPTS },
|
||||||
{ SNeutrinoSettings::ITEM_RECORD, LOCALE_TIMERLIST_TYPE_RECORD },
|
{ SNeutrinoSettings::ITEM_RECORD, LOCALE_TIMERLIST_TYPE_RECORD },
|
||||||
{ SNeutrinoSettings::ITEM_YOUTUBE, LOCALE_MOVIEPLAYER_YTPLAYBACK },
|
{ SNeutrinoSettings::ITEM_YOUTUBE, LOCALE_MOVIEPLAYER_YTPLAYBACK },
|
||||||
{ SNeutrinoSettings::ITEM_FILEPLAY, LOCALE_MOVIEPLAYER_FILEPLAYBACK }
|
{ SNeutrinoSettings::ITEM_FILEPLAY, LOCALE_MOVIEPLAYER_FILEPLAYBACK },
|
||||||
|
{ SNeutrinoSettings::ITEM_TOOLS, LOCALE_MAINMENU_TOOLS },
|
||||||
|
{ SNeutrinoSettings::ITEM_LUA, LOCALE_MAINMENU_LUA }
|
||||||
};
|
};
|
||||||
|
|
||||||
int CUserMenuSetup::exec(CMenuTarget* parent, const std::string &)
|
int CUserMenuSetup::exec(CMenuTarget* parent, const std::string &)
|
||||||
|
@@ -195,11 +195,25 @@ void CNeutrinoApp::InitMenuMain()
|
|||||||
mf->setHint(NEUTRINO_ICON_HINT_GAMES, LOCALE_MENU_HINT_GAMES);
|
mf->setHint(NEUTRINO_ICON_HINT_GAMES, LOCALE_MENU_HINT_GAMES);
|
||||||
personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_GAMES]);
|
personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_GAMES]);
|
||||||
|
|
||||||
|
//tools
|
||||||
|
bool show_tools = g_PluginList->hasPlugin(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_PluginList->hasPlugin(CPlugins::P_TYPE_SCRIPT);
|
bool show_scripts = g_PluginList->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);
|
mf->setHint(NEUTRINO_ICON_HINT_SCRIPTS, LOCALE_MENU_HINT_SCRIPTS);
|
||||||
personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SCRIPTS]);
|
personalize.addItem(MENU_MAIN, mf, &g_settings.personalize[SNeutrinoSettings::P_MAIN_SCRIPTS]);
|
||||||
|
|
||||||
|
#if ENABLE_LUA
|
||||||
|
//lua
|
||||||
|
bool show_lua = g_PluginList->hasPlugin(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]);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//separator
|
//separator
|
||||||
|
@@ -767,6 +767,7 @@ typedef enum
|
|||||||
LOCALE_MAINMENU_CLEARSECTIONSD,
|
LOCALE_MAINMENU_CLEARSECTIONSD,
|
||||||
LOCALE_MAINMENU_GAMES,
|
LOCALE_MAINMENU_GAMES,
|
||||||
LOCALE_MAINMENU_HEAD,
|
LOCALE_MAINMENU_HEAD,
|
||||||
|
LOCALE_MAINMENU_LUA,
|
||||||
LOCALE_MAINMENU_MEDIA,
|
LOCALE_MAINMENU_MEDIA,
|
||||||
LOCALE_MAINMENU_MOVIEPLAYER,
|
LOCALE_MAINMENU_MOVIEPLAYER,
|
||||||
LOCALE_MAINMENU_PAUSESECTIONSD,
|
LOCALE_MAINMENU_PAUSESECTIONSD,
|
||||||
@@ -783,6 +784,7 @@ typedef enum
|
|||||||
LOCALE_MAINMENU_SHUTDOWN_MENU,
|
LOCALE_MAINMENU_SHUTDOWN_MENU,
|
||||||
LOCALE_MAINMENU_SLEEPTIMER,
|
LOCALE_MAINMENU_SLEEPTIMER,
|
||||||
LOCALE_MAINMENU_STANDBY,
|
LOCALE_MAINMENU_STANDBY,
|
||||||
|
LOCALE_MAINMENU_TOOLS,
|
||||||
LOCALE_MAINMENU_TVMODE,
|
LOCALE_MAINMENU_TVMODE,
|
||||||
LOCALE_MAINMENU_TVRADIO_SWITCH,
|
LOCALE_MAINMENU_TVRADIO_SWITCH,
|
||||||
LOCALE_MAINSETTINGS_AUDIO,
|
LOCALE_MAINSETTINGS_AUDIO,
|
||||||
@@ -980,6 +982,7 @@ typedef enum
|
|||||||
LOCALE_MENU_HINT_LEDS_STANDBY,
|
LOCALE_MENU_HINT_LEDS_STANDBY,
|
||||||
LOCALE_MENU_HINT_LEDS_TV,
|
LOCALE_MENU_HINT_LEDS_TV,
|
||||||
LOCALE_MENU_HINT_LOAD,
|
LOCALE_MENU_HINT_LOAD,
|
||||||
|
LOCALE_MENU_HINT_LUA,
|
||||||
LOCALE_MENU_HINT_MAKE_HDLIST,
|
LOCALE_MENU_HINT_MAKE_HDLIST,
|
||||||
LOCALE_MENU_HINT_MAKE_NEWLIST,
|
LOCALE_MENU_HINT_MAKE_NEWLIST,
|
||||||
LOCALE_MENU_HINT_MAKE_REMOVEDLIST,
|
LOCALE_MENU_HINT_MAKE_REMOVEDLIST,
|
||||||
@@ -1192,6 +1195,7 @@ typedef enum
|
|||||||
LOCALE_MENU_HINT_TIMEOUTS,
|
LOCALE_MENU_HINT_TIMEOUTS,
|
||||||
LOCALE_MENU_HINT_TIMERS,
|
LOCALE_MENU_HINT_TIMERS,
|
||||||
LOCALE_MENU_HINT_TIMEZONE,
|
LOCALE_MENU_HINT_TIMEZONE,
|
||||||
|
LOCALE_MENU_HINT_TOOLS,
|
||||||
LOCALE_MENU_HINT_TVMODE,
|
LOCALE_MENU_HINT_TVMODE,
|
||||||
LOCALE_MENU_HINT_TVRADIO_SWITCH,
|
LOCALE_MENU_HINT_TVRADIO_SWITCH,
|
||||||
LOCALE_MENU_HINT_VFD,
|
LOCALE_MENU_HINT_VFD,
|
||||||
@@ -1634,6 +1638,7 @@ typedef enum
|
|||||||
LOCALE_PERSONALIZE_PINPROTECT,
|
LOCALE_PERSONALIZE_PINPROTECT,
|
||||||
LOCALE_PERSONALIZE_PINSTATUS,
|
LOCALE_PERSONALIZE_PINSTATUS,
|
||||||
LOCALE_PERSONALIZE_PLUGINS,
|
LOCALE_PERSONALIZE_PLUGINS,
|
||||||
|
LOCALE_PERSONALIZE_USERMENU_PLUGIN_TYPE,
|
||||||
LOCALE_PERSONALIZE_USERMENU_PREFERRED_BUTTONS,
|
LOCALE_PERSONALIZE_USERMENU_PREFERRED_BUTTONS,
|
||||||
LOCALE_PERSONALIZE_USERMENU_SHOW_CANCEL,
|
LOCALE_PERSONALIZE_USERMENU_SHOW_CANCEL,
|
||||||
LOCALE_PERSONALIZE_VISIBLE,
|
LOCALE_PERSONALIZE_VISIBLE,
|
||||||
|
@@ -767,6 +767,7 @@ const char * locale_real_names[] =
|
|||||||
"mainmenu.clearsectionsd",
|
"mainmenu.clearsectionsd",
|
||||||
"mainmenu.games",
|
"mainmenu.games",
|
||||||
"mainmenu.head",
|
"mainmenu.head",
|
||||||
|
"mainmenu.lua",
|
||||||
"mainmenu.media",
|
"mainmenu.media",
|
||||||
"mainmenu.movieplayer",
|
"mainmenu.movieplayer",
|
||||||
"mainmenu.pausesectionsd",
|
"mainmenu.pausesectionsd",
|
||||||
@@ -783,6 +784,7 @@ const char * locale_real_names[] =
|
|||||||
"mainmenu.shutdown_menu",
|
"mainmenu.shutdown_menu",
|
||||||
"mainmenu.sleeptimer",
|
"mainmenu.sleeptimer",
|
||||||
"mainmenu.standby",
|
"mainmenu.standby",
|
||||||
|
"mainmenu.tools",
|
||||||
"mainmenu.tvmode",
|
"mainmenu.tvmode",
|
||||||
"mainmenu.tvradio_switch",
|
"mainmenu.tvradio_switch",
|
||||||
"mainsettings.audio",
|
"mainsettings.audio",
|
||||||
@@ -980,6 +982,7 @@ const char * locale_real_names[] =
|
|||||||
"menu.hint_leds_standby",
|
"menu.hint_leds_standby",
|
||||||
"menu.hint_leds_tv",
|
"menu.hint_leds_tv",
|
||||||
"menu.hint_load",
|
"menu.hint_load",
|
||||||
|
"menu.hint_lua",
|
||||||
"menu.hint_make_hdlist",
|
"menu.hint_make_hdlist",
|
||||||
"menu.hint_make_newlist",
|
"menu.hint_make_newlist",
|
||||||
"menu.hint_make_removedlist",
|
"menu.hint_make_removedlist",
|
||||||
@@ -1192,6 +1195,7 @@ const char * locale_real_names[] =
|
|||||||
"menu.hint_timeouts",
|
"menu.hint_timeouts",
|
||||||
"menu.hint_timers",
|
"menu.hint_timers",
|
||||||
"menu.hint_timezone",
|
"menu.hint_timezone",
|
||||||
|
"menu.hint_tools",
|
||||||
"menu.hint_tvmode",
|
"menu.hint_tvmode",
|
||||||
"menu.hint_tvradio_switch",
|
"menu.hint_tvradio_switch",
|
||||||
"menu.hint_vfd",
|
"menu.hint_vfd",
|
||||||
@@ -1634,6 +1638,7 @@ const char * locale_real_names[] =
|
|||||||
"personalize.pinprotect",
|
"personalize.pinprotect",
|
||||||
"personalize.pinstatus",
|
"personalize.pinstatus",
|
||||||
"personalize.plugins",
|
"personalize.plugins",
|
||||||
|
"personalize.usermenu_plugin_type",
|
||||||
"personalize.usermenu_preferred_buttons",
|
"personalize.usermenu_preferred_buttons",
|
||||||
"personalize.usermenu_show_cancel",
|
"personalize.usermenu_show_cancel",
|
||||||
"personalize.visible",
|
"personalize.visible",
|
||||||
|
@@ -47,7 +47,9 @@ const struct personalize_settings_t personalize_settings[SNeutrinoSettings::P_SE
|
|||||||
{"personalize_media" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE},
|
{"personalize_media" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE},
|
||||||
|
|
||||||
{"personalize_games" , CPersonalizeGui::PERSONALIZE_MODE_NOTVISIBLE},
|
{"personalize_games" , CPersonalizeGui::PERSONALIZE_MODE_NOTVISIBLE},
|
||||||
|
{"personalize_tools" , CPersonalizeGui::PERSONALIZE_MODE_NOTVISIBLE},
|
||||||
{"personalize_scripts" , CPersonalizeGui::PERSONALIZE_MODE_NOTVISIBLE},
|
{"personalize_scripts" , CPersonalizeGui::PERSONALIZE_MODE_NOTVISIBLE},
|
||||||
|
{"personalize_lua" , CPersonalizeGui::PERSONALIZE_MODE_NOTVISIBLE},
|
||||||
{"personalize_settings" , CPersonalizeGui::PERSONALIZE_PROTECT_MODE_NOT_PROTECTED},
|
{"personalize_settings" , CPersonalizeGui::PERSONALIZE_PROTECT_MODE_NOT_PROTECTED},
|
||||||
{"personalize_service" , CPersonalizeGui::PERSONALIZE_PROTECT_MODE_NOT_PROTECTED},
|
{"personalize_service" , CPersonalizeGui::PERSONALIZE_PROTECT_MODE_NOT_PROTECTED},
|
||||||
{"personalize_sleeptimer" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE},
|
{"personalize_sleeptimer" , CPersonalizeGui::PERSONALIZE_MODE_VISIBLE},
|
||||||
@@ -101,6 +103,8 @@ const struct personalize_settings_t personalize_settings[SNeutrinoSettings::P_SE
|
|||||||
{"personalize_feat_key_vtxt" , CPersonalizeGui::PERSONALIZE_FEAT_KEY_BLUE},
|
{"personalize_feat_key_vtxt" , CPersonalizeGui::PERSONALIZE_FEAT_KEY_BLUE},
|
||||||
{"personalize_feat_key_rclock" , CPersonalizeGui::PERSONALIZE_FEAT_KEY_AUTO},
|
{"personalize_feat_key_rclock" , CPersonalizeGui::PERSONALIZE_FEAT_KEY_AUTO},
|
||||||
|
|
||||||
|
//plugin type
|
||||||
|
{"personalize_usermenu_plugin_type" , CPlugins::P_TYPE_TOOL },
|
||||||
//user menu
|
//user menu
|
||||||
{"personalize_usermenu_show_cancel" , true},
|
{"personalize_usermenu_show_cancel" , true},
|
||||||
};
|
};
|
||||||
|
@@ -177,7 +177,9 @@ struct SNeutrinoSettings
|
|||||||
P_MAIN_MEDIA,
|
P_MAIN_MEDIA,
|
||||||
|
|
||||||
P_MAIN_GAMES,
|
P_MAIN_GAMES,
|
||||||
|
P_MAIN_TOOLS,
|
||||||
P_MAIN_SCRIPTS,
|
P_MAIN_SCRIPTS,
|
||||||
|
P_MAIN_LUA,
|
||||||
P_MAIN_SETTINGS,
|
P_MAIN_SETTINGS,
|
||||||
P_MAIN_SERVICE,
|
P_MAIN_SERVICE,
|
||||||
P_MAIN_SLEEPTIMER,
|
P_MAIN_SLEEPTIMER,
|
||||||
@@ -231,6 +233,8 @@ struct SNeutrinoSettings
|
|||||||
P_FEAT_KEY_VTXT,
|
P_FEAT_KEY_VTXT,
|
||||||
P_FEAT_KEY_RC_LOCK,
|
P_FEAT_KEY_RC_LOCK,
|
||||||
|
|
||||||
|
//plugins type
|
||||||
|
P_UMENU_PLUGIN_TYPE,
|
||||||
//user menu
|
//user menu
|
||||||
P_UMENU_SHOW_CANCEL,
|
P_UMENU_SHOW_CANCEL,
|
||||||
|
|
||||||
@@ -658,6 +662,8 @@ struct SNeutrinoSettings
|
|||||||
ITEM_SCRIPTS = 21,
|
ITEM_SCRIPTS = 21,
|
||||||
ITEM_YOUTUBE = 22,
|
ITEM_YOUTUBE = 22,
|
||||||
ITEM_FILEPLAY = 23,
|
ITEM_FILEPLAY = 23,
|
||||||
|
ITEM_TOOLS = 24,
|
||||||
|
ITEM_LUA = 25,
|
||||||
ITEM_MAX // MUST be always the last in the list
|
ITEM_MAX // MUST be always the last in the list
|
||||||
} USER_ITEM;
|
} USER_ITEM;
|
||||||
std::string usermenu_text[BUTTON_MAX];
|
std::string usermenu_text[BUTTON_MAX];
|
||||||
|
Reference in New Issue
Block a user