neutrino: fix numbers in menus without digit-icons

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@301 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: ee4514cad1
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2010-02-07 (Sun, 07 Feb 2010)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2010-02-07 22:20:34 +00:00
parent 5a693f16c4
commit 83382b8aeb
5 changed files with 69 additions and 96 deletions

View File

@@ -93,7 +93,7 @@ int CAudioSelectMenuHandler::doMenu ()
sprintf(apid, "%d", count);
AudioSelector.addItem(new CMenuForwarderNonLocalized(
g_RemoteControl->current_PIDs.APIDs[count].desc, true, NULL,
APIDChanger, apid, CRCInput::convertDigitToKey(count + 1), CNeutrinoApp::getInstance()->digiIcon(count + 1)),
APIDChanger, apid, CRCInput::convertDigitToKey(count + 1)),
(count == g_RemoteControl->current_PIDs.PIDs.selected_apid));
}
@@ -133,7 +133,7 @@ int CAudioSelectMenuHandler::doMenu ()
char item[64];
sprintf(item, "DVB: %s (pid %x)", sd->ISO639_language_code.c_str(), sd->pId);
AudioSelector.addItem(new CMenuForwarderNonLocalized(item /*sd->ISO639_language_code.c_str()*/,
sd->pId != dvbsub_getpid(), NULL, &SubtitleChanger, spid, CRCInput::convertDigitToKey(++count), CNeutrinoApp::getInstance()->digiIcon(count)));
sd->pId != dvbsub_getpid(), NULL, &SubtitleChanger, spid, CRCInput::convertDigitToKey(++count)));
}
if (s->thisSubType == CZapitAbsSub::TTX) {
CZapitTTXSub* sd = reinterpret_cast<CZapitTTXSub*>(s);
@@ -148,7 +148,7 @@ int CAudioSelectMenuHandler::doMenu ()
char item[64];
sprintf(item, "TTX: %s (pid %x page %03X)", sd->ISO639_language_code.c_str(), sd->pId, page);
AudioSelector.addItem(new CMenuForwarderNonLocalized(item /*sd->ISO639_language_code.c_str()*/,
!tuxtx_subtitle_running(sd->pId, page, NULL), NULL, &SubtitleChanger, spid, CRCInput::convertDigitToKey(++count), CNeutrinoApp::getInstance()->digiIcon(count)));
!tuxtx_subtitle_running(sd->pId, page, NULL), NULL, &SubtitleChanger, spid, CRCInput::convertDigitToKey(++count)));
}
}
if(sep_added) {

View File

@@ -481,11 +481,15 @@ void CMenuWidget::paint()
for (unsigned int i= 0; i< items.size(); i++) {
if ((!(items[i]->iconName.empty())) || CRCInput::isNumeric(items[i]->directKey))
{
const char *tmp;
if (items[i]->iconName.empty())
tmp = CRCInput::getKeyName(items[i]->directKey).c_str();
else
tmp = items[i]->iconName.c_str();
int w, h;
frameBuffer->getIconSize(items[i]->iconName.c_str(), &w, &h);
frameBuffer->getIconSize(tmp, &w, &h);
if (w > iconOffset)
iconOffset = w;
break;
}
}
iconOffset += 10;
@@ -865,16 +869,12 @@ int CMenuOptionChooser::paint( bool selected , bool last)
}
else if (CRCInput::isNumeric(directKey))
{
#if 0
std::string newicon = CRCInput::getKeyName(directKey) + ".raw";
//printf("MENU: newicon %s\n", newicon);
if(!frameBuffer->paintIcon(newicon, x + 10, y + ((height - 20) >> 1)))
#endif
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->RenderString(x + 15, y+ height, height, CRCInput::getKeyName(directKey), color, height);
std::string number = CRCInput::getKeyName(directKey);
if (! frameBuffer->paintIcon(number, x + 10, y, height))
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]
->RenderString(x + 15, y + height, height, number, color, height);
}
int stringwidth = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(l_option, true); // UTF-8
int stringstartposName = x + offx + 10;
int stringstartposOption = x + dx - stringwidth - 10; //+ offx
@@ -1001,6 +1001,7 @@ int CMenuOptionStringChooser::exec(CMenuTarget* parent)
int CMenuOptionStringChooser::paint( bool selected, bool last )
{
CFrameBuffer *fb = CFrameBuffer::getInstance();
unsigned char color = COL_MENUCONTENT;
fb_pixel_t bgcolor = COL_MENUCONTENT_PLUS_0;
if (selected) {
@@ -1013,11 +1014,11 @@ int CMenuOptionStringChooser::paint( bool selected, bool last )
}
if(selected)
CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS); //FIXME
fb->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS); //FIXME
else if(last)
CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, CORNER_BOTTOM); //FIXME
fb->paintBoxRel(x, y, dx, height, bgcolor, ROUND_RADIUS, CORNER_BOTTOM); //FIXME
else
CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, height, bgcolor);
fb->paintBoxRel(x, y, dx, height, bgcolor);
const char * l_optionName = g_Locale->getText(optionName);
@@ -1029,11 +1030,14 @@ int CMenuOptionStringChooser::paint( bool selected, bool last )
if (!(iconName.empty()))
{
CFrameBuffer::getInstance()->paintIcon(iconName, x + 10, y, height);
fb->paintIcon(iconName, x + 10, y, height);
}
else if (CRCInput::isNumeric(directKey))
{
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->RenderString(x + 15, y+ height, height, CRCInput::getKeyName(directKey), color, height);
std::string number = CRCInput::getKeyName(directKey);
if (! fb->paintIcon(number, x + 10, y, height))
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]
->RenderString(x + 15, y + height, height, number, color, height);
}
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(stringstartposName, y+height, dx- (stringstartposName - x), l_optionName, color, 0, true); // UTF-8
@@ -1258,13 +1262,10 @@ int CMenuForwarder::paint(bool selected, bool last)
}
else if (CRCInput::isNumeric(directKey))
{
#if 0
printf("MENU: key %s\n", CRCInput::getKeyName(directKey).c_str()); fflush(stdout);
std::string newicon = CRCInput::getKeyName(directKey) + ".raw";
printf("MENU: newicon %s\n", newicon.c_str()); fflush(stdout);
if(!frameBuffer->paintIcon(newicon, x + 10, y + ((height - 20) >> 1)))
#endif
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->RenderString(x + 15, y+ height, height, CRCInput::getKeyName(directKey), color, height);
std::string number = CRCInput::getKeyName(directKey);
if (! frameBuffer->paintIcon(number, x + 10, y, height))
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]
->RenderString(x + 15, y + height, height, number, color, height);
}
if (option_text != NULL)

