From e663e1e0c5664042eb13a88299b06d7d0540a103 Mon Sep 17 00:00:00 2001 From: thilo Date: Mon, 28 Nov 2011 10:58:37 +0000 Subject: [PATCH] *neutrino infomenu: add widget index Replaces getSelect(), setSelect() in this context. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1921 e54a6e83-5905-42d5-8d5c-058d10e6a962 --- src/gui/info_menue.cpp | 9 ++------- src/gui/info_menue.h | 2 +- src/neutrino_menue.h | 3 +++ 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/gui/info_menue.cpp b/src/gui/info_menue.cpp index 04ecae070..eed7d3ca7 100644 --- a/src/gui/info_menue.cpp +++ b/src/gui/info_menue.cpp @@ -32,6 +32,7 @@ #include #include +#include #include "gui/info_menue.h" #include "gui/imageinfo.h" @@ -43,7 +44,6 @@ CInfoMenu::CInfoMenu() { width = w_max (40, 10); - selected = -1; } CInfoMenu::~CInfoMenu() @@ -54,7 +54,6 @@ 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 != NULL) @@ -67,10 +66,7 @@ int CInfoMenu::exec(CMenuTarget* parent, const std::string &/*actionKey*/) int CInfoMenu::showMenu() { - printf("[neutrino] CInfoMenu call %s...\n", __FUNCTION__); - - CMenuWidget *info = new CMenuWidget(LOCALE_MESSAGEBOX_INFO, NEUTRINO_ICON_INFO); - info->setSelected(selected); + CMenuWidget *info = new CMenuWidget(LOCALE_MESSAGEBOX_INFO, NEUTRINO_ICON_INFO, width, MN_WIDGET_ID_INFOMENUE); info->addIntroItems(); info->addItem(new CMenuForwarder(LOCALE_SERVICEMENU_IMAGEINFO, true, NULL, new CImageInfo(), NULL, CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED ), false); @@ -79,7 +75,6 @@ int CInfoMenu::showMenu() int res = info->exec(NULL, ""); info->hide(); - selected = info->getSelected(); delete info; return res; } diff --git a/src/gui/info_menue.h b/src/gui/info_menue.h index e530d112a..33cab3b40 100644 --- a/src/gui/info_menue.h +++ b/src/gui/info_menue.h @@ -38,7 +38,7 @@ class CInfoMenu : public CMenuTarget { private: - int width, selected; + int width; int showMenu(); diff --git a/src/neutrino_menue.h b/src/neutrino_menue.h index 34449a0d3..aa716220d 100644 --- a/src/neutrino_menue.h +++ b/src/neutrino_menue.h @@ -119,6 +119,9 @@ enum MN_WIDGET_ID //cec setup MN_WIDGET_ID_CEC, + //infomenue + MN_WIDGET_ID_INFOMENUE, + MN_WIDGET_ID_MAX };