- moviebrowser: rework help ...

* remove from menu; this breakes menu's logic (rc_help is to switch hints)
* use rc_help to show help window
* rework content
This commit is contained in:
svenhoefer
2016-12-04 22:44:44 +01:00
parent ce82966c75
commit 21ed22cb6e
4 changed files with 24 additions and 33 deletions

View File

@@ -1685,7 +1685,7 @@ moviebrowser.head_recordlist Zuletzt aufgenommen:
moviebrowser.help_button_blue Filminfos neu laden
moviebrowser.help_button_green Filterfenster einblenden
moviebrowser.help_button_left Ansicht ändern
moviebrowser.help_button_menu Hauptmenü öffnen
moviebrowser.help_button_menu Filminfos und Einstellungen
moviebrowser.help_button_mute Filme löschen
moviebrowser.help_button_okay Filme abspielen
moviebrowser.help_button_play Filme markieren

View File

@@ -1685,7 +1685,7 @@ moviebrowser.head_recordlist Last recorded:
moviebrowser.help_button_blue Reload movie informations
moviebrowser.help_button_green Show filter selection
moviebrowser.help_button_left Change view
moviebrowser.help_button_menu Open main menu
moviebrowser.help_button_menu Movie infos and settings
moviebrowser.help_button_mute Delete movies
moviebrowser.help_button_okay Play movies
moviebrowser.help_button_play Mark movies

View File

@@ -2067,7 +2067,11 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
onDelete();
}
}
else if (msg == CRCInput::RC_help || msg == CRCInput::RC_info)
else if (msg == CRCInput::RC_help)
{
showHelp();
}
else if (msg == CRCInput::RC_info)
{
if (m_movieSelectionHandler != NULL)
{
@@ -3136,11 +3140,9 @@ void CMovieBrowser::loadAllMovieInfo(void)
void CMovieBrowser::showHelp(void)
{
CMovieHelp help;
help.exec(NULL,NULL);
help.exec();
}
#define MAX_STRING 30
int CMovieBrowser::showMovieInfoMenu(MI_MOVIE_INFO* movie_info)
{
@@ -3402,7 +3404,6 @@ bool CMovieBrowser::showMenu(bool calledExternally)
/********************************************************************/
/** main menu ******************************************************/
CMovieHelp* movieHelp = new CMovieHelp();
CNFSSmallMenu* nfs = new CNFSSmallMenu();
if (!calledExternally) {
@@ -3416,9 +3417,6 @@ bool CMovieBrowser::showMenu(bool calledExternally)
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_DIRECTORIES_HEAD, true, NULL, &dirMenu, NULL, CRCInput::RC_2));
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_SCAN_FOR_MOVIES, true, NULL, this, "reload_movie_info", CRCInput::RC_3));
//mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_NFS_HEAD, true, NULL, nfs, NULL, CRCInput::RC_setup));
mainMenu.addItem(GenericMenuSeparatorLine);
mainMenu.addItem(new CMenuForwarder(LOCALE_MOVIEBROWSER_MENU_HELP_HEAD, true, NULL, movieHelp, NULL, CRCInput::RC_help));
//mainMenu.addItem(GenericMenuSeparator);
mainMenu.exec(NULL, " ");
} else
@@ -3490,7 +3488,6 @@ bool CMovieBrowser::showMenu(bool calledExternally)
for (i = 0; i < MB_MAX_DIRS; i++)
delete notifier[i];
delete movieHelp;
delete nfs;
return(true);

View File

@@ -40,8 +40,8 @@
#include <gui/widget/helpbox.h>
// Class to show Moviebrowser Information, to be used by menu
class CMovieHelp : public CMenuTarget
// Class to show moviebrowser's help, to be used by rc_help key
class CMovieHelp
{
private:
@@ -49,35 +49,29 @@ class CMovieHelp : public CMenuTarget
CMovieHelp(){};
~CMovieHelp(){};
int exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/)
void exec()
{
Helpbox helpbox(g_Locale->getText(LOCALE_HELP_BOX_TITLE));
helpbox.addLine("Standard functions", CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 10, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]);
helpbox.addLine(NEUTRINO_ICON_BUTTON_OKAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_OKAY), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30);
helpbox.addLine(NEUTRINO_ICON_BUTTON_PLAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_PLAY), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30);
helpbox.addLine(NEUTRINO_ICON_BUTTON_MUTE_SMALL, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MUTE), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30);
helpbox.addSeparator();
helpbox.addLine(NEUTRINO_ICON_BUTTON_PLAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_PLAY));
helpbox.addLine(NEUTRINO_ICON_BUTTON_OKAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_OKAY));
helpbox.addLine(NEUTRINO_ICON_BUTTON_MUTE_SMALL, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MUTE));
helpbox.addSeparatorLine();
helpbox.addLine(NEUTRINO_ICON_BUTTON_RED, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RED), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30);
helpbox.addLine(NEUTRINO_ICON_BUTTON_GREEN, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_GREEN), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30);
helpbox.addLine(NEUTRINO_ICON_BUTTON_YELLOW, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_YELLOW), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30);
helpbox.addLine(NEUTRINO_ICON_BUTTON_BLUE, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_BLUE), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30);
helpbox.addLine(NEUTRINO_ICON_BUTTON_MENU, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MENU), CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30);
helpbox.addLine("</> Change view", CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30);
#if 0
helpbox.addPagebreak();
#endif
helpbox.addLine("During playback", CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 10, g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]);
helpbox.addLine(NEUTRINO_ICON_BUTTON_RED, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RED));
helpbox.addLine(NEUTRINO_ICON_BUTTON_GREEN, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_GREEN));
helpbox.addLine(NEUTRINO_ICON_BUTTON_YELLOW, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_YELLOW));
helpbox.addLine(NEUTRINO_ICON_BUTTON_BLUE, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_BLUE));
helpbox.addSeparatorLine();
helpbox.addLine(NEUTRINO_ICON_BUTTON_BLUE, "Marking menu", CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30);
helpbox.addLine(NEUTRINO_ICON_BUTTON_0, "Not perform marking action", CTextBox::AUTO_WIDTH | CTextBox::AUTO_HIGH, 35, 30);
helpbox.addLine(NEUTRINO_ICON_BUTTON_MENU, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MENU));
helpbox.addSeparator();
helpbox.addLine(NEUTRINO_ICON_BUTTON_LEFT, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_LEFT));
helpbox.addLine(NEUTRINO_ICON_BUTTON_RIGHT, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_RIGHT));
helpbox.addExitKey(CRCInput::RC_ok);
helpbox.show();
int ret = helpbox.exec();
helpbox.exec();
helpbox.hide();
return ret;
}
};