View File

@@ -4341,7 +4341,7 @@ printf("New timeshift dir: %s\n", timeshiftDir);
// zB vtxt-plugins
sprintf(id, "%d", count);
enabled_count++;
MoviePluginSelector.addItem(new CMenuForwarderNonLocalized(g_PluginList->getName(count), true, NULL, MoviePluginChanger, id, CRCInput::convertDigitToKey(count), digiIcon(count)), (cnt == 0));
MoviePluginSelector.addItem(new CMenuForwarderNonLocalized(g_PluginList->getName(count), true, NULL, MoviePluginChanger, id, CRCInput::convertDigitToKey(count)), (cnt == 0));
cnt++;
}
}
@@ -4362,7 +4362,7 @@ printf("New timeshift dir: %s\n", timeshiftDir);
// zB vtxt-plugins
sprintf(id, "%d", count);
enabled_count++;
MoviePluginSelector.addItem(new CMenuForwarderNonLocalized(g_PluginList->getName(count), true, NULL, OnekeyPluginChanger, id, CRCInput::convertDigitToKey(count), digiIcon(count)), (cnt == 0));
MoviePluginSelector.addItem(new CMenuForwarderNonLocalized(g_PluginList->getName(count), true, NULL, OnekeyPluginChanger, id, CRCInput::convertDigitToKey(count)), (cnt == 0));
cnt++;
}
}

View File

@@ -220,7 +220,6 @@ public:
void loadColors(const char * fname);
void SetupTiming();
void SetupFonts();
const char *digiIcon(int digi);
void setVolume(const neutrino_msg_t key, const bool bDoPaint = true, bool nowait = false);
~CNeutrinoApp();

View File

