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

@@ -163,7 +163,8 @@ void CInfoViewerBB::getBBIconInfo()
break;
#endif
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;
case CInfoViewerBB::ICON_16_9: //no radio
if (neutrino->getMode() != NeutrinoMessages::mode_radio)
@@ -414,14 +415,14 @@ void CInfoViewerBB::showIcon_VTXT()
void CInfoViewerBB::showIcon_DD()
{
if (!is_visible)
if (!is_visible || !g_settings.infobar_show_dd_available)
return;
std::string dd_icon;
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))
dd_icon = NEUTRINO_ICON_DD;
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);
}