From 9fd2136a57f7e906661bcd046c724b2a5a0eb2a2 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 25 Nov 2011 09:58:24 +0000 Subject: [PATCH] Return menu result git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1893 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/cefd76754da74f47acc015f4ac980010d5b2c2e5 Author: [CST] Focus Date: 2011-11-25 (Fri, 25 Nov 2011) --- src/gui/info_menue.cpp | 13 ++++--------- src/gui/info_menue.h | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/gui/info_menue.cpp b/src/gui/info_menue.cpp index bf76991a4..04ecae070 100644 --- a/src/gui/info_menue.cpp +++ b/src/gui/info_menue.cpp @@ -40,14 +40,12 @@ #include - CInfoMenu::CInfoMenu() { width = w_max (40, 10); selected = -1; } - CInfoMenu::~CInfoMenu() { @@ -62,14 +60,12 @@ int CInfoMenu::exec(CMenuTarget* parent, const std::string &/*actionKey*/) if (parent != NULL) parent->hide(); - showMenu(); + res = showMenu(); return res; } - - -void CInfoMenu::showMenu() +int CInfoMenu::showMenu() { printf("[neutrino] CInfoMenu call %s...\n", __FUNCTION__); @@ -81,11 +77,10 @@ void CInfoMenu::showMenu() 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 CStreamInfo2(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW)); - info->exec(NULL, ""); + 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 597e58be5..e530d112a 100644 --- a/src/gui/info_menue.h +++ b/src/gui/info_menue.h @@ -40,7 +40,7 @@ class CInfoMenu : public CMenuTarget private: int width, selected; - void showMenu(); + int showMenu(); public: CInfoMenu();