mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
neutrino info_menue: moved info menu into it's own modul
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1332 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: 7cd862d52a
Author: Thilo Graf <dbt@novatux.de>
Date: 2011-03-23 (Wed, 23 Mar 2011)
Origin message was:
------------------
*neutrino info_menue: moved info menu into it's own modul
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1332 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -53,6 +53,7 @@ libneutrino_gui_a_SOURCES = \
|
||||
favorites.cpp \
|
||||
filebrowser.cpp \
|
||||
imageinfo.cpp \
|
||||
info_menue.cpp \
|
||||
infoviewer.cpp \
|
||||
keybind_setup.cpp \
|
||||
mediaplayer.cpp \
|
||||
|
91
src/gui/info_menue.cpp
Normal file
91
src/gui/info_menue.cpp
Normal file
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
info menue - Neutrino-GUI
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
and some other guys
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Copyright (C) 2011 T. Graf 'dbt'
|
||||
Homepage: http://www.dbox2-tuning.net/
|
||||
|
||||
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, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
|
||||
#include "gui/info_menue.h"
|
||||
#include "gui/imageinfo.h"
|
||||
#include "gui/dboxinfo.h"
|
||||
#include <gui/streaminfo2.h>
|
||||
|
||||
#include <driver/screen_max.h>
|
||||
|
||||
|
||||
CInfoMenu::CInfoMenu()
|
||||
{
|
||||
width = w_max (40, 10);
|
||||
selected = -1;
|
||||
}
|
||||
|
||||
|
||||
CInfoMenu::~CInfoMenu()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
int CInfoMenu::exec(CMenuTarget* parent, const std::string &/*actionKey*/)
|
||||
{
|
||||
printf("[neutrino] CInfoMenu %s: init...\n",__FUNCTION__);
|
||||
int res = menu_return::RETURN_REPAINT;
|
||||
|
||||
if (parent)
|
||||
parent->hide();
|
||||
|
||||
showMenu();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CInfoMenu::showMenu()
|
||||
{
|
||||
printf("[neutrino] CInfoMenu call %s...\n", __FUNCTION__);
|
||||
|
||||
CMenuWidget *info = new CMenuWidget(LOCALE_MESSAGEBOX_INFO, NEUTRINO_ICON_INFO);
|
||||
info->setSelected(selected);
|
||||
|
||||
info->addIntroItems();
|
||||
info->addItem(new CMenuForwarder(LOCALE_SERVICEMENU_IMAGEINFO, true, NULL, new CImageInfo(), NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED ), false);
|
||||
info->addItem(new CMenuForwarder(LOCALE_EXTRA_DBOXINFO, true, NULL, new CDBoxInfoWidget, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
||||
info->addItem(new CMenuForwarder(LOCALE_STREAMINFO_HEAD, true, NULL, new CStreamInfo2Handler(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
|
||||
|
||||
info->exec(NULL, "");
|
||||
info->hide();
|
||||
selected = info->getSelected();
|
||||
delete info;
|
||||
}
|
||||
|
||||
|
||||
|
52
src/gui/info_menue.h
Normal file
52
src/gui/info_menue.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
info menue - Neutrino-GUI
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
and some other guys
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Copyright (C) 2011 T. Graf 'dbt'
|
||||
Homepage: http://www.dbox2-tuning.net/
|
||||
|
||||
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, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __INFO_MENU__
|
||||
#define __INFO_MENU__
|
||||
|
||||
#include <gui/widget/menue.h>
|
||||
#include <gui/widget/icons.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
class CInfoMenu : public CMenuTarget
|
||||
{
|
||||
private:
|
||||
int width, selected;
|
||||
|
||||
void showMenu();
|
||||
|
||||
public:
|
||||
CInfoMenu();
|
||||
~CInfoMenu();
|
||||
|
||||
int exec(CMenuTarget* parent, const std::string & actionKey = "");
|
||||
};
|
||||
|
||||
#endif
|
@@ -55,6 +55,7 @@
|
||||
#include "gui/favorites.h"
|
||||
#include "gui/hdd_menu.h"
|
||||
#include "gui/imageinfo.h"
|
||||
#include "gui/info_menue.h"
|
||||
#include "gui/keybind_setup.h"
|
||||
#include "gui/mediaplayer.h"
|
||||
#include "gui/mediaplayer_setup.h"
|
||||
@@ -140,14 +141,9 @@ void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings
|
||||
|
||||
mainMenu.addItem( new CMenuSeparator(CMenuSeparator::LINE) );
|
||||
// start of infomenu
|
||||
if (g_settings.show_infomenu == 0) {
|
||||
CMenuWidget *info = new CMenuWidget(LOCALE_MESSAGEBOX_INFO, NEUTRINO_ICON_INFO);
|
||||
info->addIntroItems();
|
||||
info->addItem(new CMenuForwarder(LOCALE_SERVICEMENU_IMAGEINFO, true, NULL, new CImageInfo(), NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED ), false);
|
||||
info->addItem( new CMenuForwarder(LOCALE_EXTRA_DBOXINFO, true, NULL, new CDBoxInfoWidget, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
||||
info->addItem(new CMenuForwarder(LOCALE_STREAMINFO_HEAD, true, NULL, new CStreamInfo2Handler(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
|
||||
mainMenu.addItem(new CMenuForwarder(LOCALE_MESSAGEBOX_INFO, true, NULL, info, NULL, CRCInput::RC_help, NEUTRINO_ICON_BUTTON_HELP_SMALL ));
|
||||
}
|
||||
if (g_settings.show_infomenu == 0)
|
||||
mainMenu.addItem(new CMenuForwarder(LOCALE_MESSAGEBOX_INFO, true, NULL, new CInfoMenu(), NULL, CRCInput::RC_help, NEUTRINO_ICON_BUTTON_HELP_SMALL ));
|
||||
|
||||
// end of infomenu
|
||||
/*if(system_rev != 10)*/
|
||||
mainMenu.addItem( new CMenuForwarder(LOCALE_CI_SETTINGS, true, NULL, g_CamHandler, NULL, CRCInput::convertDigitToKey(0)));
|
||||
@@ -287,15 +283,11 @@ void CNeutrinoApp::InitServiceSettings(CMenuWidget &service/*, CMenuWidget &_sca
|
||||
service.addItem(GenericMenuSeparatorLine);
|
||||
service.addItem(new CMenuForwarder(LOCALE_SERVICEMENU_RESTART , true, NULL, this, "restart", CRCInput::RC_standby, NEUTRINO_ICON_BUTTON_POWER));
|
||||
service.addItem(new CMenuForwarder(LOCALE_SERVICEMENU_GETPLUGINS, true, NULL, this, "reloadplugins"));
|
||||
|
||||
// start infomenu in service
|
||||
if (g_settings.show_infomenu == 1) {
|
||||
CMenuWidget *info = new CMenuWidget(LOCALE_MESSAGEBOX_INFO, NEUTRINO_ICON_INFO);
|
||||
info->addIntroItems();
|
||||
info->addItem(new CMenuForwarder(LOCALE_SERVICEMENU_IMAGEINFO, true, NULL, new CImageInfo(), NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED ), false);
|
||||
info->addItem( new CMenuForwarder(LOCALE_EXTRA_DBOXINFO, true, NULL, new CDBoxInfoWidget, NULL, CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
||||
info->addItem(new CMenuForwarder(LOCALE_STREAMINFO_HEAD, true, NULL, new CStreamInfo2Handler(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
|
||||
service.addItem(new CMenuForwarder(LOCALE_MESSAGEBOX_INFO, true, NULL, info, NULL, CRCInput::RC_help, NEUTRINO_ICON_BUTTON_HELP_SMALL ));
|
||||
}
|
||||
if (g_settings.show_infomenu == 1)
|
||||
service.addItem(new CMenuForwarder(LOCALE_MESSAGEBOX_INFO, true, NULL, new CInfoMenu(), NULL, CRCInput::RC_help, NEUTRINO_ICON_BUTTON_HELP_SMALL ));
|
||||
|
||||
// end of infomenu in service
|
||||
//softupdate
|
||||
//if(softupdate)
|
||||
|
Reference in New Issue
Block a user