- infoviewer_bb: small renamings to get more logic in function names

showOne_CAIcon()     => showIcon_CA()
paint_ca_icons()     => paint_ca_icon()
showIcon_CA_Status() => paint_ca_icons()

 Conflicts:
	src/gui/infoviewer.cpp
	src/gui/infoviewer_bb.cpp

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2017-12-13 09:39:12 +01:00
committed by Thilo Graf
parent 2f5f5f70c3
commit ce0aa768b9
3 changed files with 23 additions and 21 deletions

View File

@@ -1110,7 +1110,7 @@ void CInfoViewer::loop(bool show_dot)
showRadiotext(); showRadiotext();
infoViewerBB->showIcon_16_9(); infoViewerBB->showIcon_16_9();
//infoViewerBB->showIcon_CA_Status(0); //infoViewerBB->paint_ca_icons(0);
infoViewerBB->showIcon_Resolution(); infoViewerBB->showIcon_Resolution();
} else if ((msg == NeutrinoMessages::EVT_RECORDMODE) && } else if ((msg == NeutrinoMessages::EVT_RECORDMODE) &&
(CMoviePlayerGui::getInstance().timeshift) && (CRecordManager::getInstance()->GetRecordCount() == 1)) { (CMoviePlayerGui::getInstance().timeshift) && (CRecordManager::getInstance()->GetRecordCount() == 1)) {
@@ -1412,9 +1412,9 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
} else if (msg == NeutrinoMessages::EVT_ZAP_GOTPIDS) { } else if (msg == NeutrinoMessages::EVT_ZAP_GOTPIDS) {
if ((*(t_channel_id *) data) == current_channel_id) { if ((*(t_channel_id *) data) == current_channel_id) {
if (is_visible && showButtonBar) { if (is_visible && showButtonBar) {
//infoViewerBB->paint_ca_icons(0);
infoViewerBB->showIcon_VTXT(); infoViewerBB->showIcon_VTXT();
infoViewerBB->showIcon_SubT(); infoViewerBB->showIcon_SubT();
//infoViewerBB->showIcon_CA_Status(0);
infoViewerBB->showIcon_Resolution(); infoViewerBB->showIcon_Resolution();
infoViewerBB->showIcon_Tuner(); infoViewerBB->showIcon_Tuner();
} }
@@ -1429,7 +1429,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
//chanready = 1; //chanready = 1;
showSNR (); showSNR ();
if (is_visible && showButtonBar) if (is_visible && showButtonBar)
infoViewerBB->showIcon_CA_Status(0); infoViewerBB->paint_ca_icons(0);
//Set_CA_Status (data); //Set_CA_Status (data);
return messages_return::handled; return messages_return::handled;
} else if (msg == NeutrinoMessages::EVT_TIMER) { } else if (msg == NeutrinoMessages::EVT_TIMER) {
@@ -2077,7 +2077,7 @@ void CInfoViewer::killTitle()
void CInfoViewer::Set_CA_Status (int /*Status*/) void CInfoViewer::Set_CA_Status (int /*Status*/)
{ {
if (is_visible && showButtonBar) if (is_visible && showButtonBar)
infoViewerBB->showIcon_CA_Status(1); infoViewerBB->paint_ca_icons(1);
} }
#endif #endif
/****************************************************************************** /******************************************************************************

View File

@@ -450,15 +450,16 @@ void CInfoViewerBB::paintshowButtonBar(bool noTimer/*=false*/)
// Buttons // Buttons
showBBButtons(); showBBButtons();
#if 0
scrambledCheck(true);
#endif
paint_ca_icons(0);
// Icons, starting from right // Icons, starting from right
showIcon_SubT(); showIcon_SubT();
showIcon_VTXT(); showIcon_VTXT();
showIcon_DD(); showIcon_DD();
showIcon_16_9(); showIcon_16_9();
#if 0
scrambledCheck(true);
#endif
showIcon_CA_Status(0);
showIcon_Resolution(); showIcon_Resolution();
showIcon_Tuner(); showIcon_Tuner();
showSysfsHdd(); showSysfsHdd();
@@ -626,7 +627,7 @@ void CInfoViewerBB::showIcon_Resolution()
showBBIcons(CInfoViewerBB::ICON_RES, icon_name); showBBIcons(CInfoViewerBB::ICON_RES, icon_name);
} }
void CInfoViewerBB::showOne_CAIcon() void CInfoViewerBB::showIcon_CA()
{ {
std::string sIcon = ""; std::string sIcon = "";
#if 0 #if 0
@@ -718,7 +719,7 @@ void CInfoViewerBB::showBarHdd(int percent)
} }
} }
void CInfoViewerBB::paint_ca_icons(int caid, const char *icon, int &icon_space_offset) void CInfoViewerBB::paint_ca_icon(int caid, const char *icon, int &icon_space_offset)
{ {
char buf[20]; char buf[20];
int endx = g_InfoViewer->BoxEndX - OFFSET_INNER_MID - (g_settings.infobar_casystem_frame ? FRAME_WIDTH_MIN + OFFSET_INNER_SMALL : 0); int endx = g_InfoViewer->BoxEndX - OFFSET_INNER_MID - (g_settings.infobar_casystem_frame ? FRAME_WIDTH_MIN + OFFSET_INNER_SMALL : 0);
@@ -784,14 +785,15 @@ void CInfoViewerBB::paint_ca_icons(int caid, const char *icon, int &icon_space_o
} }
} }
void CInfoViewerBB::showIcon_CA_Status(int notfirst) void CInfoViewerBB::paint_ca_icons(int notfirst)
{ {
if (g_settings.infobar_casystem_display == 3) if (g_settings.infobar_casystem_display == 3)
return; return;
if(NeutrinoModes::mode_ts == CNeutrinoApp::getInstance()->getMode() && !CMoviePlayerGui::getInstance().timeshift){ if(NeutrinoModes::mode_ts == CNeutrinoApp::getInstance()->getMode() && !CMoviePlayerGui::getInstance().timeshift){
if (g_settings.infobar_casystem_display == 2) { if (g_settings.infobar_casystem_display == 2) {
fta = true; fta = true;
showOne_CAIcon(); showIcon_CA();
} }
return; return;
} }
@@ -805,11 +807,11 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst)
if(!g_InfoViewer->chanready) { if(!g_InfoViewer->chanready) {
if (g_settings.infobar_casystem_display == 2) { if (g_settings.infobar_casystem_display == 2) {
fta = true; fta = true;
showOne_CAIcon(); showIcon_CA();
} }
else if(g_settings.infobar_casystem_display == 0) { else if(g_settings.infobar_casystem_display == 0) {
for (int i = 0; i < (int)(sizeof(caids)/sizeof(int)); i++) { for (int i = 0; i < (int)(sizeof(caids)/sizeof(int)); i++) {
paint_ca_icons(caids[i], white, icon_space_offset); paint_ca_icon(caids[i], white, icon_space_offset);
} }
} }
return; return;
@@ -821,7 +823,7 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst)
if (g_settings.infobar_casystem_display == 2) { if (g_settings.infobar_casystem_display == 2) {
fta = channel->camap.empty(); fta = channel->camap.empty();
showOne_CAIcon(); showIcon_CA();
return; return;
} }
@@ -836,9 +838,9 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst)
break; break;
} }
if(g_settings.infobar_casystem_display == 0) if(g_settings.infobar_casystem_display == 0)
paint_ca_icons(caids[i], (found ? yellow : white), icon_space_offset); paint_ca_icon(caids[i], (found ? yellow : white), icon_space_offset);
else if(found) else if(found)
paint_ca_icons(caids[i], yellow, icon_space_offset); paint_ca_icon(caids[i], yellow, icon_space_offset);
} }
} }
} }
@@ -964,7 +966,7 @@ void CInfoViewerBB::scrambledCheck(bool force)
} }
if ((scrambledErr != scrambledErrSave) || (scrambledNoSig != scrambledNoSigSave) || force) { if ((scrambledErr != scrambledErrSave) || (scrambledNoSig != scrambledNoSigSave) || force) {
showIcon_CA_Status(0); paint_ca_icons(0);
showIcon_Resolution(); showIcon_Resolution();
scrambledErrSave = scrambledErr; scrambledErrSave = scrambledErr;
scrambledNoSigSave = scrambledNoSig; scrambledNoSigSave = scrambledNoSig;

View File

@@ -112,9 +112,8 @@ class CInfoViewerBB
void getBBIconInfo(void); void getBBIconInfo(void);
bool checkBBIcon(const char * const icon, int *w, int *h); bool checkBBIcon(const char * const icon, int *w, int *h);
void paint_ca_icons(int, const char*, int&); void paint_ca_icon(int, const char*, int&);
void paint_ca_bar(); void paint_ca_bar();
void showOne_CAIcon();
static void* scrambledThread(void *arg); static void* scrambledThread(void *arg);
void scrambledCheck(bool force=false); void scrambledCheck(bool force=false);
@@ -132,8 +131,8 @@ class CInfoViewerBB
int bottom_bar_offset, InfoHeightY_Info; int bottom_bar_offset, InfoHeightY_Info;
bool is_visible; bool is_visible;
void paint_ca_icons(int);
void showSysfsHdd(void); void showSysfsHdd(void);
void showIcon_CA_Status(int);
void showIcon_16_9(); void showIcon_16_9();
void showIcon_RadioText(bool rt_available); void showIcon_RadioText(bool rt_available);
void showIcon_VTXT(); void showIcon_VTXT();
@@ -141,6 +140,7 @@ class CInfoViewerBB
void showIcon_Resolution(); void showIcon_Resolution();
void showIcon_Tuner(void); void showIcon_Tuner(void);
void showIcon_DD(void); void showIcon_DD(void);
void showIcon_CA();
void showBBButtons(bool paintFooter = false); void showBBButtons(bool paintFooter = false);
void paintshowButtonBar(bool noTimer = false); void paintshowButtonBar(bool noTimer = false);
void getBBButtonInfo(void); void getBBButtonInfo(void);