infoviewer: displaying dd availability is now optional -fix

Origin commit data
------------------
Commit: 9f1904a71d
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-06-22 (Fri, 22 Jun 2012)
This commit is contained in:
Jacek Jendrzej
2012-06-22 19:36:38 +02:00
parent 51df80ab7a
commit b84697acc9
2 changed files with 5 additions and 4 deletions

View File

@@ -453,7 +453,7 @@ void CRemoteControl::getNVODs()
void CRemoteControl::processAPIDnames() void CRemoteControl::processAPIDnames()
{ {
has_unresolved_ctags= false; has_unresolved_ctags= false;
has_ac3 = false; //FIXME what this variable suppoused to do ?? seems unused has_ac3 = false; //use in infoviewer
int pref_found = -1; int pref_found = -1;
int pref_ac3_found = -1; int pref_ac3_found = -1;
int pref_idx = -1; int pref_idx = -1;

View File

@@ -163,7 +163,8 @@ void CInfoViewerBB::getBBIconInfo()
break; break;
#endif #endif
case CInfoViewerBB::ICON_DD: case CInfoViewerBB::ICON_DD:
iconView = checkBBIcon(NEUTRINO_ICON_DD, &w, &h); if( g_settings.infobar_show_dd_available )
iconView = checkBBIcon(NEUTRINO_ICON_DD, &w, &h);
break; break;
case CInfoViewerBB::ICON_16_9: //no radio case CInfoViewerBB::ICON_16_9: //no radio
if (neutrino->getMode() != NeutrinoMessages::mode_radio) if (neutrino->getMode() != NeutrinoMessages::mode_radio)
@@ -414,14 +415,14 @@ void CInfoViewerBB::showIcon_VTXT()
void CInfoViewerBB::showIcon_DD() void CInfoViewerBB::showIcon_DD()
{ {
if (!is_visible) if (!is_visible || !g_settings.infobar_show_dd_available)
return; return;
std::string dd_icon; std::string dd_icon;
if ((g_RemoteControl->current_PIDs.PIDs.selected_apid < g_RemoteControl->current_PIDs.APIDs.size()) && if ((g_RemoteControl->current_PIDs.PIDs.selected_apid < g_RemoteControl->current_PIDs.APIDs.size()) &&
(g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].is_ac3)) (g_RemoteControl->current_PIDs.APIDs[g_RemoteControl->current_PIDs.PIDs.selected_apid].is_ac3))
dd_icon = NEUTRINO_ICON_DD; dd_icon = NEUTRINO_ICON_DD;
else else
dd_icon = (g_settings.infobar_show_dd_available && g_RemoteControl->has_ac3) ? NEUTRINO_ICON_DD_AVAIL : NEUTRINO_ICON_DD_GREY; dd_icon = g_RemoteControl->has_ac3 ? NEUTRINO_ICON_DD_AVAIL : NEUTRINO_ICON_DD_GREY;
showBBIcons(CInfoViewerBB::ICON_DD, dd_icon); showBBIcons(CInfoViewerBB::ICON_DD, dd_icon);
} }