From 5860045999c0a9d7c156ab56fc30a55e8e7e68d7 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Sat, 2 Jan 2016 12:18:06 +0100 Subject: [PATCH] - locale: add usermenu title locales ... some small reworks; cleanup from #if 0'ed code --- data/locale/deutsch.locale | 11 ++++++----- data/locale/english.locale | 17 +++++++++-------- src/gui/channellist.cpp | 2 +- src/gui/user_menue.cpp | 7 ++++--- src/gui/user_menue.h | 6 +++--- src/gui/user_menue_setup.cpp | 2 +- src/gui/user_menue_setup.h | 8 ++++---- src/neutrino.cpp | 22 +++++----------------- src/system/locals.h | 9 +++++---- src/system/locals_intern.h | 9 +++++---- 10 files changed, 43 insertions(+), 50 deletions(-) diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 4eb12d295..ca2b70c07 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -779,8 +779,6 @@ imageinfo.version Version: inetradio.name Internetradio infoviewer.epgnotload Informationen noch nicht geladen... infoviewer.epgwait Warte auf EPG-Informationen... -infoviewer.eventlist EPG/Vorschau -infoviewer.languages Tonwahl infoviewer.motor_moving Antennenpositionierung infoviewer.next Später infoviewer.nocurrent Keine Info zu laufendem Programm @@ -788,10 +786,8 @@ infoviewer.noepg Keine EPG-Information verfügbar infoviewer.notavailable Kanal (zur Zeit) nicht verfügbar infoviewer.now Jetzt infoviewer.selecttime Startzeiten -infoviewer.streaminfo Erweiterungen infoviewer.subchan_disp_pos Unterkanalanzeige infoviewer.subchan_infobar Infobar -infoviewer.subservice Bildregie infoviewer.waittime Warte auf Uhrzeit... ipsetup.hint_1 Benutzen Sie 0..9 oder hoch/runter ipsetup.hint_2 OK speichert, EXIT bricht ab @@ -1858,7 +1854,8 @@ nfsmenu.head NFS/CIFS/FTPFS Einstellungen nvod.percentage (%d%% vorbei) nvod.starting (Beginn in %d min) nvodselector.directormode Bildregie-Modus -nvodselector.head Anfangszeit auswählen +nvodselector.head Bildregie +nvodselector.starttime Anfangszeit auswählen nvodselector.subservice Perspektiven opkg.button.expert_off Standard-Modus opkg.button.expert_on Experten-Modus @@ -2355,6 +2352,10 @@ usermenu.msg_info_is_empty Es wurde kein Name für dieses Menü vergeben.\nVerwe usermenu.msg_warning_name Sie haben mehrere Menüpunkte für dieses Menü angelegt,\naber keinen neuen Namen festgelegt.\nEs ist daher empfohlen, einen neuen Namen zu vergeben! usermenu.msg_warning_no_items Sie haben keine Menüpunkte für dieses Menü angelegt!\nDer Menüname wird daher zurückgesetzt! usermenu.name Name +usermenu.title_blue Erweiterungen +usermenu.title_green Tonwahl +usermenu.title_red EPG +usermenu.title_yellow Bildregie video_mode_ok Video-Einstellungen OK? videomenu.43mode 4:3 Anzeigeverhalten videomenu.analog_auto AUTO diff --git a/data/locale/english.locale b/data/locale/english.locale index 2debf79f3..6454f6a6c 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -779,8 +779,6 @@ imageinfo.version Version: inetradio.name Internetradio infoviewer.epgnotload EPG not loaded.... infoviewer.epgwait waiting for EPG... -infoviewer.eventlist Event-List -infoviewer.languages Audio infoviewer.motor_moving Antenna positioning infoviewer.next next infoviewer.nocurrent No info for current program available @@ -788,10 +786,8 @@ infoviewer.noepg EPG not available infoviewer.notavailable Channel not available infoviewer.now now infoviewer.selecttime Timeselection -infoviewer.streaminfo Features infoviewer.subchan_disp_pos Subchannel display infoviewer.subchan_infobar Full infobar -infoviewer.subservice Subservices infoviewer.waittime Waiting for time... ipsetup.hint_1 Use 0..9, or use Up/Down, ipsetup.hint_2 OK saves, Exit aborts @@ -1455,7 +1451,7 @@ miscsettings.epg_dir EPG save path miscsettings.epg_extendedcache EPG Long Description (hours) miscsettings.epg_extendedcache_hint1 How long into the future will EPG extended descriptions miscsettings.epg_extendedcache_hint2 be Cached? (Set in hours) -miscsettings.epg_head Epg +miscsettings.epg_head EPG miscsettings.epg_max_events Max. Events miscsettings.epg_max_events_hint1 How many events should be stored? miscsettings.epg_max_events_hint2 normaly 6000, 0 to disable limit @@ -1857,9 +1853,10 @@ nfs.username username nfsmenu.head NFS/CIFS/FTPFS settings nvod.percentage (%d%% over) nvod.starting (starting in %d min) -nvodselector.directormode Direct-Mode -nvodselector.head Select starting-time -nvodselector.subservice Select Subservice +nvodselector.directormode Director mode +nvodselector.head Subservices +nvodselector.starttime Select starting time +nvodselector.subservice Select subservice opkg.button.expert_off Standard mode opkg.button.expert_on Expert mode opkg.button.info Package information @@ -2355,6 +2352,10 @@ usermenu.msg_info_is_empty You don't have definied a name for this menu!\nUsing usermenu.msg_warning_name You have more than one items created for this menu,\nbut none new name for this menue defined.\nIt is recommended to enter a new name! usermenu.msg_warning_no_items No items defined!\nThe menu name is reset! usermenu.name Name +usermenu.title_blue Features +usermenu.title_green Audio +usermenu.title_red Event-List +usermenu.title_yellow Subservices video_mode_ok Is this video mode working ok ? videomenu.43mode 4:3 Content mode videomenu.analog_auto AUTO diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index bd39251b3..bfa476dd6 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1708,7 +1708,7 @@ void CChannelList::showChannelLogo() //TODO: move into an own handler, eg. heade #define NUM_LIST_BUTTONS_SORT 9 struct button_label SChannelListButtons_SMode[NUM_LIST_BUTTONS_SORT] = { - { NEUTRINO_ICON_BUTTON_RED, LOCALE_INFOVIEWER_EVENTLIST}, + { NEUTRINO_ICON_BUTTON_RED, LOCALE_MISCSETTINGS_EPG_HEAD}, { NEUTRINO_ICON_BUTTON_GREEN, LOCALE_CHANNELLIST_FOOT_SORT_ALPHA}, { NEUTRINO_ICON_BUTTON_YELLOW, LOCALE_BOUQUETLIST_HEAD}, { NEUTRINO_ICON_BUTTON_BLUE, LOCALE_INFOVIEWER_NEXT}, diff --git a/src/gui/user_menue.cpp b/src/gui/user_menue.cpp index bb6109591..b5a42917d 100644 --- a/src/gui/user_menue.cpp +++ b/src/gui/user_menue.cpp @@ -265,14 +265,15 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg) if (g_RemoteControl->subChannels.empty()) break; // NVOD/SubService- Kanal! - CMenuWidget *tmpNVODSelector = new CMenuWidget(g_RemoteControl->are_subchannels ? LOCALE_NVODSELECTOR_SUBSERVICE : LOCALE_NVODSELECTOR_HEAD, NEUTRINO_ICON_VIDEO); + CMenuWidget *tmpNVODSelector = new CMenuWidget(g_RemoteControl->are_subchannels ? LOCALE_NVODSELECTOR_SUBSERVICE : LOCALE_NVODSELECTOR_STARTTIME, NEUTRINO_ICON_VIDEO); if (!subchanselect.getNVODMenu(tmpNVODSelector)) { delete tmpNVODSelector; break; } keyhelper.get(&key,&icon); - menu_item = new CMenuDForwarder(g_RemoteControl->are_subchannels ? LOCALE_NVODSELECTOR_SUBSERVICE : LOCALE_NVODSELECTOR_HEAD, true, NULL, tmpNVODSelector, "-1", key,icon); + menu_item = new CMenuDForwarder(g_RemoteControl->are_subchannels ? LOCALE_NVODSELECTOR_SUBSERVICE : LOCALE_NVODSELECTOR_STARTTIME, true, NULL, tmpNVODSelector, "-1", key,icon); // FIXME menu_item->setHint("", NONEXISTANT_LOCALE); + break; } case SNeutrinoSettings::ITEM_TECHINFO: @@ -518,7 +519,7 @@ const char *CUserMenu::getUserMenuButtonName(int button, bool &active, bool retu case SNeutrinoSettings::ITEM_SUBCHANNEL: if (!g_RemoteControl->subChannels.empty()) { if(loc == NONEXISTANT_LOCALE && !text) - loc = g_RemoteControl->are_subchannels ? LOCALE_NVODSELECTOR_SUBSERVICE : LOCALE_NVODSELECTOR_HEAD; + loc = g_RemoteControl->are_subchannels ? LOCALE_NVODSELECTOR_SUBSERVICE : LOCALE_NVODSELECTOR_STARTTIME; else return_title = true; active = true; diff --git a/src/gui/user_menue.h b/src/gui/user_menue.h index 33a90f0c2..c5b801c17 100644 --- a/src/gui/user_menue.h +++ b/src/gui/user_menue.h @@ -57,10 +57,10 @@ typedef struct user_menu_data_t #define COL_BUTTONMAX SNeutrinoSettings::BUTTON_MAX static user_menu_data_t user_menu[COL_BUTTONMAX] = { - {LOCALE_INFOVIEWER_EVENTLIST , CRCInput::RC_red , NEUTRINO_ICON_BUTTON_RED , NEUTRINO_ICON_RED, -1}, - {LOCALE_INFOVIEWER_LANGUAGES , CRCInput::RC_green , NEUTRINO_ICON_BUTTON_GREEN , NEUTRINO_ICON_GREEN, -1}, + {LOCALE_USERMENU_TITLE_RED , CRCInput::RC_red , NEUTRINO_ICON_BUTTON_RED , NEUTRINO_ICON_RED, -1}, + {LOCALE_USERMENU_TITLE_GREEN , CRCInput::RC_green , NEUTRINO_ICON_BUTTON_GREEN , NEUTRINO_ICON_GREEN, -1}, {NONEXISTANT_LOCALE , CRCInput::RC_yellow , NEUTRINO_ICON_BUTTON_YELLOW , NEUTRINO_ICON_YELLOW, -1}, - {LOCALE_INFOVIEWER_STREAMINFO , CRCInput::RC_blue , NEUTRINO_ICON_BUTTON_BLUE , NEUTRINO_ICON_FEATURES, -1} + {LOCALE_USERMENU_TITLE_BLUE , CRCInput::RC_blue , NEUTRINO_ICON_BUTTON_BLUE , NEUTRINO_ICON_FEATURES, -1} }; // const neutrino_msg_t col_key_helper_msg_def[COL_BUTTONMAX]={CRCInput::RC_red,CRCInput::RC_green,CRCInput::RC_yellow,CRCInput::RC_blue}; diff --git a/src/gui/user_menue_setup.cpp b/src/gui/user_menue_setup.cpp index 7fd2d38aa..b21ca131c 100644 --- a/src/gui/user_menue_setup.cpp +++ b/src/gui/user_menue_setup.cpp @@ -80,7 +80,7 @@ static keyvals usermenu_items[] = { SNeutrinoSettings::ITEM_EPG_INFO, LOCALE_EPGMENU_EVENTINFO, usermenu_show }, { SNeutrinoSettings::ITEM_EPG_MISC, LOCALE_USERMENU_ITEM_EPG_MISC, usermenu_show }, { SNeutrinoSettings::ITEM_AUDIO_SELECT, LOCALE_AUDIOSELECTMENUE_HEAD, usermenu_show }, - { SNeutrinoSettings::ITEM_SUBCHANNEL, LOCALE_INFOVIEWER_SUBSERVICE, usermenu_show }, + { SNeutrinoSettings::ITEM_SUBCHANNEL, LOCALE_NVODSELECTOR_HEAD, usermenu_show }, { SNeutrinoSettings::ITEM_FILEPLAY, LOCALE_MOVIEPLAYER_FILEPLAYBACK, usermenu_show }, { SNeutrinoSettings::ITEM_AUDIOPLAY, LOCALE_AUDIOPLAYER_NAME, usermenu_show }, { SNeutrinoSettings::ITEM_INETPLAY, LOCALE_INETRADIO_NAME, usermenu_show }, diff --git a/src/gui/user_menue_setup.h b/src/gui/user_menue_setup.h index 088e135e6..f622eadf5 100644 --- a/src/gui/user_menue_setup.h +++ b/src/gui/user_menue_setup.h @@ -53,10 +53,10 @@ typedef struct usermenu_props_t #define USERMENU_ITEMS_COUNT SNeutrinoSettings::BUTTON_MAX const struct usermenu_props_t usermenu[USERMENU_ITEMS_COUNT] = { - {LOCALE_USERMENU_BUTTON_RED , SNeutrinoSettings::BUTTON_RED , CRCInput::RC_red ,NEUTRINO_ICON_BUTTON_RED ,LOCALE_INFOVIEWER_EVENTLIST }, - {LOCALE_USERMENU_BUTTON_GREEN , SNeutrinoSettings::BUTTON_GREEN , CRCInput::RC_green ,NEUTRINO_ICON_BUTTON_GREEN ,LOCALE_AUDIOSELECTMENUE_HEAD }, - {LOCALE_USERMENU_BUTTON_YELLOW , SNeutrinoSettings::BUTTON_YELLOW , CRCInput::RC_yellow ,NEUTRINO_ICON_BUTTON_YELLOW ,LOCALE_INFOVIEWER_SUBSERVICE }, - {LOCALE_USERMENU_BUTTON_BLUE , SNeutrinoSettings::BUTTON_BLUE , CRCInput::RC_blue ,NEUTRINO_ICON_BUTTON_BLUE ,LOCALE_INFOVIEWER_STREAMINFO } + {LOCALE_USERMENU_BUTTON_RED , SNeutrinoSettings::BUTTON_RED , CRCInput::RC_red ,NEUTRINO_ICON_BUTTON_RED ,LOCALE_USERMENU_TITLE_RED }, + {LOCALE_USERMENU_BUTTON_GREEN , SNeutrinoSettings::BUTTON_GREEN , CRCInput::RC_green ,NEUTRINO_ICON_BUTTON_GREEN ,LOCALE_USERMENU_TITLE_GREEN }, + {LOCALE_USERMENU_BUTTON_YELLOW , SNeutrinoSettings::BUTTON_YELLOW , CRCInput::RC_yellow ,NEUTRINO_ICON_BUTTON_YELLOW ,LOCALE_USERMENU_TITLE_YELLOW }, + {LOCALE_USERMENU_BUTTON_BLUE , SNeutrinoSettings::BUTTON_BLUE , CRCInput::RC_blue ,NEUTRINO_ICON_BUTTON_BLUE ,LOCALE_USERMENU_TITLE_BLUE } }; diff --git a/src/neutrino.cpp b/src/neutrino.cpp index a973136dc..b98cc91f7 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -283,14 +283,7 @@ const lcd_setting_struct_t lcd_setting[SNeutrinoSettings::LCD_SETTING_COUNT] = ,{ "lcd_epgmode" , 0 /*DEFAULT_LCD_EPGMODE*/ } #endif }; -#if 0 -const char* usermenu_default[SNeutrinoSettings::BUTTON_MAX]={ - "2,3,4,13", // RED - "6", // GREEN - "7", // YELLOW - "12,11,20,21,19,14,15" // BLUE -}; -#endif + static SNeutrinoSettings::usermenu_t usermenu_default[] = { { CRCInput::RC_red, "2,3,4,13", "", "red" }, { CRCInput::RC_green, "6", "", "green" }, @@ -298,11 +291,6 @@ static SNeutrinoSettings::usermenu_t usermenu_default[] = { { CRCInput::RC_blue, "12,11,20,21,19,14,29,30,15", "", "blue" }, { CRCInput::RC_play, "9", "", "5" }, { CRCInput::RC_audio, "27", "", "6" }, -#if 0 - { CRCInput::RC_timer, "19", "", "7" }, - { CRCInput::RC_usb, "31", "", "6" }, - { CRCInput::RC_archive, "30", "", "4" }, -#endif { CRCInput::RC_nokey, "", "", "" }, }; @@ -1916,13 +1904,13 @@ TIMER_START(); // default usermenu titles correspond to gui/user_menue_setup.h:struct usermenu_props_t usermenu if (g_settings.usermenu[0]->title.empty()) - g_settings.usermenu[0]->title = g_Locale->getText(LOCALE_INFOVIEWER_EVENTLIST); + g_settings.usermenu[0]->title = g_Locale->getText(LOCALE_USERMENU_TITLE_RED); if (g_settings.usermenu[1]->title.empty()) - g_settings.usermenu[1]->title = g_Locale->getText(LOCALE_AUDIOSELECTMENUE_HEAD); + g_settings.usermenu[1]->title = g_Locale->getText(LOCALE_USERMENU_TITLE_GREEN); if (g_settings.usermenu[2]->title.empty()) - g_settings.usermenu[2]->title = g_Locale->getText(LOCALE_INFOVIEWER_SUBSERVICE); + g_settings.usermenu[2]->title = g_Locale->getText(LOCALE_USERMENU_TITLE_YELLOW); if (g_settings.usermenu[3]->title.empty()) - g_settings.usermenu[3]->title = g_Locale->getText(LOCALE_INFOVIEWER_STREAMINFO); + g_settings.usermenu[3]->title = g_Locale->getText(LOCALE_USERMENU_TITLE_BLUE); /* setup GUI */ neutrinoFonts = CNeutrinoFonts::getInstance(); diff --git a/src/system/locals.h b/src/system/locals.h index 1323053fa..fdc3e8519 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -806,8 +806,6 @@ typedef enum LOCALE_INETRADIO_NAME, LOCALE_INFOVIEWER_EPGNOTLOAD, LOCALE_INFOVIEWER_EPGWAIT, - LOCALE_INFOVIEWER_EVENTLIST, - LOCALE_INFOVIEWER_LANGUAGES, LOCALE_INFOVIEWER_MOTOR_MOVING, LOCALE_INFOVIEWER_NEXT, LOCALE_INFOVIEWER_NOCURRENT, @@ -815,10 +813,8 @@ typedef enum LOCALE_INFOVIEWER_NOTAVAILABLE, LOCALE_INFOVIEWER_NOW, LOCALE_INFOVIEWER_SELECTTIME, - LOCALE_INFOVIEWER_STREAMINFO, LOCALE_INFOVIEWER_SUBCHAN_DISP_POS, LOCALE_INFOVIEWER_SUBCHAN_INFOBAR, - LOCALE_INFOVIEWER_SUBSERVICE, LOCALE_INFOVIEWER_WAITTIME, LOCALE_IPSETUP_HINT_1, LOCALE_IPSETUP_HINT_2, @@ -1886,6 +1882,7 @@ typedef enum LOCALE_NVOD_STARTING, LOCALE_NVODSELECTOR_DIRECTORMODE, LOCALE_NVODSELECTOR_HEAD, + LOCALE_NVODSELECTOR_STARTTIME, LOCALE_NVODSELECTOR_SUBSERVICE, LOCALE_OPKG_BUTTON_EXPERT_OFF, LOCALE_OPKG_BUTTON_EXPERT_ON, @@ -2382,6 +2379,10 @@ typedef enum LOCALE_USERMENU_MSG_WARNING_NAME, LOCALE_USERMENU_MSG_WARNING_NO_ITEMS, LOCALE_USERMENU_NAME, + LOCALE_USERMENU_TITLE_BLUE, + LOCALE_USERMENU_TITLE_GREEN, + LOCALE_USERMENU_TITLE_RED, + LOCALE_USERMENU_TITLE_YELLOW, LOCALE_VIDEO_MODE_OK, LOCALE_VIDEOMENU_43MODE, LOCALE_VIDEOMENU_ANALOG_AUTO, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 4a7a86c5b..00da45a71 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -806,8 +806,6 @@ const char * locale_real_names[] = "inetradio.name", "infoviewer.epgnotload", "infoviewer.epgwait", - "infoviewer.eventlist", - "infoviewer.languages", "infoviewer.motor_moving", "infoviewer.next", "infoviewer.nocurrent", @@ -815,10 +813,8 @@ const char * locale_real_names[] = "infoviewer.notavailable", "infoviewer.now", "infoviewer.selecttime", - "infoviewer.streaminfo", "infoviewer.subchan_disp_pos", "infoviewer.subchan_infobar", - "infoviewer.subservice", "infoviewer.waittime", "ipsetup.hint_1", "ipsetup.hint_2", @@ -1886,6 +1882,7 @@ const char * locale_real_names[] = "nvod.starting", "nvodselector.directormode", "nvodselector.head", + "nvodselector.starttime", "nvodselector.subservice", "opkg.button.expert_off", "opkg.button.expert_on", @@ -2382,6 +2379,10 @@ const char * locale_real_names[] = "usermenu.msg_warning_name", "usermenu.msg_warning_no_items", "usermenu.name", + "usermenu.title_blue", + "usermenu.title_green", + "usermenu.title_red", + "usermenu.title_yellow", "video_mode_ok", "videomenu.43mode", "videomenu.analog_auto",