gui/mediaplayer_setup.cpp: integrate MB / YT settings, (c) martii

This commit is contained in:
[CST] Focus
2014-12-26 14:16:02 +03:00
parent 751d23fbbb
commit 9b78e49d0e
7 changed files with 124 additions and 48 deletions

View File

@@ -885,6 +885,7 @@ menu.back Zurück
menu.cancel Abbrechen
menu.hint_a_pic Konfigurieren Sie den Audioplayer und den Bildbetrachter
menu.hint_aplay Audioplayer
menu.hint_aplay_setup Ändern Sie Audioplayer-Einstellungen wie Titel-Anzeige, Startverzeichnis oder Bildschirmschoner.
menu.hint_audio Audio-Ausgang, Dolby Digital und SRS TruVolume Optionen und mehr
menu.hint_audio_adjust_vol_ac3 Lautstärkeanpassung für AC3-Tonspuren
menu.hint_audio_adjust_vol_clear Alle gespeicherten Werte für AC3- und PCM-Tonspuren löschen
@@ -1101,6 +1102,7 @@ menu.hint_misc_filebrowser Dateisystem, Dateirechte anzeigen im Dateibrowser, St
menu.hint_misc_general Standby-, Teletext- und Rotor-Einstellungen, Pluginverzeichnis auf externem Datenträger
menu.hint_misc_zapit Verwaltung der Start-Kanäle für den TV/Radio-Modus
menu.hint_movie Wiedergabe von Filmen
menu.hint_moviebrowser_setup Legen Sie Auswahl- und Anzeigeoptionen des MovieBrowsers fest
menu.hint_movieplayer_plugin Wählen Sie ein Plugin, das mit einer Schnellstart-Taste im Movieplayer-Modus gestartet wird
menu.hint_net_broadcast Ändern Sie die Broadcast-Adresse.\nWenn Sie unsicher sind, verwenden Sie zuletzt .255
menu.hint_net_dhcp Verwenden Sie einen DHCP-Server für die automatische Vergabe einer IP-Adresse im Netzwerk
@@ -1152,6 +1154,7 @@ menu.hint_parentallock_prompt Legen Sie fest, wann die Eingabe einer PIN erfolge
menu.hint_personalize Personalisieren Sie ihre Menüs und konfigurieren Sie ihre Benutzermenüs
menu.hint_pictureviewer_defdir Wählen Sie das Startverzeichnis für den Bildbetrachter
menu.hint_pictureviewer_scaling Stellen Sie die Bildauflösung ein
menu.hint_pictureviewer_setup Konfigurieren Sie die Bildbetrachter-Optionen
menu.hint_pictureviewer_slide_time Ändern Sie den Diashow-Intervall.\nStandardmäßig sind 10 Sekunden eingstellt
menu.hint_picview Bilder anzeigen
menu.hint_plugin_type_games Legt fest, ob Spiele im Benutzermenü unter der Rubrik 'Plugin-Typen' gezeigt werden sollen
@@ -1358,6 +1361,7 @@ menu.hint_volume_size Wählen Sie die Höhe der Lautstärkeanzeige
menu.hint_webtv_setup Hier konfigurierte WebTV-Kanäle finden Sie in der Kanalverwaltung.
menu.hint_window_size Kanalliste, EPG-Infos und einige andere Fenster werden mit diesem Faktor skaliert
menu.hint_ytplay Wiedergabe von ausgewählten Youtube Feeds
menu.hint_ytplay_setup Konfigurieren Sie YouTube-spezifische Optionen wie maximale Ergebnisse bei Suchen oder Cache-Verzeichnis
menu.hint_zap_cycle Wählen Sie, ob nur innerhalb des aktiven Bouquets umgeschaltet werden kann
menu.next Weiter (Menü zum Beenden)
messagebox.back Zurück

View File

