- infoviewer_bb: remove broken code around left/right handling in ca_bar

This code wasn't used anymore since years.
This commit is contained in:
svenhoefer
2016-12-12 11:15:14 +01:00
parent 6b4ef6d3f8
commit aa9417a550
2 changed files with 29 additions and 51 deletions

View File

@@ -88,7 +88,8 @@ CInfoViewerBB::CInfoViewerBB()
bbIconInfo[0].h = 0;
BBarY = 0;
BBarFontY = 0;
foot = cabar = NULL;
foot = NULL;
ca_bar = NULL;
Init();
}
@@ -465,7 +466,7 @@ void CInfoViewerBB::paintshowButtonBar()
g_InfoViewer->sec_timer_id = g_RCInput->addTimer(1*1000*1000, false);
if (g_settings.infobar_casystem_display < 2)
paintCA_bar(0,0);
paint_ca_bar();
paintFoot();
@@ -830,13 +831,6 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst)
}
if(!notfirst) {
#if 0
static int icon_space_offset = 0;
if ((g_settings.infobar_casystem_display == 1) && (icon_space_offset)) {
paintCA_bar(0,icon_space_offset);
icon_space_offset = 0;
}
#endif
for (int i = 0; i < (int)(sizeof(caids)/sizeof(int)); i++) {
bool found = false;
for(casys_map_iterator_t it = channel->camap.begin(); it != channel->camap.end(); ++it) {
@@ -854,52 +848,36 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst)
}
}
void CInfoViewerBB::paintCA_bar(int left, int right)
void CInfoViewerBB::paint_ca_bar()
{
initBBOffset();
int xcnt = (g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - (g_settings.infobar_casystem_frame ? 24 : 0)) / 4;
int ycnt = (bottom_bar_offset - (g_settings.infobar_casystem_frame ? 14 : 0)) / 4;
int ca_width = g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX;
if (right)
right = xcnt - ((right/4)+1);
if (left)
left = xcnt - ((left/4)-1);
if (g_settings.infobar_casystem_frame) { // with highlighted frame
if (!right || !left) { // paint full bar
// framed ca bar
if (cabar == NULL)
cabar = new CComponentsShapeSquare(g_InfoViewer->ChanInfoX+11, g_InfoViewer->BoxEndY+1, ca_width-22 , bottom_bar_offset-11 , NULL, CC_SHADOW_ON, COL_INFOBAR_CASYSTEM_PLUS_2, COL_INFOBAR_CASYSTEM_PLUS_0);
//cabar->setCorner(RADIUS_SMALL, CORNER_ALL);
cabar->enableShadow(CC_SHADOW_ON, 3, true);
cabar->setFrameThickness(2);
// cabar->paint(CC_SAVE_SCREEN_NO);
}else{ //TODO: remove this part, cabar object can do this
if (cabar == NULL)
cabar = new CComponentsShapeSquare(g_InfoViewer->ChanInfoX, g_InfoViewer->BoxEndY, ca_width , bottom_bar_offset-11, NULL, CC_SHADOW_OFF, COL_INFOBAR_CASYSTEM_PLUS_2);
//cabar->setCorner(RADIUS_SMALL, CORNER_ALL);
cabar->disableShadow();
cabar->setFrameThickness(2);
cabar->setColorBody(COL_INFOBAR_CASYSTEM_PLUS_0);
}
cabar->setFrameThickness(2);
cabar->setCorner(RADIUS_SMALL, CORNER_ALL);
cabar->paint(CC_SAVE_SCREEN_NO);
if (g_settings.infobar_casystem_frame)
{
if (ca_bar == NULL)
ca_bar = new CComponentsShapeSquare(g_InfoViewer->ChanInfoX + OFFSET_INNER_MID, g_InfoViewer->BoxEndY, ca_width - 2*OFFSET_INNER_MID, bottom_bar_offset - OFFSET_INNER_MID, NULL, CC_SHADOW_ON, COL_INFOBAR_CASYSTEM_PLUS_2, COL_INFOBAR_CASYSTEM_PLUS_0);
ca_bar->enableShadow(CC_SHADOW_ON, OFFSET_SHADOW/2, true);
ca_bar->setFrameThickness(2);
ca_bar->setCorner(RADIUS_SMALL, CORNER_ALL);
ca_bar->paint(CC_SAVE_SCREEN_NO);
}
else
{
paintBoxRel(g_InfoViewer->ChanInfoX, g_InfoViewer->BoxEndY, ca_width , bottom_bar_offset, COL_INFOBAR_CASYSTEM_PLUS_0);
}
#if 1
if (!g_settings.infobar_casystem_dotmatrix) //don't show dotmatrix
return;
if (g_settings.infobar_casystem_dotmatrix)
{
int xcnt = (g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX - (g_settings.infobar_casystem_frame ? 24 : 0)) / 4;
int ycnt = (bottom_bar_offset - (g_settings.infobar_casystem_frame ? 14 : 0)) / 4;
if (left)
left -= 1;
for (int i = 0 + right; i < xcnt - left; i++) {
for (int j = 0; j < ycnt; j++) {
frameBuffer->paintBoxRel((g_InfoViewer->ChanInfoX + (g_settings.infobar_casystem_frame ? 14 : 2)) + i*4, g_InfoViewer->BoxEndY + (g_settings.infobar_casystem_frame ? 4 : 2) + j*4, 2, 2, COL_INFOBAR_PLUS_1);
for (int i = 0; i < xcnt; i++)
{
for (int j = 0; j < ycnt; j++)
{
frameBuffer->paintBoxRel((g_InfoViewer->ChanInfoX + (g_settings.infobar_casystem_frame ? 14 : 2)) + i*4, g_InfoViewer->BoxEndY + (g_settings.infobar_casystem_frame ? 4 : 2) + j*4, 2, 2, COL_INFOBAR_PLUS_1);
}
}
}
#endif
@@ -937,8 +915,8 @@ void CInfoViewerBB::ResetModules()
if (foot){
delete foot; foot = NULL;
}
if (cabar){
delete cabar; cabar = NULL;
if (ca_bar){
delete ca_bar; ca_bar = NULL;
}
}

View File

@@ -108,14 +108,14 @@ class CInfoViewerBB
pthread_t scrambledT;
CProgressBar *hddscale, *sysscale;
CComponentsShapeSquare *foot, *cabar;
CComponentsShapeSquare *foot, *ca_bar;
void paintFoot(int w = 0);
void showBBIcons(const int modus, const std::string & icon);
void getBBIconInfo(void);
bool checkBBIcon(const char * const icon, int *w, int *h);
void paint_ca_icons(int, const char*, int&);
void paintCA_bar(int,int);
void paint_ca_bar();
void showOne_CAIcon();
static void* scrambledThread(void *arg);
@@ -150,7 +150,7 @@ class CInfoViewerBB
void initBBOffset(void);
// modules
CComponentsShapeSquare* getFooter(void){return foot;}
CComponentsShapeSquare* getCABar(void){return cabar;}
CComponentsShapeSquare* getCABar(void){return ca_bar;}
void ResetModules(void);
void changePB(void);
};