mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
Moviebrowser: outsource help class
This commit is contained in:
@@ -47,11 +47,11 @@
|
|||||||
//#include <cstdlib>
|
//#include <cstdlib>
|
||||||
#include "mb.h"
|
#include "mb.h"
|
||||||
#include "mb_functions.h"
|
#include "mb_functions.h"
|
||||||
|
#include "mb_help.h"
|
||||||
#include <gui/filebrowser.h>
|
#include <gui/filebrowser.h>
|
||||||
#include <gui/tmdb.h>
|
#include <gui/tmdb.h>
|
||||||
#include <gui/epgview.h>
|
#include <gui/epgview.h>
|
||||||
#include <gui/widget/hintbox.h>
|
#include <gui/widget/hintbox.h>
|
||||||
#include <gui/widget/helpbox.h>
|
|
||||||
#include <gui/widget/icons.h>
|
#include <gui/widget/icons.h>
|
||||||
#include <gui/components/cc.h>
|
#include <gui/components/cc.h>
|
||||||
#include <gui/widget/messagebox.h>
|
#include <gui/widget/messagebox.h>
|
||||||
@@ -3970,24 +3970,7 @@ int CMenuSelector::paint(bool selected)
|
|||||||
return y+height;
|
return y+height;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMovieHelp::exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/)
|
|
||||||
{
|
|
||||||
Helpbox helpbox;
|
|
||||||
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.addLine(NEUTRINO_ICON_BUTTON_MENU_SMALL,g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MENU));
|
|
||||||
helpbox.addLine(NEUTRINO_ICON_BUTTON_PLAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_PLAY));
|
|
||||||
helpbox.addLine("");
|
|
||||||
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.addLine("");
|
|
||||||
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.show(LOCALE_MESSAGEBOX_INFO);
|
|
||||||
return(0);
|
|
||||||
}
|
|
||||||
/////////////////////////////////////////////////
|
/////////////////////////////////////////////////
|
||||||
// MenuTargets
|
// MenuTargets
|
||||||
////////////////////////////////////////////////
|
////////////////////////////////////////////////
|
||||||
|
@@ -354,16 +354,6 @@ class CMovieBrowser : public CMenuTarget
|
|||||||
bool addFile(CFile &file, int dirItNr);
|
bool addFile(CFile &file, int dirItNr);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Class to show Moviebrowser Information, to be used by menu
|
|
||||||
class CMovieHelp : public CMenuTarget
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
|
|
||||||
public:
|
|
||||||
CMovieHelp(){};
|
|
||||||
~CMovieHelp(){};
|
|
||||||
int exec( CMenuTarget* parent, const std::string & actionKey );
|
|
||||||
};
|
|
||||||
|
|
||||||
// I tried a lot to use the menu.cpp as ListBox selection, and I got three solution which are all garbage.
|
// I tried a lot to use the menu.cpp as ListBox selection, and I got three solution which are all garbage.
|
||||||
//Might be replaced by somebody who is familiar with this stuff .
|
//Might be replaced by somebody who is familiar with this stuff .
|
||||||
|
72
src/gui/moviebrowser/mb_help.h
Normal file
72
src/gui/moviebrowser/mb_help.h
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
/*
|
||||||
|
Based up Neutrino-GUI - Tuxbox-Project
|
||||||
|
Copyright (C) 2001 by Steffen Hehn 'McClean'
|
||||||
|
|
||||||
|
License: GPL
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public
|
||||||
|
License as published by the Free Software Foundation; either
|
||||||
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
***********************************************************
|
||||||
|
|
||||||
|
Module Name: mb_help.h
|
||||||
|
|
||||||
|
Description: Implementation of the CMovieBrowser class
|
||||||
|
This class provides a filebrowser window to view, select and start a movies from HD.
|
||||||
|
This class does replace the Filebrowser
|
||||||
|
|
||||||
|
Date: Nov 2005
|
||||||
|
|
||||||
|
Author: Guenther@tuxbox.berlios.org
|
||||||
|
based on code of Steffen Hehn 'McClean'
|
||||||
|
|
||||||
|
outsourced:
|
||||||
|
(C) 2016, Thilo Graf 'dbt'
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MOVIEBROWSER_HELP_H_
|
||||||
|
#define MOVIEBROWSER_HELP_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include <gui/widget/helpbox.h>
|
||||||
|
|
||||||
|
// Class to show Moviebrowser Information, to be used by menu
|
||||||
|
class CMovieHelp : public CMenuTarget
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
public:
|
||||||
|
CMovieHelp(){};
|
||||||
|
~CMovieHelp(){};
|
||||||
|
|
||||||
|
int exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/)
|
||||||
|
{
|
||||||
|
Helpbox helpbox;
|
||||||
|
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.addLine(NEUTRINO_ICON_BUTTON_MENU_SMALL,g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_MENU));
|
||||||
|
helpbox.addLine(NEUTRINO_ICON_BUTTON_PLAY, g_Locale->getText(LOCALE_MOVIEBROWSER_HELP_BUTTON_PLAY));
|
||||||
|
helpbox.addLine("");
|
||||||
|
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.addLine("");
|
||||||
|
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.show(LOCALE_MESSAGEBOX_INFO);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /*MOVIEBROWSER_HELP_H_*/
|
Reference in New Issue
Block a user