mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
gui/channellist: use localized value for minutes
Origin commit data
------------------
Branch: ni/coolstream
Commit: 00c1a8af01
Author: martii <m4rtii@gmx.de>
Date: 2014-05-06 (Tue, 06 May 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1641,12 +1641,12 @@ void CChannelList::paintDetails(int index)
|
|||||||
unsigned seit = ( time(NULL) - p_event->startTime ) / 60;
|
unsigned seit = ( time(NULL) - p_event->startTime ) / 60;
|
||||||
snprintf(cSeit, sizeof(cSeit), "%s %02d:%02d",(displayNext) ? g_Locale->getText(LOCALE_CHANNELLIST_START):g_Locale->getText(LOCALE_CHANNELLIST_SINCE), pStartZeit->tm_hour, pStartZeit->tm_min);
|
snprintf(cSeit, sizeof(cSeit), "%s %02d:%02d",(displayNext) ? g_Locale->getText(LOCALE_CHANNELLIST_START):g_Locale->getText(LOCALE_CHANNELLIST_SINCE), pStartZeit->tm_hour, pStartZeit->tm_min);
|
||||||
if (displayNext) {
|
if (displayNext) {
|
||||||
snprintf(cNoch, sizeof(cNoch), "(%d min)", p_event->duration / 60);
|
snprintf(cNoch, sizeof(cNoch), "(%d %s)", p_event->duration / 60, unit_short_minute);
|
||||||
} else {
|
} else {
|
||||||
int noch = (p_event->startTime + p_event->duration - time(NULL)) / 60;
|
int noch = (p_event->startTime + p_event->duration - time(NULL)) / 60;
|
||||||
if ((noch< 0) || (noch>=10000))
|
if ((noch< 0) || (noch>=10000))
|
||||||
noch= 0;
|
noch= 0;
|
||||||
snprintf(cNoch, sizeof(cNoch), "(%u / %d min)", seit, noch);
|
snprintf(cNoch, sizeof(cNoch), "(%u / %d %s)", seit, noch, unit_short_minute);
|
||||||
}
|
}
|
||||||
int seit_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cSeit, true); // UTF-8
|
int seit_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cSeit, true); // UTF-8
|
||||||
int noch_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cNoch, true); // UTF-8
|
int noch_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cNoch, true); // UTF-8
|
||||||
@@ -2167,6 +2167,8 @@ void CChannelList::paint()
|
|||||||
frameBuffer->paintBoxRel(x+width,y+theight+pig_height,infozone_width,infozone_height,COL_MENUCONTENT_PLUS_0);
|
frameBuffer->paintBoxRel(x+width,y+theight+pig_height,infozone_width,infozone_height,COL_MENUCONTENT_PLUS_0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unit_short_minute = g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE);
|
||||||
|
|
||||||
for(unsigned int count = 0; count < listmaxshow; count++) {
|
for(unsigned int count = 0; count < listmaxshow; count++) {
|
||||||
paintItem(count, true);
|
paintItem(count, true);
|
||||||
}
|
}
|
||||||
@@ -2270,7 +2272,7 @@ void CChannelList::paint_events(int index)
|
|||||||
frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0);
|
frameBuffer->paintBoxRel(x+ width,y+ theight+pig_height, infozone_width, infozone_height,COL_MENUCONTENT_PLUS_0);
|
||||||
|
|
||||||
char startTime[10];
|
char startTime[10];
|
||||||
int eventStartTimeWidth = g_Font[eventFont]->getRenderWidth("22:22") + 5; // use a fixed value
|
int eventStartTimeWidth = 4 * g_Font[eventFont]->getMaxDigitWidth() + g_Font[eventFont]->getRenderWidth(":") + 5; // use a fixed value
|
||||||
int startTimeWidth = 0;
|
int startTimeWidth = 0;
|
||||||
CChannelEventList::iterator e;
|
CChannelEventList::iterator e;
|
||||||
time_t azeit;
|
time_t azeit;
|
||||||
|
@@ -92,6 +92,8 @@ private:
|
|||||||
int infozone_height;
|
int infozone_height;
|
||||||
int previous_channellist_additional;
|
int previous_channellist_additional;
|
||||||
|
|
||||||
|
const char * unit_short_minute;
|
||||||
|
|
||||||
CEPGData epgData;
|
CEPGData epgData;
|
||||||
bool historyMode;
|
bool historyMode;
|
||||||
bool vlist; // "virtual" list, not bouquet
|
bool vlist; // "virtual" list, not bouquet
|
||||||
|
Reference in New Issue
Block a user