mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 02:11:11 +02:00
- 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:
@@ -88,7 +88,8 @@ CInfoViewerBB::CInfoViewerBB()
|
|||||||
bbIconInfo[0].h = 0;
|
bbIconInfo[0].h = 0;
|
||||||
BBarY = 0;
|
BBarY = 0;
|
||||||
BBarFontY = 0;
|
BBarFontY = 0;
|
||||||
foot = cabar = NULL;
|
foot = NULL;
|
||||||
|
ca_bar = NULL;
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,7 +466,7 @@ void CInfoViewerBB::paintshowButtonBar()
|
|||||||
g_InfoViewer->sec_timer_id = g_RCInput->addTimer(1*1000*1000, false);
|
g_InfoViewer->sec_timer_id = g_RCInput->addTimer(1*1000*1000, false);
|
||||||
|
|
||||||
if (g_settings.infobar_casystem_display < 2)
|
if (g_settings.infobar_casystem_display < 2)
|
||||||
paintCA_bar(0,0);
|
paint_ca_bar();
|
||||||
|
|
||||||
paintFoot();
|
paintFoot();
|
||||||
|
|
||||||
@@ -830,13 +831,6 @@ void CInfoViewerBB::showIcon_CA_Status(int notfirst)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!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++) {
|
for (int i = 0; i < (int)(sizeof(caids)/sizeof(int)); i++) {
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for(casys_map_iterator_t it = channel->camap.begin(); it != channel->camap.end(); ++it) {
|
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();
|
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;
|
int ca_width = g_InfoViewer->BoxEndX - g_InfoViewer->ChanInfoX;
|
||||||
|
|
||||||
if (right)
|
if (g_settings.infobar_casystem_frame)
|
||||||
right = xcnt - ((right/4)+1);
|
{
|
||||||
if (left)
|
if (ca_bar == NULL)
|
||||||
left = xcnt - ((left/4)-1);
|
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);
|
||||||
if (g_settings.infobar_casystem_frame) { // with highlighted frame
|
ca_bar->setFrameThickness(2);
|
||||||
if (!right || !left) { // paint full bar
|
ca_bar->setCorner(RADIUS_SMALL, CORNER_ALL);
|
||||||
// framed ca bar
|
ca_bar->paint(CC_SAVE_SCREEN_NO);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
paintBoxRel(g_InfoViewer->ChanInfoX, g_InfoViewer->BoxEndY, ca_width , bottom_bar_offset, COL_INFOBAR_CASYSTEM_PLUS_0);
|
paintBoxRel(g_InfoViewer->ChanInfoX, g_InfoViewer->BoxEndY, ca_width , bottom_bar_offset, COL_INFOBAR_CASYSTEM_PLUS_0);
|
||||||
|
}
|
||||||
#if 1
|
#if 1
|
||||||
if (!g_settings.infobar_casystem_dotmatrix) //don't show dotmatrix
|
if (g_settings.infobar_casystem_dotmatrix)
|
||||||
return;
|
{
|
||||||
|
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)
|
for (int i = 0; i < xcnt; i++)
|
||||||
left -= 1;
|
{
|
||||||
|
for (int j = 0; j < ycnt; j++)
|
||||||
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);
|
||||||
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
|
#endif
|
||||||
@@ -937,8 +915,8 @@ void CInfoViewerBB::ResetModules()
|
|||||||
if (foot){
|
if (foot){
|
||||||
delete foot; foot = NULL;
|
delete foot; foot = NULL;
|
||||||
}
|
}
|
||||||
if (cabar){
|
if (ca_bar){
|
||||||
delete cabar; cabar = NULL;
|
delete ca_bar; ca_bar = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -108,14 +108,14 @@ class CInfoViewerBB
|
|||||||
pthread_t scrambledT;
|
pthread_t scrambledT;
|
||||||
|
|
||||||
CProgressBar *hddscale, *sysscale;
|
CProgressBar *hddscale, *sysscale;
|
||||||
CComponentsShapeSquare *foot, *cabar;
|
CComponentsShapeSquare *foot, *ca_bar;
|
||||||
void paintFoot(int w = 0);
|
void paintFoot(int w = 0);
|
||||||
void showBBIcons(const int modus, const std::string & icon);
|
void showBBIcons(const int modus, const std::string & icon);
|
||||||
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_icons(int, const char*, int&);
|
||||||
void paintCA_bar(int,int);
|
void paint_ca_bar();
|
||||||
void showOne_CAIcon();
|
void showOne_CAIcon();
|
||||||
|
|
||||||
static void* scrambledThread(void *arg);
|
static void* scrambledThread(void *arg);
|
||||||
@@ -150,7 +150,7 @@ class CInfoViewerBB
|
|||||||
void initBBOffset(void);
|
void initBBOffset(void);
|
||||||
// modules
|
// modules
|
||||||
CComponentsShapeSquare* getFooter(void){return foot;}
|
CComponentsShapeSquare* getFooter(void){return foot;}
|
||||||
CComponentsShapeSquare* getCABar(void){return cabar;}
|
CComponentsShapeSquare* getCABar(void){return ca_bar;}
|
||||||
void ResetModules(void);
|
void ResetModules(void);
|
||||||
void changePB(void);
|
void changePB(void);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user