neutrino: sync keybind and usermenu code with neutrino-mp, code (C) martii

This commit is contained in:
[CST] Focus
2014-09-05 17:49:11 +04:00
parent f07e81c4b9
commit 420af7a4dc
45 changed files with 1767 additions and 1144 deletions

View File

@@ -93,28 +93,6 @@ int CMiscMenue::exec(CMenuTarget* parent, const std::string &actionKey)
return menu_return::RETURN_REPAINT;
}
else if(actionKey == "onekey_plugin")
{
CMenuWidget OneKeyPluginSelector(LOCALE_EXTRA_KEY_PLUGIN, NEUTRINO_ICON_FEATURES);
OneKeyPluginSelector.addItem(GenericMenuSeparator);
char id[5];
int cnt = 0;
int enabled_count = 0;
for(unsigned int count=0;count < (unsigned int) g_PluginList->getNumberOfPlugins();count++)
{
if (!g_PluginList->isHidden(count))
{
sprintf(id, "%d", count);
enabled_count++;
OneKeyPluginSelector.addItem(new CMenuForwarder(g_PluginList->getName(count), true, NULL, new COnekeyPluginChangeExec(), id, CRCInput::convertDigitToKey(count)), (cnt == 0));
cnt++;
}
}
OneKeyPluginSelector.exec(NULL, "");
return menu_return::RETURN_REPAINT;
}
else if(actionKey == "movieplayer_plugin")
{
CMenuWidget MoviePluginSelector(LOCALE_MOVIEPLAYER_DEFPLUGIN, NEUTRINO_ICON_FEATURES);
@@ -347,10 +325,6 @@ void CMiscMenue::showMiscSettingsMenuGeneral(CMenuWidget *ms_general)
mf->setHint("", LOCALE_MENU_HINT_PLUGINS_HDD_DIR);
ms_general->addItem(mf);
mf = new CMenuForwarder(LOCALE_EXTRA_KEY_PLUGIN, true, g_settings.onekey_plugin, this, "onekey_plugin");
mf->setHint("", LOCALE_MENU_HINT_ONEKEY_PLUGIN);
ms_general->addItem(mf);
mf = new CMenuForwarder(LOCALE_MPKEY_PLUGIN, true, g_settings.movieplayer_plugin, this, "movieplayer_plugin");
mf->setHint("", LOCALE_MENU_HINT_MOVIEPLAYER_PLUGIN);
ms_general->addItem(mf);