fix streaminfo menu handler (patch by snafed)

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1687 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 99894a26d1
Author: gixxpunk <thomas.harfmann@gmail.com>
Date: 2011-09-12 (Mon, 12 Sep 2011)

Origin message was:
------------------
- fix streaminfo menu handler (patch by snafed)

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1687 e54a6e83-5905-42d5-8d5c-058d10e6a962


------------------
This commit was generated by Migit
This commit is contained in:
gixxpunk
2011-09-12 16:04:49 +00:00
parent d24741104a
commit 0f627b9e56
3 changed files with 11 additions and 13 deletions

View File

@@ -58,10 +58,10 @@ int CInfoMenu::exec(CMenuTarget* parent, const std::string &/*actionKey*/)
{ {
printf("[neutrino] CInfoMenu %s: init...\n",__FUNCTION__); printf("[neutrino] CInfoMenu %s: init...\n",__FUNCTION__);
int res = menu_return::RETURN_REPAINT; int res = menu_return::RETURN_REPAINT;
if (parent != NULL) if (parent != NULL)
parent->hide(); parent->hide();
showMenu(); showMenu();
return res; return res;
@@ -79,8 +79,8 @@ void CInfoMenu::showMenu()
info->addIntroItems(); 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_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_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->addItem(new CMenuForwarder(LOCALE_STREAMINFO_HEAD, true, NULL, new CStreamInfo2(), NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
info->exec(NULL, ""); info->exec(NULL, "");
info->hide(); info->hide();
selected = info->getSelected(); selected = info->getSelected();

View File

@@ -109,13 +109,11 @@ CStreamInfo2::~CStreamInfo2 ()
ts_close(); ts_close();
} }
int CStreamInfo2::exec() void CStreamInfo2::exec()
{ {
paint(paint_mode); paint(paint_mode);
doSignalStrengthLoop(); doSignalStrengthLoop();
hide(); hide();
return menu_return::RETURN_EXIT_ALL;
} }
int CStreamInfo2::exec (CMenuTarget * parent, const std::string &) int CStreamInfo2::exec (CMenuTarget * parent, const std::string &)
@@ -127,7 +125,7 @@ int CStreamInfo2::exec (CMenuTarget * parent, const std::string &)
paint (paint_mode); paint (paint_mode);
doSignalStrengthLoop (); doSignalStrengthLoop ();
hide (); hide ();
return menu_return::RETURN_EXIT_ALL; return menu_return::RETURN_REPAINT;
} }
int CStreamInfo2::doSignalStrengthLoop () int CStreamInfo2::doSignalStrengthLoop ()
@@ -199,7 +197,7 @@ int CStreamInfo2::doSignalStrengthLoop ()
if(snrscale && sigscale) if(snrscale && sigscale)
showSNR (); showSNR ();
if(pmt_version != current_pmt_version && delay_counter > delay){ if(pmt_version != current_pmt_version && delay_counter > delay){
current_pmt_version = pmt_version; current_pmt_version = pmt_version;
paint_techinfo (x + 10, y+ hheight +5); paint_techinfo (x + 10, y+ hheight +5);
} }
delay_counter++; delay_counter++;
@@ -282,7 +280,7 @@ void CStreamInfo2::paint_signal_fe_box(int _x, int _y, int w, int h)
int y1; int y1;
int xd = w/4; int xd = w/4;
std::string tuner_name = g_Locale->getText(LOCALE_STREAMINFO_SIGNAL); std::string tuner_name = g_Locale->getText(LOCALE_STREAMINFO_SIGNAL);
tuner_name += ": "; tuner_name += ": ";
tuner_name += CFrontend::getInstance()->getInfo()->name; tuner_name += CFrontend::getInstance()->getInfo()->name;
g_Font[font_small]->RenderString(_x, _y+iheight+15, width-10, tuner_name.c_str(), COL_INFOBAR, 0, true); g_Font[font_small]->RenderString(_x, _y+iheight+15, width-10, tuner_name.c_str(), COL_INFOBAR, 0, true);
@@ -891,7 +889,7 @@ void CStreamInfo2::paintCASystem(int xpos, int ypos)
} }
} }
int spaceoffset = 0 ; int spaceoffset = 0 ;
for(i=0 ; i<11; i++){ for(i=0 ; i<11; i++){
if(caids[i] == true) if(caids[i] == true)
if(spaceoffset < array[i]) if(spaceoffset < array[i])
@@ -971,7 +969,7 @@ int CStreamInfo2::ts_setup ()
vpid = g_RemoteControl->current_PIDs.PIDs.vpid; vpid = g_RemoteControl->current_PIDs.PIDs.vpid;
if(g_RemoteControl->current_PIDs.APIDs.size() > 0) if(g_RemoteControl->current_PIDs.APIDs.size() > 0)
apid = g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid; apid = g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].pid;
if(vpid == 0 && apid == 0) if(vpid == 0 && apid == 0)
return -1; return -1;

View File

@@ -103,7 +103,7 @@ class CStreamInfo2 : public CMenuTarget
CStreamInfo2(); CStreamInfo2();
~CStreamInfo2(); ~CStreamInfo2();
int exec(); void exec();
void hide(); void hide();
int exec(CMenuTarget* parent, const std::string & actionKey); int exec(CMenuTarget* parent, const std::string & actionKey);