From a6769b1cfc733e06c683f1a6b3e6c32696db2ae7 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 23 Nov 2013 00:22:12 +0100 Subject: [PATCH] infoviewer_bb: enable radiotext-icons Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/68bb453a35a9be909803d1afcc07604072164fe1 Author: vanhofen Date: 2013-11-23 (Sat, 23 Nov 2013) Origin message was: ------------------ - infoviewer_bb: enable radiotext-icons --- src/gui/infoviewer_bb.cpp | 26 ++++++++++---------------- src/gui/widget/icons.h | 3 +++ 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 305d57939..362a22af9 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -62,7 +62,6 @@ extern CRemoteControl *g_RemoteControl; /* neutrino.cpp */ extern cVideo * videoDecoder; -//#define SHOW_RADIOTEXT_ICON #define COL_INFOBAR_BUTTONS_BACKGROUND (COL_INFOBAR_SHADOW_PLUS_1) CInfoViewerBB::CInfoViewerBB() @@ -173,12 +172,10 @@ void CInfoViewerBB::getBBIconInfo() if (neutrino->getMode() != NeutrinoMessages::mode_radio) iconView = checkBBIcon(NEUTRINO_ICON_VTXT, &w, &h); break; -#ifdef SHOW_RADIOTEXT_ICON case CInfoViewerBB::ICON_RT: if (neutrino->getMode() == NeutrinoMessages::mode_radio) - iconView = checkBBIcon(NEUTRINO_ICON_RT, &w, &h); + iconView = checkBBIcon(NEUTRINO_ICON_RADIOTEXTGET, &w, &h); break; -#endif case CInfoViewerBB::ICON_DD: if( g_settings.infobar_show_dd_available ) iconView = checkBBIcon(NEUTRINO_ICON_DD, &w, &h); @@ -478,22 +475,19 @@ void CInfoViewerBB::showIcon_DD() showBBIcons(CInfoViewerBB::ICON_DD, dd_icon); } -#ifdef SHOW_RADIOTEXT_ICON void CInfoViewerBB::showIcon_RadioText(bool rt_available) { - // TODO: display radiotext icon - if ((showButtonBar) && (is_visible)) - { - int mode = CNeutrinoApp::getInstance()->getMode(); + if (!is_visible || !g_settings.radiotext_enable) + return; - showBBIcons(CInfoViewerBB::ICON_RT, rt_icon); - } + std::string rt_icon; + if (rt_available) + rt_icon = (g_Radiotext->S_RtOsd) ? NEUTRINO_ICON_RADIOTEXTGET : NEUTRINO_ICON_RADIOTEXTWAIT; + else + rt_icon = NEUTRINO_ICON_RADIOTEXTOFF; + + showBBIcons(CInfoViewerBB::ICON_RT, rt_icon); } -#else -void CInfoViewerBB::showIcon_RadioText(bool /*rt_available*/) -{ -} -#endif void CInfoViewerBB::showIcon_16_9() { diff --git a/src/gui/widget/icons.h b/src/gui/widget/icons.h index c74164a90..772528232 100644 --- a/src/gui/widget/icons.h +++ b/src/gui/widget/icons.h @@ -110,6 +110,9 @@ #define NEUTRINO_ICON_FF "mp_f-skip" #define NEUTRINO_ICON_PROTECTING "protecting" #define NEUTRINO_ICON_QUESTION "question" +#define NEUTRINO_ICON_RADIOTEXTGET "radiotextget" +#define NEUTRINO_ICON_RADIOTEXTWAIT "radiotextwait" +#define NEUTRINO_ICON_RADIOTEXTOFF "radiotextoff" #define NEUTRINO_ICON_RADIOMODE "radiomode" #define NEUTRINO_ICON_RECORDING "recording" #define NEUTRINO_ICON_REC "rec"