@@ -888,6 +888,7 @@ menu.back Back
menu.cancel Cancel
menu.hint_a_pic Configure audio player and picture viewer
menu.hint_aplay Audio player
menu.hint_aplay_setup Change title display, start directory, screen saver and more
menu.hint_audio Audio output, DD\nSRS True volume options
menu.hint_audio_adjust_vol_ac3 Channel specific volume adjustment for AC3 streams
menu.hint_audio_adjust_vol_clear Clear all saved values for PCM and AC3 streams
@@ -1104,6 +1105,7 @@ menu.hint_misc_filebrowser Filesystem encoding, file rights\ndeny directory leav
menu.hint_misc_general Start to standby, cache teletext, swp rotor\nplugin hdd dir
menu.hint_misc_zapit Initial TV/Radio channels
menu.hint_movie Play movies
menu.hint_moviebrowser_setup Set selection and display options.
menu.hint_movieplayer_plugin Choose a plugin that's executed with the one touch key in movieplayer mode
menu.hint_net_broadcast Enter broadcast address\nif unsure, use IP address with last .255
menu.hint_net_dhcp Use DHCP server to auto-configure
@@ -1155,6 +1157,7 @@ menu.hint_parentallock_prompt Configure when Neutrino-HD will ask you\nfor PIN c
menu.hint_personalize Enable, disable or Protect menu items\nConfigure color-buttons user menus
menu.hint_pictureviewer_defdir Default picture viewer directory
menu.hint_pictureviewer_scaling Picture scaling algorithm
menu.hint_pictureviewer_setup Configure pictureviewer behavior
menu.hint_pictureviewer_slide_time Slideshow interval, in seconds
menu.hint_picview View pictures
menu.hint_plugin_type_games Show games in usermenu at selection 'Plugin types'
@@ -1363,6 +1366,7 @@ menu.hint_volume_size Select volume indicator height
menu.hint_webtv_setup WebTV channels configured here will be available in the standard channel lists.
menu.hint_window_size Channellist, EPG-infos and some other windows are scaled by this factor
menu.hint_ytplay Play selected youtube feeds
menu.hint_ytplay_setup Configure YouTube-specific options, e.g. an upper limit for search results
menu.hint_zap_cycle When swithing channels, stay in current bouquet
menu.next Next (press Menu to quit)
messagebox.back Back

View File