@@ -647,19 +647,19 @@ void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings
mainMenu.addItem(new CMenuForwarder(LOCALE_UPNPBROWSER_HEAD, true, NULL, new CUpnpBrowserGui(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
audioPlayer = new CAudioPlayerGui();
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_AUDIOPLAYER, true, NULL, audioPlayer, NULL, CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++)));
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_AUDIOPLAYER, true, NULL, audioPlayer, NULL, CRCInput::convertDigitToKey(shortcut++)));
moviePlayerGui = new CMoviePlayerGui();
//mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, &moviePlayer, NULL, CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++)));
//mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, &moviePlayer, NULL, CRCInput::convertDigitToKey(shortcut++)));
#if 0
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, moviePlayerGui, "tsmoviebrowser", CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++)));
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, moviePlayerGui, "tsmoviebrowser", CRCInput::convertDigitToKey(shortcut++)));
#else
addMenueIntroItems(moviePlayer);
moviePlayer.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, true, NULL, moviePlayerGui, "tsmoviebrowser", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
moviePlayer.addItem(new CMenuForwarder(LOCALE_MOVIEPLAYER_FILEPLAYBACK, true, NULL, moviePlayerGui, "fileplayback", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, &moviePlayer, NULL, CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++)));
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, &moviePlayer, NULL, CRCInput::convertDigitToKey(shortcut++)));
#endif
#if 0
moviePlayer.addItem(GenericMenuSeparator);
@@ -682,27 +682,27 @@ void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings
moviePlayer.addItem(new CMenuForwarder(LOCALE_NFSMENU_HEAD, true, NULL, new CNFSSmallMenu(), NULL, CRCInput::RC_setup, NEUTRINO_ICON_BUTTON_DBOX_SMALL));
#endif
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, true, NULL, new CPictureViewerGui(), NULL, CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++)));
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, true, NULL, new CPictureViewerGui(), NULL, CRCInput::convertDigitToKey(shortcut++)));
if (g_PluginList->hasPlugin(CPlugins::P_TYPE_SCRIPT))
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SCRIPTS, true, NULL, new CPluginList(LOCALE_MAINMENU_SCRIPTS,CPlugins::P_TYPE_SCRIPT), "",
CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++)));
CRCInput::convertDigitToKey(shortcut++)));
mainMenu.addItem(GenericMenuSeparatorLine);
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, &mainSettings, NULL,
CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++)));
CRCInput::convertDigitToKey(shortcut++)));
mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_SERVICE, g_settings.parentallock_pincode, false, true, NULL, &service, NULL,
CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++)));
CRCInput::convertDigitToKey(shortcut++)));
mainMenu.addItem(GenericMenuSeparatorLine);
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SLEEPTIMER, true, NULL, new CSleepTimerWidget, NULL,
CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++)));
CRCInput::convertDigitToKey(shortcut++)));
mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_REBOOT, true, NULL, this, "reboot",
CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++)));
CRCInput::convertDigitToKey(shortcut++)));
//mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SHUTDOWN, true, NULL, this, "shutdown", CRCInput::RC_standby, NEUTRINO_ICON_BUTTON_POWER));//FIXME
mainMenu.addItem( new CMenuSeparator(CMenuSeparator::LINE) );
mainMenu.addItem( new CMenuForwarder(LOCALE_DBOXINFO, true, NULL, new CDBoxInfoWidget, NULL, CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++)));
mainMenu.addItem( new CMenuForwarder(LOCALE_DBOXINFO, true, NULL, new CDBoxInfoWidget, NULL, CRCInput::convertDigitToKey(shortcut++)));
//settings menu
int sett_count =1;
addMenueIntroItems(mainSettings);
@@ -715,25 +715,25 @@ void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings
mainSettings.addItem(new CMenuForwarder(LOCALE_RESET_SETTINGS , true, NULL, resetNotifier, "settings"));
mainSettings.addItem(GenericMenuSeparatorLine);
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_VIDEO , true, NULL, videoSettings , NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++)));
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_AUDIO , true, NULL, &audioSettings , NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++)));
mainSettings.addItem(new CLockedMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, g_settings.parentallock_pincode, true, true, NULL, &parentallockSettings, NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++)));
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_VIDEO , true, NULL, videoSettings , NULL, CRCInput::convertDigitToKey(sett_count++)));
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_AUDIO , true, NULL, &audioSettings , NULL, CRCInput::convertDigitToKey(sett_count++)));
mainSettings.addItem(new CLockedMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, g_settings.parentallock_pincode, true, true, NULL, &parentallockSettings, NULL, CRCInput::convertDigitToKey(sett_count++)));
#if 0
if (g_settings.parentallock_prompt)
mainSettings.addItem(new CLockedMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, g_settings.parentallock_pincode, true, true, NULL, &parentallockSettings, NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++)));
mainSettings.addItem(new CLockedMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, g_settings.parentallock_pincode, true, true, NULL, &parentallockSettings, NULL, CRCInput::convertDigitToKey(sett_count++)));
else
mainSettings.addItem(new CMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, true, NULL, &parentallockSettings, NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++)));
mainSettings.addItem(new CMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, true, NULL, &parentallockSettings, NULL, CRCInput::convertDigitToKey(sett_count++)));
#endif
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_NETWORK , true, NULL, &networkSettings , NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++)));
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_RECORDING , true, NULL, &recordingSettings, NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++)));
//mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_STREAMING , true, NULL, &streamingSettings, NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++)));
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_LANGUAGE , true, NULL, &languageSettings , NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++)));
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_NETWORK , true, NULL, &networkSettings , NULL, CRCInput::convertDigitToKey(sett_count++)));
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_RECORDING , true, NULL, &recordingSettings, NULL, CRCInput::convertDigitToKey(sett_count++)));
//mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_STREAMING , true, NULL, &streamingSettings, NULL, CRCInput::convertDigitToKey(sett_count++)));
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_LANGUAGE , true, NULL, &languageSettings , NULL, CRCInput::convertDigitToKey(sett_count++)));
xmlDocPtr parser;
parser = parseXmlFile("/etc/timezone.xml");
if (parser != NULL) {
tzSelect = new CMenuOptionStringChooser(LOCALE_MAINSETTINGS_TIMEZONE, g_settings.timezone, true, new CTZChangeNotifier(), CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++), true);
tzSelect = new CMenuOptionStringChooser(LOCALE_MAINSETTINGS_TIMEZONE, g_settings.timezone, true, new CTZChangeNotifier(), CRCInput::convertDigitToKey(sett_count++), "", true);
xmlNodePtr search = xmlDocGetRootElement(parser)->xmlChildrenNode;
bool found = false;
while (search) {
@@ -754,10 +754,10 @@ void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings
}
xmlFreeDoc(parser);
}
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_OSD , true, NULL, &colorSettings , NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++)));
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_OSD , true, NULL, &colorSettings , NULL, CRCInput::convertDigitToKey(sett_count++)));
if (CVFD::getInstance()->has_lcd)
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_LCD , true, NULL, &lcdSettings , NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++)));
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_LCD , true, NULL, &lcdSettings , NULL, CRCInput::convertDigitToKey(sett_count++)));
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_KEYBINDING, true, NULL, &keySettings , NULL, CRCInput::RC_blue , NEUTRINO_ICON_BUTTON_BLUE ));
mainSettings.addItem(new CMenuForwarder(LOCALE_AUDIOPLAYERPICSETTINGS_GENERAL , true, NULL, &audiopl_picSettings , NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
@@ -1013,8 +1013,8 @@ void CNeutrinoApp::InitScanSettings(CMenuWidget &settings)
CSatelliteSetupNotifier * satNotify = new CSatelliteSetupNotifier();
CMenuOptionChooser* ojScantype = new CMenuOptionChooser(LOCALE_ZAPIT_SCANTYPE, (int *)&scanSettings.scanType, SCANTS_ZAPIT_SCANTYPE, SCANTS_ZAPIT_SCANTYPE_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++), true);
CMenuOptionChooser* ojBouquets = new CMenuOptionChooser(LOCALE_SCANTS_BOUQUET, (int *)&scanSettings.bouquetMode, SCANTS_BOUQUET_OPTIONS, SCANTS_BOUQUET_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++), true);
CMenuOptionChooser* ojScantype = new CMenuOptionChooser(LOCALE_ZAPIT_SCANTYPE, (int *)&scanSettings.scanType, SCANTS_ZAPIT_SCANTYPE, SCANTS_ZAPIT_SCANTYPE_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true);
CMenuOptionChooser* ojBouquets = new CMenuOptionChooser(LOCALE_SCANTS_BOUQUET, (int *)&scanSettings.bouquetMode, SCANTS_BOUQUET_OPTIONS, SCANTS_BOUQUET_OPTION_COUNT, true, NULL, CRCInput::convertDigitToKey(shortcut++), "", true);
CMenuOptionChooser* useNit = new CMenuOptionChooser(LOCALE_SATSETUP_USE_NIT, (int *)&scanSettings.scan_mode, OPTIONS_OFF1_ON0_OPTIONS, OPTIONS_OFF1_ON0_OPTION_COUNT, true, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN);
CMenuOptionChooser* scanPids = new CMenuOptionChooser(LOCALE_EXTRA_ZAPIT_SCANPIDS, &scan_pids, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW);
@@ -1101,18 +1101,18 @@ void CNeutrinoApp::InitScanSettings(CMenuWidget &settings)
CStringInput* freq = new CStringInput(LOCALE_EXTRA_FREQ, (char *) scanSettings.TP_freq, freq_length, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
CStringInput* rate = new CStringInput(LOCALE_EXTRA_RATE, (char *) scanSettings.TP_rate, 8, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789");
CMenuForwarder * Freq = new CMenuForwarder(LOCALE_EXTRA_FREQ, true, scanSettings.TP_freq, freq, "", CRCInput::convertDigitToKey(1), digiIcon(1));
CMenuForwarder * Rate = new CMenuForwarder(LOCALE_EXTRA_RATE, true, scanSettings.TP_rate, rate, "", CRCInput::convertDigitToKey(2), digiIcon(2));
CMenuForwarder * Freq = new CMenuForwarder(LOCALE_EXTRA_FREQ, true, scanSettings.TP_freq, freq, "", CRCInput::convertDigitToKey(1));
CMenuForwarder * Rate = new CMenuForwarder(LOCALE_EXTRA_RATE, true, scanSettings.TP_rate, rate, "", CRCInput::convertDigitToKey(2));
int fec_count = (g_info.delivery_system == DVB_S) ? SATSETUP_SCANTP_FEC_COUNT : CABLESETUP_SCANTP_FEC_COUNT;
CMenuOptionChooser* fec = new CMenuOptionChooser(LOCALE_EXTRA_FEC, (int *)&scanSettings.TP_fec, SATSETUP_SCANTP_FEC, fec_count, true, NULL, CRCInput::convertDigitToKey(3), digiIcon(3), true);
CMenuOptionChooser* fec = new CMenuOptionChooser(LOCALE_EXTRA_FEC, (int *)&scanSettings.TP_fec, SATSETUP_SCANTP_FEC, fec_count, true, NULL, CRCInput::convertDigitToKey(3), "", true);
CMenuOptionChooser* mod_pol = NULL;
if (g_info.delivery_system == DVB_S)
mod_pol = new CMenuOptionChooser(LOCALE_EXTRA_POL, (int *)&scanSettings.TP_pol, SATSETUP_SCANTP_POL, SATSETUP_SCANTP_POL_COUNT, true, NULL, CRCInput::convertDigitToKey(4), digiIcon(4));
mod_pol = new CMenuOptionChooser(LOCALE_EXTRA_POL, (int *)&scanSettings.TP_pol, SATSETUP_SCANTP_POL, SATSETUP_SCANTP_POL_COUNT, true, NULL, CRCInput::convertDigitToKey(4));
else if (g_info.delivery_system == DVB_C)
mod_pol = new CMenuOptionChooser(LOCALE_EXTRA_MOD, (int *)&scanSettings.TP_mod, SATSETUP_SCANTP_MOD, SATSETUP_SCANTP_MOD_COUNT, true, NULL, CRCInput::convertDigitToKey(4), digiIcon(4));
mod_pol = new CMenuOptionChooser(LOCALE_EXTRA_MOD, (int *)&scanSettings.TP_mod, SATSETUP_SCANTP_MOD, SATSETUP_SCANTP_MOD_COUNT, true, NULL, CRCInput::convertDigitToKey(4));
satfindMenu->addItem(Freq);
satfindMenu->addItem(Rate);
@@ -1169,7 +1169,7 @@ void CNeutrinoApp::InitScanSettings(CMenuWidget &settings)
manualScan->addItem(ftaFlag);
manualScan->addItem(GenericMenuSeparatorLine);
manualScan->addItem(new CMenuForwarder(LOCALE_SCANTS_TEST, true, NULL, scanTs, "test", CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
manualScan->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, scanTs, "manual", CRCInput::convertDigitToKey(0), digiIcon(0)));
manualScan->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, scanTs, "manual", CRCInput::convertDigitToKey(0)));
CMenuWidget* autoScan = new CMenuWidget(LOCALE_SATSETUP_AUTO_SCAN, NEUTRINO_ICON_SETTINGS);
addMenueIntroItems(*autoScan);
@@ -1177,7 +1177,7 @@ void CNeutrinoApp::InitScanSettings(CMenuWidget &settings)
autoScan->addItem(useNit);
autoScan->addItem(scanPids);
autoScan->addItem(ftaFlag);
autoScan->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, scanTs, "auto", CRCInput::convertDigitToKey(0), digiIcon(0)));
autoScan->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, scanTs, "auto", CRCInput::convertDigitToKey(0)));
CMenuOptionChooser* ojDiseqc = NULL;
CMenuOptionNumberChooser * ojDiseqcRepeats = NULL;
@@ -1186,15 +1186,15 @@ void CNeutrinoApp::InitScanSettings(CMenuWidget &settings)
CMenuForwarder *fautoScanAll = NULL;
if (g_info.delivery_system == DVB_S) {
ojDiseqc = new CMenuOptionChooser(LOCALE_SATSETUP_DISEQC, (int *)&scanSettings.diseqcMode, SATSETUP_DISEQC_OPTIONS, SATSETUP_DISEQC_OPTION_COUNT, true, satNotify, CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++), true);
ojDiseqc = new CMenuOptionChooser(LOCALE_SATSETUP_DISEQC, (int *)&scanSettings.diseqcMode, SATSETUP_DISEQC_OPTIONS, SATSETUP_DISEQC_OPTION_COUNT, true, satNotify, CRCInput::convertDigitToKey(shortcut++), "", true);
ojDiseqcRepeats = new CMenuOptionNumberChooser(LOCALE_SATSETUP_DISEQCREPEAT, (int *)&scanSettings.diseqcRepeat, (dmode != NO_DISEQC) && (dmode != DISEQC_ADVANCED), 0, 2, NULL);
satNotify->addItem(1, ojDiseqcRepeats);
fsatSetup = new CMenuForwarder(LOCALE_SATSETUP_SAT_SETUP, true, NULL, satSetup, "", CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++));
fsatSetup = new CMenuForwarder(LOCALE_SATSETUP_SAT_SETUP, true, NULL, satSetup, "", CRCInput::convertDigitToKey(shortcut++));
//fmotorMenu = new CMenuForwarder(LOCALE_SATSETUP_EXTENDED_MOTOR, (dmode == DISEQC_ADVANCED), NULL, motorMenu, "", CRCInput::convertDigitToKey(shortcut++));
//satNotify->addItem(0, fmotorMenu); //FIXME testing motor with not DISEQC_ADVANCED
fmotorMenu = new CMenuForwarder(LOCALE_SATSETUP_EXTENDED_MOTOR, true, NULL, motorMenu, "", CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++));
fmotorMenu = new CMenuForwarder(LOCALE_SATSETUP_EXTENDED_MOTOR, true, NULL, motorMenu, "", CRCInput::convertDigitToKey(shortcut++));
CMenuWidget* autoScanAll = new CMenuWidget(LOCALE_SATSETUP_AUTO_SCAN_ALL, NEUTRINO_ICON_SETTINGS);
fautoScanAll = new CMenuForwarder(LOCALE_SATSETUP_AUTO_SCAN_ALL, (dmode != NO_DISEQC), NULL, autoScanAll, "", CRCInput::RC_blue, NEUTRINO_ICON_BUTTON_BLUE);
@@ -1206,7 +1206,7 @@ void CNeutrinoApp::InitScanSettings(CMenuWidget &settings)
autoScanAll->addItem(useNit);
autoScanAll->addItem(scanPids);
autoScanAll->addItem(ftaFlag);
autoScanAll->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, scanTs, "all", CRCInput::convertDigitToKey(0), digiIcon(0)));
autoScanAll->addItem(new CMenuForwarder(LOCALE_SCANTS_STARTNOW, true, NULL, scanTs, "all", CRCInput::convertDigitToKey(0)));
}
settings.addItem(GenericMenuSeparator);
@@ -1555,7 +1555,7 @@ void CNeutrinoApp::InitMiscSettings(CMenuWidget &miscSettings)
miscSettingsInfobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_CASYSTEM_DISPLAY, &g_settings.casystem_display, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
miscSettingsInfobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_INFOBAR_DISP_LOG, &g_settings.infobar_show_channellogo, LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS, LOCALE_MISCSETTINGS_INFOBAR_DISP_OPTIONS_COUNT, true));
miscSettingsInfobar->addItem(new CMenuOptionChooser(LOCALE_MISCSETTINGS_VIRTUAL_ZAP_MODE, &g_settings.virtual_zap_mode, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true));
miscSettings.addItem( new CMenuForwarder(LOCALE_MISCSETTINGS_INFOBAR, true, NULL, miscSettingsInfobar, NULL, CRCInput::RC_1, digiIcon(1)) );
miscSettings.addItem(new CMenuForwarder(LOCALE_MISCSETTINGS_INFOBAR, true, NULL, miscSettingsInfobar, NULL, CRCInput::RC_1));
@@ -2602,7 +2602,7 @@ bool CNeutrinoApp::getNVODMenu(CMenuWidget* menu)
sprintf(nvod_s, "%s - %s %s", nvod_time_a, nvod_time_e, nvod_time_x);
menu->addItem(new CMenuForwarderNonLocalized(nvod_s, true, NULL, NVODChanger, nvod_id), (count == g_RemoteControl->selected_subchannel));
} else {
menu->addItem(new CMenuForwarderNonLocalized(e->subservice_name.c_str(), true, NULL, NVODChanger, nvod_id, CRCInput::convertDigitToKey(count), digiIcon(count)), (count == g_RemoteControl->selected_subchannel));
menu->addItem(new CMenuForwarderNonLocalized(e->subservice_name.c_str(), true, NULL, NVODChanger, nvod_id, CRCInput::convertDigitToKey(count)), (count == g_RemoteControl->selected_subchannel));
}
count++;
@@ -2700,7 +2700,7 @@ public:
{
// there is still a available number_key
*msg = CRCInput::convertDigitToKey(number_key);
*icon = CNeutrinoApp::getInstance()->digiIcon(number_key);
*icon = "";
if (number_key == 9)
number_key = 0;
else if (number_key == 0)
@@ -2979,7 +2979,7 @@ bool CNeutrinoApp::showUserMenu(int button)
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), digiIcon(menu_key));
menu_item = new CMenuForwarder(LOCALE_EXPERIMENTALSETTINGS, true, NULL, new CExperimentalSettingsMenuHandler(), "-1", CRCInput::convertDigitToKey(menu_key));
menu->addItem(menu_item, false);
#endif
}
@@ -3021,31 +3021,4 @@ void CNeutrinoApp::addMenueIntroItems(CMenuWidget &item)
item.addItem(GenericMenuBack);
item.addItem(GenericMenuSeparatorLine);
}
const char * CNeutrinoApp::digiIcon(int digi)
{
switch(digi){
case 1:
return NEUTRINO_ICON_BUTTON_1;
case 2:
return NEUTRINO_ICON_BUTTON_2;
case 3:
return NEUTRINO_ICON_BUTTON_3;
case 4:
return NEUTRINO_ICON_BUTTON_4;
case 5:
return NEUTRINO_ICON_BUTTON_5;
case 6:
return NEUTRINO_ICON_BUTTON_6;
case 7:
return NEUTRINO_ICON_BUTTON_7;
case 8:
return NEUTRINO_ICON_BUTTON_8;
case 9:
return NEUTRINO_ICON_BUTTON_9;
case 0:
return NEUTRINO_ICON_BUTTON_0;
default:
return NULL;
break;
}
}