diff --git a/src/gui/audio_select.cpp b/src/gui/audio_select.cpp index df0d7485f..1e00c19e0 100644 --- a/src/gui/audio_select.cpp +++ b/src/gui/audio_select.cpp @@ -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)), + APIDChanger, apid, CRCInput::convertDigitToKey(count + 1), CNeutrinoApp::getInstance()->digiIcon(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))); + sd->pId != dvbsub_getpid(), NULL, &SubtitleChanger, spid, CRCInput::convertDigitToKey(++count), CNeutrinoApp::getInstance()->digiIcon(count))); } if (s->thisSubType == CZapitAbsSub::TTX) { CZapitTTXSub* sd = reinterpret_cast(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))); + !tuxtx_subtitle_running(sd->pId, page, NULL), NULL, &SubtitleChanger, spid, CRCInput::convertDigitToKey(++count), CNeutrinoApp::getInstance()->digiIcon(count))); } } if(sep_added) { diff --git a/src/neutrino.h b/src/neutrino.h index 694ddf501..16c9fc89c 100644 --- a/src/neutrino.h +++ b/src/neutrino.h @@ -220,6 +220,7 @@ 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(); diff --git a/src/neutrino_menue.cpp b/src/neutrino_menue.cpp index 10bacc4f9..fe996c97d 100644 --- a/src/neutrino_menue.cpp +++ b/src/neutrino_menue.cpp @@ -610,7 +610,7 @@ int CTestMenu::exec(CMenuTarget* parent, const std::string &actionKey) CMenuWidget * TestMenu; #endif - + CVideoSettings * videoSettings; CMenuOptionStringChooser* tzSelect; /************************************************************************************** @@ -635,7 +635,7 @@ void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings //TestMenu->addItem(new CMenuForwarderNonLocalized("22 Khz OFF", true, NULL, testHandler, "22koff")); #endif videoSettings = new CVideoSettings(); - + int shortcut = 1; dprintf(DEBUG_DEBUG, "init mainmenue\n"); mainMenu.addItem(GenericMenuSeparator); @@ -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::RC_1)); + mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_AUDIOPLAYER, true, NULL, audioPlayer, NULL, CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++))); moviePlayerGui = new CMoviePlayerGui(); - //mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, &moviePlayer, NULL, CRCInput::RC_2)); + //mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, &moviePlayer, NULL, CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++))); #if 0 - mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, moviePlayerGui, "tsmoviebrowser", CRCInput::RC_2)); + mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, moviePlayerGui, "tsmoviebrowser", CRCInput::convertDigitToKey(shortcut), digiIcon(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::RC_2)); + mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_MOVIEPLAYER, true, NULL, &moviePlayer, NULL, CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++))); #endif #if 0 moviePlayer.addItem(GenericMenuSeparator); @@ -682,29 +682,29 @@ 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::RC_3)); - int shortcut = 4; + mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_PICTUREVIEWER, true, NULL, new CPictureViewerGui(), NULL, CRCInput::convertDigitToKey(shortcut), digiIcon(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++))); + CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++))); mainMenu.addItem(GenericMenuSeparatorLine); mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, &mainSettings, NULL, - CRCInput::convertDigitToKey(shortcut++))); + CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++))); mainMenu.addItem(new CLockedMenuForwarder(LOCALE_MAINMENU_SERVICE, g_settings.parentallock_pincode, false, true, NULL, &service, NULL, - CRCInput::convertDigitToKey(shortcut++))); + CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++))); mainMenu.addItem(GenericMenuSeparatorLine); mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_SLEEPTIMER, true, NULL, new CSleepTimerWidget, NULL, - CRCInput::convertDigitToKey(shortcut++))); + CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++))); mainMenu.addItem(new CMenuForwarder(LOCALE_MAINMENU_REBOOT, true, NULL, this, "reboot", - CRCInput::convertDigitToKey(shortcut++))); + CRCInput::convertDigitToKey(shortcut), digiIcon(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++))); - + mainMenu.addItem( new CMenuForwarder(LOCALE_DBOXINFO, true, NULL, new CDBoxInfoWidget, NULL, CRCInput::convertDigitToKey(shortcut), digiIcon(shortcut++))); + //settings menu + int sett_count =1; addMenueIntroItems(mainSettings); mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_SAVESETTINGSNOW, true, NULL, this, "savesettings", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED)); @@ -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::RC_1)); - mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_AUDIO , true, NULL, &audioSettings , NULL, CRCInput::RC_2)); - mainSettings.addItem(new CLockedMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, g_settings.parentallock_pincode, true, true, NULL, &parentallockSettings, NULL, CRCInput::RC_3)); + 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++))); #if 0 if (g_settings.parentallock_prompt) - mainSettings.addItem(new CLockedMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, g_settings.parentallock_pincode, true, true, NULL, &parentallockSettings, NULL, CRCInput::RC_3)); + mainSettings.addItem(new CLockedMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, g_settings.parentallock_pincode, true, true, NULL, &parentallockSettings, NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++))); else - mainSettings.addItem(new CMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, true, NULL, &parentallockSettings, NULL, CRCInput::RC_3)); + mainSettings.addItem(new CMenuForwarder(LOCALE_PARENTALLOCK_PARENTALLOCK, true, NULL, &parentallockSettings, NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++))); #endif - mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_NETWORK , true, NULL, &networkSettings , NULL, CRCInput::RC_4)); - mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_RECORDING , true, NULL, &recordingSettings, NULL, CRCInput::RC_5)); - //mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_STREAMING , true, NULL, &streamingSettings, NULL, CRCInput::RC_6)); - mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_LANGUAGE , true, NULL, &languageSettings , NULL, CRCInput::RC_6)); + 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++))); xmlDocPtr parser; parser = parseXmlFile("/etc/timezone.xml"); if (parser != NULL) { - tzSelect = new CMenuOptionStringChooser(LOCALE_MAINSETTINGS_TIMEZONE, g_settings.timezone, true, new CTZChangeNotifier(), CRCInput::RC_7, "", true); + tzSelect = new CMenuOptionStringChooser(LOCALE_MAINSETTINGS_TIMEZONE, g_settings.timezone, true, new CTZChangeNotifier(), CRCInput::convertDigitToKey(sett_count), digiIcon(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::RC_8)); + mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_OSD , true, NULL, &colorSettings , NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(sett_count++))); if (CVFD::getInstance()->has_lcd) - mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_LCD , true, NULL, &lcdSettings , NULL, CRCInput::RC_9)); + mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_LCD , true, NULL, &lcdSettings , NULL, CRCInput::convertDigitToKey(sett_count), digiIcon(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++), "", 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* 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* 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); @@ -1099,18 +1099,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)); - CMenuForwarder * Rate = new CMenuForwarder(LOCALE_EXTRA_RATE, true, scanSettings.TP_rate, rate, "", CRCInput::convertDigitToKey(2)); + 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)); 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), "", true); + 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* 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)); + 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)); 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)); + 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)); satfindMenu->addItem(Freq); satfindMenu->addItem(Rate); @@ -1182,15 +1182,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++), "", true); + ojDiseqc = new CMenuOptionChooser(LOCALE_SATSETUP_DISEQC, (int *)&scanSettings.diseqcMode, SATSETUP_DISEQC_OPTIONS, SATSETUP_DISEQC_OPTION_COUNT, true, satNotify, CRCInput::convertDigitToKey(shortcut), digiIcon(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++)); + fsatSetup = new CMenuForwarder(LOCALE_SATSETUP_SAT_SETUP, true, NULL, satSetup, "", CRCInput::convertDigitToKey(shortcut), digiIcon(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++)); + fmotorMenu = new CMenuForwarder(LOCALE_SATSETUP_EXTENDED_MOTOR, true, NULL, motorMenu, "", CRCInput::convertDigitToKey(shortcut), digiIcon(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); @@ -1550,7 +1550,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) ); + miscSettings.addItem( new CMenuForwarder(LOCALE_MISCSETTINGS_INFOBAR, true, NULL, miscSettingsInfobar, NULL, CRCInput::RC_1, digiIcon(1)) ); @@ -2562,7 +2562,7 @@ bool CNeutrinoApp::getNVODMenu(CMenuWidget* menu) return false; menu->addItem(GenericMenuSeparator); - + int count = 0; char nvod_id[5]; @@ -2597,7 +2597,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)), (count == g_RemoteControl->selected_subchannel)); + menu->addItem(new CMenuForwarderNonLocalized(e->subservice_name.c_str(), true, NULL, NVODChanger, nvod_id, CRCInput::convertDigitToKey(count), digiIcon(count)), (count == g_RemoteControl->selected_subchannel)); } count++; @@ -2974,7 +2974,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), ""); + menu_item = new CMenuForwarder(LOCALE_EXPERIMENTALSETTINGS, true, NULL, new CExperimentalSettingsMenuHandler(), "-1", CRCInput::convertDigitToKey(menu_key), digiIcon(menu_key)); menu->addItem(menu_item, false); #endif } @@ -3016,3 +3016,30 @@ 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: + break; + } +} diff --git a/src/sectionsd/SIevents.cpp b/src/sectionsd/SIevents.cpp index 807e22154..70ef73769 100644 --- a/src/sectionsd/SIevents.cpp +++ b/src/sectionsd/SIevents.cpp @@ -133,7 +133,7 @@ char SIevent::getFSK() const return (it->rating == 0 ? 0 : 18); // return FSK 18 for : 0x10 to 0xFF defined by the broadcaster } } - if (ratings.size() != 0) + if (!ratings.empty()) { if ((ratings.begin()->rating >= 0x01) && (ratings.begin()->rating <= 0x0F)) return (ratings.begin()->rating + 3);