mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
CChannelList: style fixes
unititialize variables 'r_icon_w', 'p_event':
Variable 'r_icon_w' and Variable 'p_event' were reassigned with value
before the old one has been used.
Scope of the variable 'buf', 'cFrom', 'rec_mode', 'first' can be reduced.
Origin commit data
------------------
Branch: ni/coolstream
Commit: 01fdbba7b7
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-10-06 (Sun, 06 Oct 2013)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1710,11 +1710,12 @@ void CChannelList::paintDetails(int index)
|
|||||||
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight +fdescrheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK_TEXT, 0, true);
|
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight +fdescrheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK_TEXT, 0, true);
|
||||||
}
|
}
|
||||||
else if( !displayNext && g_settings.channellist_foot == 1) { // next Event
|
else if( !displayNext && g_settings.channellist_foot == 1) { // next Event
|
||||||
char buf[128] = {0};
|
|
||||||
char cFrom[50] = {0}; // UTF-8
|
|
||||||
CSectionsdClient::CurrentNextInfo CurrentNext;
|
CSectionsdClient::CurrentNextInfo CurrentNext;
|
||||||
CEitManager::getInstance()->getCurrentNextServiceKey(chanlist[index]->channel_id, CurrentNext);
|
CEitManager::getInstance()->getCurrentNextServiceKey(chanlist[index]->channel_id, CurrentNext);
|
||||||
if (!CurrentNext.next_name.empty()) {
|
if (!CurrentNext.next_name.empty()) {
|
||||||
|
char buf[128] = {0};
|
||||||
|
char cFrom[50] = {0}; // UTF-8
|
||||||
struct tm *pStartZeit = localtime (& CurrentNext.next_zeit.startzeit);
|
struct tm *pStartZeit = localtime (& CurrentNext.next_zeit.startzeit);
|
||||||
snprintf(cFrom, sizeof(cFrom), "%s %02d:%02d",g_Locale->getText(LOCALE_WORD_FROM),pStartZeit->tm_hour, pStartZeit->tm_min );
|
snprintf(cFrom, sizeof(cFrom), "%s %02d:%02d",g_Locale->getText(LOCALE_WORD_FROM),pStartZeit->tm_hour, pStartZeit->tm_min );
|
||||||
snprintf(buf, sizeof(buf), "%s", CurrentNext.next_name.c_str());
|
snprintf(buf, sizeof(buf), "%s", CurrentNext.next_name.c_str());
|
||||||
@@ -1891,7 +1892,6 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
|
|||||||
bool iscurrent = true;
|
bool iscurrent = true;
|
||||||
bool paintbuttons = false;
|
bool paintbuttons = false;
|
||||||
unsigned int curr = liststart + pos;
|
unsigned int curr = liststart + pos;
|
||||||
int rec_mode;
|
|
||||||
fb_pixel_t c_rad_small = 0;
|
fb_pixel_t c_rad_small = 0;
|
||||||
#if 0
|
#if 0
|
||||||
if(CNeutrinoApp::getInstance()->recordingstatus && !autoshift && curr < chanlist.size()) {
|
if(CNeutrinoApp::getInstance()->recordingstatus && !autoshift && curr < chanlist.size()) {
|
||||||
@@ -1932,7 +1932,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
|
|||||||
int title_offset=0;
|
int title_offset=0;
|
||||||
fb_pixel_t tcolor=(liststart + pos == selected) ? color : COL_MENUCONTENTINACTIVE_TEXT;
|
fb_pixel_t tcolor=(liststart + pos == selected) ? color : COL_MENUCONTENTINACTIVE_TEXT;
|
||||||
int xtheight=fheight-2;
|
int xtheight=fheight-2;
|
||||||
|
int rec_mode;
|
||||||
if(g_settings.channellist_extended)
|
if(g_settings.channellist_extended)
|
||||||
{
|
{
|
||||||
prg_offset = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth("00:00");
|
prg_offset = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth("00:00");
|
||||||
@@ -1997,7 +1997,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
|
|||||||
#endif
|
#endif
|
||||||
//calculating icons
|
//calculating icons
|
||||||
int icon_x = (x+width-15-2) - RADIUS_LARGE/2;
|
int icon_x = (x+width-15-2) - RADIUS_LARGE/2;
|
||||||
int r_icon_w=0; int s_icon_h=0; int s_icon_w=0;
|
int r_icon_w; int s_icon_h=0; int s_icon_w=0;
|
||||||
frameBuffer->getIconSize(NEUTRINO_ICON_SCRAMBLED, &s_icon_w, &s_icon_h);
|
frameBuffer->getIconSize(NEUTRINO_ICON_SCRAMBLED, &s_icon_w, &s_icon_h);
|
||||||
r_icon_w = ChannelList_Rec;
|
r_icon_w = ChannelList_Rec;
|
||||||
int r_icon_x = icon_x;
|
int r_icon_x = icon_x;
|
||||||
@@ -2303,11 +2303,10 @@ void CChannelList::paint_events(int index)
|
|||||||
//Display the remaining events
|
//Display the remaining events
|
||||||
if ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height))
|
if ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height))
|
||||||
{
|
{
|
||||||
bool first = false;
|
|
||||||
fb_pixel_t color = COL_MENUCONTENTDARK_TEXT;
|
fb_pixel_t color = COL_MENUCONTENTDARK_TEXT;
|
||||||
if (e->eventID)
|
if (e->eventID)
|
||||||
{
|
{
|
||||||
first = (i == 1);
|
bool first = (i == 1);
|
||||||
if ((first && g_settings.colored_events_channellist == 1 /* current */) || (!first && g_settings.colored_events_channellist == 2 /* next */))
|
if ((first && g_settings.colored_events_channellist == 1 /* current */) || (!first && g_settings.colored_events_channellist == 2 /* next */))
|
||||||
color = COL_COLORED_EVENTS_TEXT;
|
color = COL_COLORED_EVENTS_TEXT;
|
||||||
struct tm *tmStartZeit = localtime(&e->startTime);
|
struct tm *tmStartZeit = localtime(&e->startTime);
|
||||||
@@ -2355,8 +2354,7 @@ void CChannelList::showdescription(int index)
|
|||||||
{
|
{
|
||||||
ffheight = g_Font[eventFont]->getHeight();
|
ffheight = g_Font[eventFont]->getHeight();
|
||||||
CZapitChannel* chan = chanlist[index];
|
CZapitChannel* chan = chanlist[index];
|
||||||
CChannelEvent *p_event=NULL;
|
CChannelEvent *p_event = &chan->currentEvent;
|
||||||
p_event = &chan->currentEvent;
|
|
||||||
epgData.info2.clear();
|
epgData.info2.clear();
|
||||||
epgText.clear();
|
epgText.clear();
|
||||||
CEitManager::getInstance()->getEPGid(p_event->eventID, p_event->startTime, &epgData);
|
CEitManager::getInstance()->getEPGid(p_event->eventID, p_event->startTime, &epgData);
|
||||||
|
Reference in New Issue
Block a user