mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
Close all on menu key; allow sat and fav keys
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1892 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: ba0e9b61e4
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2011-11-25 (Fri, 25 Nov 2011)
This commit is contained in:
@@ -123,15 +123,17 @@ int CStreamInfo2::exec (CMenuTarget * parent, const std::string &)
|
|||||||
parent->hide ();
|
parent->hide ();
|
||||||
|
|
||||||
paint (paint_mode);
|
paint (paint_mode);
|
||||||
doSignalStrengthLoop ();
|
int res = doSignalStrengthLoop ();
|
||||||
hide ();
|
hide ();
|
||||||
return menu_return::RETURN_REPAINT;
|
//return menu_return::RETURN_REPAINT;
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
int CStreamInfo2::doSignalStrengthLoop ()
|
int CStreamInfo2::doSignalStrengthLoop ()
|
||||||
{
|
{
|
||||||
#define BAR_WIDTH 150
|
#define BAR_WIDTH 150
|
||||||
#define BAR_HEIGHT 12
|
#define BAR_HEIGHT 12
|
||||||
|
int res = menu_return::RETURN_REPAINT;
|
||||||
sigscale = new CProgressBar(true, BAR_WIDTH, BAR_HEIGHT);
|
sigscale = new CProgressBar(true, BAR_WIDTH, BAR_HEIGHT);
|
||||||
snrscale = new CProgressBar(true, BAR_WIDTH, BAR_HEIGHT);
|
snrscale = new CProgressBar(true, BAR_WIDTH, BAR_HEIGHT);
|
||||||
lastsnr = lastsig = -1;
|
lastsnr = lastsig = -1;
|
||||||
@@ -185,6 +187,7 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
|||||||
rate.max_short_average = maxb = bit_s;
|
rate.max_short_average = maxb = bit_s;
|
||||||
if ((cnt > 10) && ((minb == 0) || (minb > bit_s)))
|
if ((cnt > 10) && ((minb == 0) || (minb > bit_s)))
|
||||||
rate.min_short_average = minb = bit_s;
|
rate.min_short_average = minb = bit_s;
|
||||||
|
|
||||||
sprintf(tmp_str, "%s:",g_Locale->getText(LOCALE_STREAMINFO_BITRATE));
|
sprintf(tmp_str, "%s:",g_Locale->getText(LOCALE_STREAMINFO_BITRATE));
|
||||||
g_Font[font_info]->RenderString(dx1 , average_bitrate_pos, offset+10, tmp_str, COL_INFOBAR, 0, true);
|
g_Font[font_info]->RenderString(dx1 , average_bitrate_pos, offset+10, tmp_str, COL_INFOBAR, 0, true);
|
||||||
sprintf(currate, "%5llu.%02llu", rate.short_average / 1000ULL, rate.short_average % 1000ULL);
|
sprintf(currate, "%5llu.%02llu", rate.short_average / 1000ULL, rate.short_average % 1000ULL);
|
||||||
@@ -241,6 +244,16 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
|||||||
paint (paint_mode);
|
paint (paint_mode);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if(msg == CRCInput::RC_setup) {
|
||||||
|
res = menu_return::RETURN_EXIT_ALL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites)) {
|
||||||
|
g_RCInput->postMsg (msg, 0);
|
||||||
|
res = menu_return::RETURN_EXIT_ALL;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// -- any key --> abort
|
// -- any key --> abort
|
||||||
if (msg <= CRCInput::RC_MaxRC) {
|
if (msg <= CRCInput::RC_MaxRC) {
|
||||||
break;
|
break;
|
||||||
@@ -259,7 +272,7 @@ int CStreamInfo2::doSignalStrengthLoop ()
|
|||||||
snrscale = NULL;
|
snrscale = NULL;
|
||||||
}
|
}
|
||||||
ts_close ();
|
ts_close ();
|
||||||
return msg;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CStreamInfo2::hide ()
|
void CStreamInfo2::hide ()
|
||||||
|
Reference in New Issue
Block a user