@@ -34,7 +34,6 @@
#include <config.h>
#endif
#include "mediaplayer_setup.h"
#include <global.h>
@@ -43,18 +42,15 @@
#include <gui/widget/icons.h>
#include <gui/widget/stringinput.h>
#include <gui/audioplayer_setup.h>
#include <gui/pictureviewer_setup.h>
#include <gui/webtv_setup.h>
#include <gui/moviebrowser.h>
#include <driver/screen_max.h>
#include <system/debug.h>
CMediaPlayerSetup::CMediaPlayerSetup()
{
width = w_max (40, 10);
@@ -63,7 +59,6 @@ CMediaPlayerSetup::CMediaPlayerSetup()
CMediaPlayerSetup::~CMediaPlayerSetup()
{
}
int CMediaPlayerSetup::exec(CMenuTarget* parent, const std::string & /*actionKey*/)
@@ -83,7 +78,48 @@ int CMediaPlayerSetup::exec(CMenuTarget* parent, const std::string & /*actionKey
/*shows media setup menue entries*/
int CMediaPlayerSetup::showMediaPlayerSetup()
{
CMenuWidget* mediaSetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width);
mediaSetup->setSelected(selected);
// intros
mediaSetup->addIntroItems(LOCALE_MAINMENU_MEDIA);
CMenuForwarder *mf;
CAudioPlayerSetup asetup;
mf = new CMenuForwarder(LOCALE_AUDIOPLAYER_NAME, true, NULL, &asetup, "", CRCInput::RC_red);
mf->setHint(NEUTRINO_ICON_HINT_APLAY, LOCALE_MENU_HINT_APLAY_SETUP);
mediaSetup->addItem(mf);
CPictureViewerSetup psetup;
mf = new CMenuForwarder(LOCALE_PICTUREVIEWER_HEAD, true, NULL, &psetup, "", CRCInput::RC_green);
mf->setHint(NEUTRINO_ICON_HINT_PICVIEW, LOCALE_MENU_HINT_PICTUREVIEWER_SETUP);
mediaSetup->addItem(mf);
CWebTVSetup wsetup;
mf = new CMenuForwarder(LOCALE_WEBTV_HEAD, true, NULL, &wsetup, "show_menu", CRCInput::RC_yellow);
mf->setHint(NEUTRINO_ICON_HINT_TVMODE /* FIXME */, LOCALE_MENU_HINT_WEBTV_SETUP);
mediaSetup->addItem(mf);
mediaSetup->addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_MAINMENU_MOVIEPLAYER));
CMovieBrowser msetup;
int shortcut = 1;
mf = new CMenuForwarder(LOCALE_MOVIEBROWSER_HEAD, true, NULL, &msetup, "show_menu", CRCInput::convertDigitToKey(shortcut++));
mf->setHint(NEUTRINO_ICON_HINT_MB, LOCALE_MENU_HINT_MOVIEBROWSER_SETUP);
mediaSetup->addItem(mf);
mf = new CMenuForwarder(LOCALE_MOVIEPLAYER_YTPLAYBACK, true, NULL, &msetup, "show_ytmenu", CRCInput::convertDigitToKey(shortcut++));
mf->setHint(NEUTRINO_ICON_HINT_YTPLAY, LOCALE_MENU_HINT_YTPLAY_SETUP);
mediaSetup->addItem(mf);
int res = mediaSetup->exec (NULL, "");
selected = mediaSetup->getSelected();
delete mediaSetup;
return res;
#if 0
CMenuWidget* mediaSetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width);
mediaSetup->setSelected(selected);
@@ -105,4 +141,5 @@ int CMediaPlayerSetup::showMediaPlayerSetup()
selected = mediaSetup->getSelected();
delete mediaSetup;
return res;
#endif
}

View File

