- usermenu: cleanup from unused code

This commit is contained in:
svenhoefer
2014-01-02 22:57:01 +01:00
parent 419cff8c8a
commit e529bd011b
5 changed files with 7 additions and 72 deletions

View File

@@ -82,15 +82,6 @@ CUserMenu::~CUserMenu()
}
#if 0
#define MAINMENU_RECORDING_OPTION_COUNT 2
const CMenuOptionChooser::keyval MAINMENU_RECORDING_OPTIONS[MAINMENU_RECORDING_OPTION_COUNT] =
{
{ 0, LOCALE_MAINMENU_RECORDING_START },
{ 1, LOCALE_MAINMENU_RECORDING_STOP }
};
#endif
// USERMENU
bool CUserMenu::showUserMenu(int button)
{
@@ -392,40 +383,13 @@ bool CUserMenu::showUserMenu(int button)
menu->addItem(menu_item, 0);
}
break;
#if 0 // FIXME not supported yet
case SNeutrinoSettings::ITEM_MOVIEPLAYER_TS:
menu_items++;
menu_prev = SNeutrinoSettings::ITEM_MOVIEPLAYER_TS;
keyhelper.get(&key,&icon,CRCInput::RC_green);
menu_item = new CMenuForwarder(LOCALE_MOVIEPLAYER_TSPLAYBACK, true, NULL, moviePlayerGui, "tsplayback", key, icon);
menu->addItem(menu_item, false);
break;
case SNeutrinoSettings::ITEM_VTXT:
for (unsigned int count = 0; count < (unsigned int) g_PluginList->getNumberOfPlugins(); count++)
{
std::string tmp = g_PluginList->getName(count);
if (g_PluginList->getType(count)== CPlugins::P_TYPE_TOOL && !g_PluginList->isHidden(count) && tmp.find("Teletext") != std::string::npos)
{
sprintf(id, "%d", count);
menu_items++;
menu_prev = SNeutrinoSettings::ITEM_VTXT;
//keyhelper.get(&key,&icon,CRCInput::RC_blue);
keyhelper.get(&key,&icon);
menu_item = new CMenuForwarderNonLocalized(g_PluginList->getName(count), true, NULL, StreamFeaturesChanger, id, key, icon);
menu->addItem(menu_item, 0);
}
}
break;
#endif
default:
printf("[neutrino] WARNING! menu wrong item!!\n");
break;
}
}
#if 0
// Allow some tailoring for privat image bakers ;)
if (button == SNeutrinoSettings::BUTTON_RED) {
}
@@ -434,17 +398,8 @@ bool CUserMenu::showUserMenu(int button)
else if ( button == SNeutrinoSettings::BUTTON_YELLOW) {
}
else if ( button == SNeutrinoSettings::BUTTON_BLUE) {
#ifdef _EXPERIMENTAL_SETTINGS_
//Experimental Settings
if (menu_prev != -1)
menu->addItem(GenericMenuSeparatorLine);
menu_items ++;
menu_key++;
// FYI: there is a memory leak with 'new CExperimentalSettingsMenuHandler()
menu_item = new CMenuForwarder(LOCALE_EXPERIMENTALSETTINGS, true, NULL, new CExperimentalSettingsMenuHandler(), "-1", CRCInput::convertDigitToKey(menu_key));
menu->addItem(menu_item, false);
#endif
}
#endif
// show menu if there are more than 2 items only
// otherwise, we start the item directly (must be the last one)
@@ -456,9 +411,6 @@ bool CUserMenu::showUserMenu(int button)
user_menu[button].selected = menu->getSelected();
// restore mute symbol
//AudioMute(current_muted, true);
// clear the heap
if (tmpFavorites) delete tmpFavorites;
if (tmpAudioSelectMenuHandler) delete tmpAudioSelectMenuHandler;
@@ -483,19 +435,6 @@ bool CUserMenu::showUserMenu(int button)
**************************************************************************************/
bool CUserMenu::changeNotify(const neutrino_locale_t OptionName, void * Data)
{
#if 0
bool res = !CRecordManager::getInstance()->RecordingStatus() ? false:true;
if ((ARE_LOCALES_EQUAL(OptionName, LOCALE_MAINMENU_RECORDING_START)) || (ARE_LOCALES_EQUAL(OptionName, LOCALE_MAINMENU_RECORDING)))
{
CNeutrinoApp::getInstance()->exec(NULL, "handle_record");
if (CRecordManager::getInstance()->RecordingStatus())
res = false;
else
res = true;
} else
#endif
if (ARE_LOCALES_EQUAL(OptionName, LOCALE_MAINMENU_PAUSESECTIONSD)) {
g_Sectionsd->setPauseScanning((*((int *)Data)) == 0);
}

View File

@@ -34,7 +34,6 @@
#include <config.h>
#endif
#include "user_menue_setup.h"
#include <global.h>

View File

@@ -58,7 +58,7 @@ const struct usermenu_props_t usermenu[USERMENU_ITEMS_COUNT] =
};
class CUserMenuSetup : public CMenuTarget
class CUserMenuSetup : public CMenuTarget
{
private:
int width;

View File

@@ -755,10 +755,10 @@ int CNeutrinoApp::loadSetup(const char * fname)
//-------------------------------------------
// this is as the current neutrino usermen
const char* usermenu_default[SNeutrinoSettings::BUTTON_MAX]={
"2,3,4,13", // RED
"6", // GREEN
"7", // YELLOW
"12,11,20,21,19,14,15" // BLUE
"2,3,4,13", // RED
"6", // GREEN
"7", // YELLOW
"12,11,20,21,19,14,15" // BLUE
};
char txt1[81];
std::string txt2;

View File

@@ -656,9 +656,6 @@ struct SNeutrinoSettings
ITEM_SCRIPTS = 21,
ITEM_YOUTUBE = 22,
ITEM_FILEPLAY = 23,
#if 0
ITEM_MOVIEPLAYER_TS,
#endif
ITEM_MAX // MUST be always the last in the list
} USER_ITEM;
std::string usermenu_text[BUTTON_MAX];