mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 07:51:19 +02:00
show scrambled icon in bouqueteditor
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1276 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -102,6 +102,9 @@ void CBEChannelWidget::paintItem(int pos)
|
|||||||
//g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 5+ numwidth+ 10, ypos+ fheight, width- numwidth- 20- 15, (*Channels)[current]->getName(), color, 0, true);
|
//g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 5+ numwidth+ 10, ypos+ fheight, width- numwidth- 20- 15, (*Channels)[current]->getName(), color, 0, true);
|
||||||
//FIXME numwidth ? we not show chan numbers
|
//FIXME numwidth ? we not show chan numbers
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 20 + iconoffset, ypos + iheight - (iheight-fheight)/2, width- iconoffset- 20, (*Channels)[current]->getName(), color, 0, true);
|
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 20 + iconoffset, ypos + iheight - (iheight-fheight)/2, width- iconoffset- 20, (*Channels)[current]->getName(), color, 0, true);
|
||||||
|
if((*Channels)[current]->scrambled)
|
||||||
|
frameBuffer->paintIcon(NEUTRINO_ICON_SCRAMBLED, x+width- 15 - 28, ypos, fheight);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1153,7 +1153,7 @@ int CTimerList::newTimer()
|
|||||||
for (int j = 0; j < (int) channels->size(); j++) {
|
for (int j = 0; j < (int) channels->size(); j++) {
|
||||||
char cChannelId[3+16+1+1];
|
char cChannelId[3+16+1+1];
|
||||||
sprintf(cChannelId, "SC:" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS ",", (*channels)[j]->channel_id);
|
sprintf(cChannelId, "SC:" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS ",", (*channels)[j]->channel_id);
|
||||||
mwtv->addItem(new CMenuForwarderNonLocalized((*channels)[j]->getName().c_str(), true, NULL, this, (std::string(cChannelId) + (*channels)[j]->getName()).c_str()));
|
mwtv->addItem(new CMenuForwarderNonLocalized((*channels)[j]->getName().c_str(), true, NULL, this, (std::string(cChannelId) + (*channels)[j]->getName()).c_str(), NULL, NULL, (*channels)[j]->scrambled ? NEUTRINO_ICON_SCRAMBLED : NULL));
|
||||||
}
|
}
|
||||||
if (!channels->empty())
|
if (!channels->empty())
|
||||||
mctv.addItem(new CMenuForwarderNonLocalized(g_bouquetManager->Bouquets[i]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : g_bouquetManager->Bouquets[i]->Name.c_str() /*g_bouquetManager->Bouquets[i]->Name.c_str()*/, true, NULL, mwtv));
|
mctv.addItem(new CMenuForwarderNonLocalized(g_bouquetManager->Bouquets[i]->bFav ? g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME) : g_bouquetManager->Bouquets[i]->Name.c_str() /*g_bouquetManager->Bouquets[i]->Name.c_str()*/, true, NULL, mwtv));
|
||||||
@@ -1163,7 +1163,7 @@ int CTimerList::newTimer()
|
|||||||
for (int j = 0; j < (int) channels->size(); j++) {
|
for (int j = 0; j < (int) channels->size(); j++) {
|
||||||
char cChannelId[3+16+1+1];
|
char cChannelId[3+16+1+1];
|
||||||
sprintf(cChannelId, "SC:" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS ",", (*channels)[j]->channel_id);
|
sprintf(cChannelId, "SC:" PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS ",", (*channels)[j]->channel_id);
|
||||||
mwradio->addItem(new CMenuForwarderNonLocalized((*channels)[j]->getName().c_str(), true, NULL, this, (std::string(cChannelId) + (*channels)[j]->getName()).c_str()));
|
mwradio->addItem(new CMenuForwarderNonLocalized((*channels)[j]->getName().c_str(), true, NULL, this, (std::string(cChannelId) + (*channels)[j]->getName()).c_str(), NULL, NULL, (*channels)[j]->scrambled ? NEUTRINO_ICON_SCRAMBLED : NULL));
|
||||||
}
|
}
|
||||||
if (!channels->empty())
|
if (!channels->empty())
|
||||||
mcradio.addItem(new CMenuForwarderNonLocalized(g_bouquetManager->Bouquets[i]->Name.c_str(), true, NULL, mwradio));
|
mcradio.addItem(new CMenuForwarderNonLocalized(g_bouquetManager->Bouquets[i]->Name.c_str(), true, NULL, mwradio));
|
||||||
|
@@ -69,6 +69,7 @@ CMenuItem::CMenuItem()
|
|||||||
x = -1;
|
x = -1;
|
||||||
directKey = CRCInput::RC_nokey;
|
directKey = CRCInput::RC_nokey;
|
||||||
iconName = "";
|
iconName = "";
|
||||||
|
iconName_Info_right = "";
|
||||||
can_arrow = false;
|
can_arrow = false;
|
||||||
used = false;
|
used = false;
|
||||||
icon_frame_w = 10;
|
icon_frame_w = 10;
|
||||||
@@ -232,6 +233,19 @@ void CMenuItem::paintItemButton(const bool select_mode, const int &item_height,
|
|||||||
|
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(number_x, y+ item_height, item_height, CRCInput::getKeyName(directKey), item_color, item_height);
|
g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(number_x, y+ item_height, item_height, CRCInput::getKeyName(directKey), item_color, item_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//get data of number right info icon and paint
|
||||||
|
if (!iconName_Info_right.empty())
|
||||||
|
{
|
||||||
|
frameBuffer->getIconSize(iconName_Info_right.c_str(), &w, &h);
|
||||||
|
icon_w = w;
|
||||||
|
icon_h = h;
|
||||||
|
|
||||||
|
if (active && icon_w>0 && icon_h>0)
|
||||||
|
{
|
||||||
|
icon_painted = frameBuffer->paintIcon(iconName_Info_right, dx + icon_start_x - (icon_w + 20), y+ ((item_height/2- icon_h/2)) );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuWidget::CMenuWidget()
|
CMenuWidget::CMenuWidget()
|
||||||
@@ -1312,7 +1326,7 @@ int CMenuOptionLanguageChooser::paint( bool selected, bool /*last*/ )
|
|||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------
|
||||||
CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active, const char * const Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName)
|
CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active, const char * const Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right)
|
||||||
{
|
{
|
||||||
option = Option;
|
option = Option;
|
||||||
option_string = NULL;
|
option_string = NULL;
|
||||||
@@ -1322,9 +1336,10 @@ CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active,
|
|||||||
actionKey = ActionKey ? ActionKey : "";
|
actionKey = ActionKey ? ActionKey : "";
|
||||||
directKey = DirectKey;
|
directKey = DirectKey;
|
||||||
iconName = IconName ? IconName : "";
|
iconName = IconName ? IconName : "";
|
||||||
|
iconName_Info_right = IconName_Info_right ? IconName_Info_right : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active, const std::string &Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName)
|
CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active, const std::string &Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right)
|
||||||
{
|
{
|
||||||
option = NULL;
|
option = NULL;
|
||||||
option_string = &Option;
|
option_string = &Option;
|
||||||
@@ -1334,6 +1349,7 @@ CMenuForwarder::CMenuForwarder(const neutrino_locale_t Text, const bool Active,
|
|||||||
actionKey = ActionKey ? ActionKey : "";
|
actionKey = ActionKey ? ActionKey : "";
|
||||||
directKey = DirectKey;
|
directKey = DirectKey;
|
||||||
iconName = IconName ? IconName : "";
|
iconName = IconName ? IconName : "";
|
||||||
|
iconName_Info_right = IconName_Info_right ? IconName_Info_right : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
int CMenuForwarder::getHeight(void) const
|
int CMenuForwarder::getHeight(void) const
|
||||||
@@ -1432,12 +1448,12 @@ const char * CMenuForwarderNonLocalized::getName(void)
|
|||||||
return the_text.c_str();
|
return the_text.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuForwarderNonLocalized::CMenuForwarderNonLocalized(const char * const Text, const bool Active, const char * const Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName) : CMenuForwarder(NONEXISTANT_LOCALE, Active, Option, Target, ActionKey, DirectKey, IconName)
|
CMenuForwarderNonLocalized::CMenuForwarderNonLocalized(const char * const Text, const bool Active, const char * const Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right) : CMenuForwarder(NONEXISTANT_LOCALE, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right)
|
||||||
{
|
{
|
||||||
the_text = Text;
|
the_text = Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
CMenuForwarderNonLocalized::CMenuForwarderNonLocalized(const char * const Text, const bool Active, const std::string &Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName) : CMenuForwarder(NONEXISTANT_LOCALE, Active, Option, Target, ActionKey, DirectKey, IconName)
|
CMenuForwarderNonLocalized::CMenuForwarderNonLocalized(const char * const Text, const bool Active, const std::string &Option, CMenuTarget* Target, const char * const ActionKey, neutrino_msg_t DirectKey, const char * const IconName, const char * const IconName_Info_right) : CMenuForwarder(NONEXISTANT_LOCALE, Active, Option, Target, ActionKey, DirectKey, IconName, IconName_Info_right)
|
||||||
{
|
{
|
||||||
the_text = Text;
|
the_text = Text;
|
||||||
}
|
}
|
||||||
|
@@ -91,7 +91,7 @@ class CMenuItem
|
|||||||
bool can_arrow;
|
bool can_arrow;
|
||||||
std::string iconName;
|
std::string iconName;
|
||||||
std::string selected_iconName;
|
std::string selected_iconName;
|
||||||
|
std::string iconName_Info_right;
|
||||||
CMenuItem();
|
CMenuItem();
|
||||||
virtual ~CMenuItem(){}
|
virtual ~CMenuItem(){}
|
||||||
|
|
||||||
@@ -177,8 +177,10 @@ class CMenuForwarder : public CMenuItem
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CMenuForwarder(const neutrino_locale_t Text, const bool Active=true, const char * const Option=NULL, CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL);
|
CMenuForwarder(const neutrino_locale_t Text, const bool Active=true, const char * const Option=NULL, CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL, const char * const IconName_Info_right = NULL);
|
||||||
CMenuForwarder(const neutrino_locale_t Text, const bool Active, const std::string &Option, CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL);
|
CMenuForwarder(const neutrino_locale_t Text, const bool Active, const std::string &Option, CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL, const char * const IconName_Info_right = NULL);
|
||||||
|
|
||||||
|
|
||||||
virtual ~CMenuForwarder(){}
|
virtual ~CMenuForwarder(){}
|
||||||
|
|
||||||
int paint(bool selected=false, bool last = false);
|
int paint(bool selected=false, bool last = false);
|
||||||
@@ -204,8 +206,8 @@ class CMenuForwarderNonLocalized : public CMenuForwarder
|
|||||||
virtual const char * getName(void);
|
virtual const char * getName(void);
|
||||||
public:
|
public:
|
||||||
// Text must be UTF-8 encoded:
|
// Text must be UTF-8 encoded:
|
||||||
CMenuForwarderNonLocalized(const char * const Text, const bool Active=true, const char * const Option=NULL, CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL);
|
CMenuForwarderNonLocalized(const char * const Text, const bool Active=true, const char * const Option=NULL, CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL, const char * const IconName_Info_right = NULL);
|
||||||
CMenuForwarderNonLocalized(const char * const Text, const bool Active, const std::string &Option, CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL);
|
CMenuForwarderNonLocalized(const char * const Text, const bool Active, const std::string &Option, CMenuTarget* Target=NULL, const char * const ActionKey = NULL, const neutrino_msg_t DirectKey = CRCInput::RC_nokey, const char * const IconName = NULL, const char * const IconName_Info_right = NULL);
|
||||||
virtual ~CMenuForwarderNonLocalized(){}
|
virtual ~CMenuForwarderNonLocalized(){}
|
||||||
|
|
||||||
int getWidth(void);
|
int getWidth(void);
|
||||||
|
@@ -161,7 +161,7 @@ void CSelectChannelWidget::InitZapitChannelHelper(CZapitClient::channelsMode mod
|
|||||||
char cChannelId[60] = {0};
|
char cChannelId[60] = {0};
|
||||||
snprintf(cChannelId,sizeof(cChannelId),"ZC%c:%d|%llx#",(mode==CZapitClient::MODE_TV)?'T':'R',channel->number,channel->channel_id);
|
snprintf(cChannelId,sizeof(cChannelId),"ZC%c:%d|%llx#",(mode==CZapitClient::MODE_TV)?'T':'R',channel->number,channel->channel_id);
|
||||||
|
|
||||||
CMenuForwarderNonLocalized * chan_item = new CMenuForwarderNonLocalized(channel->getName().c_str(), true, NULL, this, (std::string(cChannelId) + channel->getName()).c_str());
|
CMenuForwarderNonLocalized * chan_item = new CMenuForwarderNonLocalized(channel->getName().c_str(), true, NULL, this, (std::string(cChannelId) + channel->getName()).c_str(), NULL, NULL, channel->scrambled ?NEUTRINO_ICON_SCRAMBLED:NULL);
|
||||||
chan_item->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true);
|
chan_item->setItemButton(NEUTRINO_ICON_BUTTON_OKAY, true);
|
||||||
mwtv->addItem(chan_item);
|
mwtv->addItem(chan_item);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user