mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
show infobar with colored freq after SDT freq update
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@2150 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: e7f4a0a9cc
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-03-15 (Thu, 15 Mar 2012)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -116,6 +116,7 @@ void CInfoViewer::Init()
|
|||||||
newfreq = true;
|
newfreq = true;
|
||||||
chanready = 1;
|
chanready = 1;
|
||||||
fileplay = 0;
|
fileplay = 0;
|
||||||
|
SDT_freq_update = false;
|
||||||
|
|
||||||
/* maybe we should not tie this to the blinkenlights settings? */
|
/* maybe we should not tie this to the blinkenlights settings? */
|
||||||
if (g_settings.casystem_display < 2)
|
if (g_settings.casystem_display < 2)
|
||||||
@@ -1533,16 +1534,15 @@ void CInfoViewer::showSNR ()
|
|||||||
return;
|
return;
|
||||||
char percent[10];
|
char percent[10];
|
||||||
uint16_t ssig, ssnr;
|
uint16_t ssig, ssnr;
|
||||||
|
|
||||||
/* right now, infobar_show_channellogo == 3 is the trigger for signal bars etc.
|
/* right now, infobar_show_channellogo == 3 is the trigger for signal bars etc.
|
||||||
TODO: decouple this */
|
TODO: decouple this */
|
||||||
if (! fileplay && ( g_settings.infobar_show_channellogo == 3 || g_settings.infobar_show_channellogo == 5 || g_settings.infobar_show_channellogo == 6 )) {
|
if (! fileplay && ( g_settings.infobar_show_channellogo == 3 || g_settings.infobar_show_channellogo == 5 || g_settings.infobar_show_channellogo == 6 )) {
|
||||||
int chanH = g_SignalFont->getHeight();
|
int chanH = g_SignalFont->getHeight();
|
||||||
int freqStartY = BoxStartY + 2 * chanH - 3;
|
int freqStartY = BoxStartY + 2 * chanH - 3;
|
||||||
if (newfreq && chanready) {
|
if ((newfreq && chanready) || SDT_freq_update) {
|
||||||
char freq[20];
|
char freq[20];
|
||||||
|
|
||||||
newfreq = false;
|
newfreq = false;
|
||||||
|
|
||||||
CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo ();
|
CZapitClient::CCurrentServiceInfo si = g_Zapit->getCurrentServiceInfo ();
|
||||||
std::string polarisation;
|
std::string polarisation;
|
||||||
if (g_info.delivery_system == DVB_S)
|
if (g_info.delivery_system == DVB_S)
|
||||||
@@ -1552,7 +1552,8 @@ void CInfoViewer::showSNR ()
|
|||||||
snprintf (freq, sizeof(freq), "%d.%d MHz %s", si.tsfrequency / 1000, si.tsfrequency % 1000, polarisation.c_str());
|
snprintf (freq, sizeof(freq), "%d.%d MHz %s", si.tsfrequency / 1000, si.tsfrequency % 1000, polarisation.c_str());
|
||||||
|
|
||||||
int satNameWidth = g_SignalFont->getRenderWidth (freq);
|
int satNameWidth = g_SignalFont->getRenderWidth (freq);
|
||||||
g_SignalFont->RenderString (3 + BoxStartX + ((ChanWidth - satNameWidth) / 2), BoxStartY + 2 * chanH - 3, satNameWidth, freq, COL_INFOBAR);
|
g_SignalFont->RenderString (3 + BoxStartX + ((ChanWidth - satNameWidth) / 2), BoxStartY + 2 * chanH - 3, satNameWidth, freq, SDT_freq_update ? COL_COLORED_EVENTS_INFOBAR:COL_INFOBAR);
|
||||||
|
SDT_freq_update = false;
|
||||||
}
|
}
|
||||||
int sw, snr, sig, posx, posy;
|
int sw, snr, sig, posx, posy;
|
||||||
int height;
|
int height;
|
||||||
|
@@ -185,6 +185,7 @@ class CInfoViewer
|
|||||||
int handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data);
|
int handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data);
|
||||||
void clearVirtualZapMode() {virtual_zap_mode = false;}
|
void clearVirtualZapMode() {virtual_zap_mode = false;}
|
||||||
void changePB();
|
void changePB();
|
||||||
|
bool SDT_freq_update;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CInfoViewerHandler : public CMenuTarget
|
class CInfoViewerHandler : public CMenuTarget
|
||||||
|
@@ -2870,6 +2870,11 @@ _repeat:
|
|||||||
}
|
}
|
||||||
else if (msg == NeutrinoMessages::EVT_SERVICES_UPD) {
|
else if (msg == NeutrinoMessages::EVT_SERVICES_UPD) {
|
||||||
SDTreloadChannels = true;
|
SDTreloadChannels = true;
|
||||||
|
g_InfoViewer->SDT_freq_update = true;
|
||||||
|
if( !g_InfoViewer->is_visible && !autoshift){
|
||||||
|
g_RCInput->postMsg(NeutrinoMessages::SHOW_INFOBAR , 0);
|
||||||
|
}
|
||||||
|
return messages_return::handled;
|
||||||
// ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_EXTRA_ZAPIT_SDT_CHANGED),
|
// ShowHintUTF(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_EXTRA_ZAPIT_SDT_CHANGED),
|
||||||
// CMessageBox::mbrBack,CMessageBox::mbBack, NEUTRINO_ICON_INFO);
|
// CMessageBox::mbrBack,CMessageBox::mbBack, NEUTRINO_ICON_INFO);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user