bouquetlist: only show active buttons

Origin commit data
------------------
Branch: ni/coolstream
Commit: d6260e3862
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-03-10 (Sun, 10 Mar 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-03-10 00:04:23 +01:00
parent 8258b38a53
commit ae1bbd7cd0
2 changed files with 8 additions and 1 deletions

View File

@@ -62,6 +62,7 @@ CBouquetList::CBouquetList(const char * const Name)
frameBuffer = CFrameBuffer::getInstance();
selected = 0;
liststart = 0;
favonly = false;
if(Name == NULL)
name = g_Locale->getText(LOCALE_BOUQUETLIST_HEAD);
else
@@ -325,6 +326,7 @@ int CBouquetList::show(bool bShowChannelList)
int icol_w, icol_h;
int w_max_text = 0;
int w_max_icon = 0;
favonly = !bShowChannelList;
for(unsigned int count = 0; count < sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]);count++){
int w_text = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth(g_Locale->getText (CBouquetListButtons[count].locale),true);
@@ -599,7 +601,10 @@ void CBouquetList::paint()
frameBuffer->paintBoxRel(x, y+theight, width, height - theight - footerHeight, COL_MENUCONTENT_PLUS_0);
::paintButtons(x, y + (height - footerHeight), width, sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]), CBouquetListButtons, width, footerHeight);
int numbuttons = sizeof(CBouquetListButtons)/sizeof(CBouquetListButtons[0]);
if (favonly) /* this actually shows favorites and providers button, but both are active anyway */
numbuttons = 2;
::paintButtons(x, y + (height - footerHeight), width, numbuttons, CBouquetListButtons, width, footerHeight);
if(!Bouquets.empty())
{

View File

@@ -94,6 +94,8 @@ class CBouquetList
int x;
int y;
bool favonly;
void paintItem(int pos);
void paint();
void paintHead();