@@ -863,6 +863,16 @@ int CMovieBrowser::exec(CMenuTarget* parent, const std::string & actionKey)
m_movieSelectionHandler->bookmarks.user[i].pos =0;
}
}
else if(actionKey == "show_menu")
{
showMenu(true);
}
else if(actionKey == "show_ytmenu")
{
showYTMenu(true);
saveSettings(&m_settings);
}
return returnval;
}
@@ -1746,7 +1756,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
if (show_mode == MB_SHOW_YT)
showYTMenu();
else
showMenu(m_movieSelectionHandler);
showMenu();
}
else if (msg == CRCInput::RC_text || msg == CRCInput::RC_radio) {
@@ -2764,7 +2774,7 @@ int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
return res;
}
bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /* movie_info */, bool calledExternally)
bool CMovieBrowser::showMenu(bool calledExternally)
{
/* first clear screen */
framebuffer->paintBackground();
@@ -2864,6 +2874,7 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /* movie_info */, bool calledExterna
CMovieHelp* movieHelp = new CMovieHelp();
CNFSSmallMenu* nfs = new CNFSSmallMenu();
if (!calledExternally) {
CMenuWidget mainMenu(LOCALE_MOVIEBROWSER_HEAD, NEUTRINO_ICON_MOVIEPLAYER);
mainMenu.addIntroItems(LOCALE_MOVIEBROWSER_MENU_MAIN_HEAD);
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_INFO_HEAD, (m_movieSelectionHandler != NULL), NULL, this, "show_movie_info_menu", CRCInput::RC_red));
@@ -2877,6 +2888,8 @@ bool CMovieBrowser::showMenu(MI_MOVIE_INFO* /* movie_info */, bool calledExterna
//mainMenu.addItem(GenericMenuSeparator);
mainMenu.exec(NULL, " ");
} else
optionsMenu.exec(NULL, "");
// post menu handling
if (m_parentalLock != MB_PARENTAL_LOCK_OFF_TMP)
@@ -3441,7 +3454,7 @@ int CYTHistory::exec(CMenuTarget* parent, const std::string &actionKey)
return menu_return::RETURN_EXIT;
}
bool CMovieBrowser::showYTMenu()
bool CMovieBrowser::showYTMenu(bool calledExternally)
{
framebuffer->paintBackground();
@@ -3452,6 +3465,7 @@ bool CMovieBrowser::showYTMenu()
CMenuSelectorTarget * selector = new CMenuSelectorTarget(&select);
char cnt[5];
if (!calledExternally) {
for (unsigned i = 0; i < YT_FEED_OPTION_COUNT; i++) {
sprintf(cnt, "%d", YT_FEED_OPTIONS[i].key);
mainMenu.addItem(new CMenuForwarder(YT_FEED_OPTIONS[i].value, true, NULL, selector, cnt, CRCInput::convertDigitToKey(i + 1)), m_settings.ytmode == (int) YT_FEED_OPTIONS[i].key);
@@ -3463,19 +3477,24 @@ bool CMovieBrowser::showYTMenu()
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_YT_RELATED, enabled, NULL, selector, cnt, CRCInput::RC_red));
mainMenu.addItem(GenericMenuSeparatorLine);
}
std::string search = m_settings.ytsearch;
CKeyboardInput stringInput(LOCALE_MOVIEBROWSER_YT_SEARCH, &search);
if (!calledExternally) {
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_YT_SEARCH, true, search, &stringInput, NULL, CRCInput::RC_green));
mainMenu.addItem(new CMenuOptionChooser(LOCALE_MOVIEBROWSER_YT_ORDERBY, &m_settings.ytorderby, YT_ORDERBY_OPTIONS, YT_ORDERBY_OPTION_COUNT, true, NULL, CRCInput::RC_nokey, "", true));
sprintf(cnt, "%d", cYTFeedParser::SEARCH);
mainMenu.addItem(new CMenuForwarder(LOCALE_EVENTFINDER_START_SEARCH, true, NULL, selector, cnt, CRCInput::RC_yellow));
}
CYTHistory ytHistory(m_settings, search);
if (!calledExternally) {
if (m_settings.ytsearch_history_size > 0)
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_YT_HISTORY, true, NULL, &ytHistory, "", CRCInput::RC_blue));
mainMenu.addItem(GenericMenuSeparatorLine);
}
mainMenu.addItem(new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_YT_MAX_RESULTS, &m_settings.ytresults, true, 10, 50, NULL));
mainMenu.addItem(new CMenuOptionNumberChooser(LOCALE_MOVIEBROWSER_YT_MAX_HISTORY, &m_settings.ytsearch_history_max, true, 10, 50, NULL));
@@ -3524,8 +3543,18 @@ bool CMovieBrowser::showYTMenu()
delete selector;
bool reload = false;
printf("MovieBrowser::showYTMenu(): selected: %d\n", select);
int newmode = -1;
if (rstr != m_settings.ytregion) {
m_settings.ytregion = rstr;
if (newmode < 0)
newmode = m_settings.ytmode;
reload = true;
printf("change region to %s\n", m_settings.ytregion.c_str());
}
if (calledExternally)
return true;
printf("MovieBrowser::showYTMenu(): selected: %d\n", select);
if (select >= 0) {
newmode = select;
if (select == cYTFeedParser::RELATED) {
@@ -3565,13 +3594,7 @@ bool CMovieBrowser::showYTMenu()
reload = true;
}
}
if (rstr != m_settings.ytregion) {
m_settings.ytregion = rstr;
if (newmode < 0)
newmode = m_settings.ytmode;
reload = true;
printf("change region to %s\n", m_settings.ytregion.c_str());
}
if (reload) {
CHintBox loadBox(LOCALE_MOVIEPLAYER_YTPLAYBACK, g_Locale->getText(LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES));
loadBox.paint();

View File

@@ -354,7 +354,7 @@ class CMovieBrowser : public CMenuTarget
std::vector<MI_MOVIE_INFO> yt_completed;
std::vector<MI_MOVIE_INFO> yt_failed;
void loadYTitles(int mode, std::string search = "", std::string id = "");
bool showYTMenu(void);
bool showYTMenu(bool calledExternally = false);
void refreshYTMenu();
public: // Functions //////////////////////////////////////////////////////////7
@@ -430,7 +430,7 @@ class CMovieBrowser : public CMenuTarget
void getStorageInfo(void); // P3
///// Menu ////////////////////////////////////
bool showMenu(MI_MOVIE_INFO* movie_info, bool calledExternally = false); // P2
bool showMenu(bool calledExternally = false);
int showMovieInfoMenu(MI_MOVIE_INFO* movie_info); // P2
int showStartPosSelectionMenu(void); // P2

View File

@@ -915,6 +915,7 @@ typedef enum
LOCALE_MENU_CANCEL,
LOCALE_MENU_HINT_A_PIC,
LOCALE_MENU_HINT_APLAY,
LOCALE_MENU_HINT_APLAY_SETUP,
LOCALE_MENU_HINT_AUDIO,
LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_AC3,
LOCALE_MENU_HINT_AUDIO_ADJUST_VOL_CLEAR,
@@ -1131,6 +1132,7 @@ typedef enum
LOCALE_MENU_HINT_MISC_GENERAL,
LOCALE_MENU_HINT_MISC_ZAPIT,
LOCALE_MENU_HINT_MOVIE,
LOCALE_MENU_HINT_MOVIEBROWSER_SETUP,
LOCALE_MENU_HINT_MOVIEPLAYER_PLUGIN,
LOCALE_MENU_HINT_NET_BROADCAST,
LOCALE_MENU_HINT_NET_DHCP,
@@ -1182,6 +1184,7 @@ typedef enum
LOCALE_MENU_HINT_PERSONALIZE,
LOCALE_MENU_HINT_PICTUREVIEWER_DEFDIR,
LOCALE_MENU_HINT_PICTUREVIEWER_SCALING,
LOCALE_MENU_HINT_PICTUREVIEWER_SETUP,
LOCALE_MENU_HINT_PICTUREVIEWER_SLIDE_TIME,
LOCALE_MENU_HINT_PICVIEW,
LOCALE_MENU_HINT_PLUGIN_TYPE_GAMES,
@@ -1390,6 +1393,7 @@ typedef enum
LOCALE_MENU_HINT_WEBTV_SETUP,
LOCALE_MENU_HINT_WINDOW_SIZE,
LOCALE_MENU_HINT_YTPLAY,
LOCALE_MENU_HINT_YTPLAY_SETUP,
LOCALE_MENU_HINT_ZAP_CYCLE,
LOCALE_MENU_NEXT,
LOCALE_MESSAGEBOX_BACK,

View File

@@ -915,6 +915,7 @@ const char * locale_real_names[] =
"menu.cancel",
"menu.hint_a_pic",
"menu.hint_aplay",
"menu.hint_aplay_setup",
"menu.hint_audio",
"menu.hint_audio_adjust_vol_ac3",
"menu.hint_audio_adjust_vol_clear",
@@ -1131,6 +1132,7 @@ const char * locale_real_names[] =
"menu.hint_misc_general",
"menu.hint_misc_zapit",
"menu.hint_movie",
"menu.hint_moviebrowser_setup",
"menu.hint_movieplayer_plugin",
"menu.hint_net_broadcast",
"menu.hint_net_dhcp",
@@ -1182,6 +1184,7 @@ const char * locale_real_names[] =
"menu.hint_personalize",
"menu.hint_pictureviewer_defdir",
"menu.hint_pictureviewer_scaling",
"menu.hint_pictureviewer_setup",
"menu.hint_pictureviewer_slide_time",
"menu.hint_picview",
"menu.hint_plugin_type_games",
@@ -1390,6 +1393,7 @@ const char * locale_real_names[] =
"menu.hint_webtv_setup",
"menu.hint_window_size",
"menu.hint_ytplay",
"menu.hint_ytplay_setup",
"menu.hint_zap_cycle",
"menu.next",
"messagebox.back",