mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
#286, 288, 285, 242, 282, 296, 293
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@549 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Branch: ni/coolstream
Commit: 1ec1b2fb81
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2010-04-21 (Wed, 21 Apr 2010)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -29,9 +29,19 @@
|
||||
|
||||
void paintButtons(CFrameBuffer * const frameBuffer, Font * const font, const CLocaleManager * const localemanager, const int x, const int y, const unsigned int buttonwidth, const unsigned int count, const struct button_label * const content)
|
||||
{
|
||||
int fh = font->getHeight();
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
{
|
||||
#if 0
|
||||
int iw, ih, yy;
|
||||
frameBuffer->getIconSize(content[i].button, &iw, &ih);
|
||||
yy = y + (fh - ih)/2;
|
||||
frameBuffer->paintIcon(content[i].button, x + i * buttonwidth, yy);
|
||||
font->RenderString(x + i * buttonwidth + iw + 5, y + 19, buttonwidth - iw - 5, localemanager->getText(content[i].locale), COL_INFOBAR, 0, true); // UTF-8
|
||||
#else
|
||||
frameBuffer->paintIcon(content[i].button, x + i * buttonwidth, y);
|
||||
//FIXME why y+19 ??
|
||||
font->RenderString(x + i * buttonwidth + 20, y + 19, buttonwidth - 20, localemanager->getText(content[i].locale), COL_INFOBAR, 0, true); // UTF-8
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@@ -237,11 +237,13 @@ int ShowHintUTF(const neutrino_locale_t Caption, const char * const Text, const
|
||||
{
|
||||
g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd );
|
||||
|
||||
if ((msg == CRCInput::RC_timeout) ||
|
||||
(msg == CRCInput::RC_home ) ||
|
||||
(msg == CRCInput::RC_ok ))
|
||||
if ((msg == CRCInput::RC_timeout) || (msg == CRCInput::RC_ok))
|
||||
{
|
||||
res = messages_return::cancel_info;
|
||||
res = messages_return::cancel_info;
|
||||
}
|
||||
else if(msg == CRCInput::RC_home)
|
||||
{
|
||||
res = messages_return::cancel_all;
|
||||
}
|
||||
else if ((hintBox->has_scrollbar()) && ((msg == CRCInput::RC_up) || (msg == CRCInput::RC_down)))
|
||||
{
|
||||
@@ -252,9 +254,13 @@ int ShowHintUTF(const neutrino_locale_t Caption, const char * const Text, const
|
||||
}
|
||||
else if((msg == CRCInput::RC_sat) || (msg == CRCInput::RC_favorites)) {
|
||||
}
|
||||
else if((msg == CRCInput::RC_mode) || (msg == CRCInput::RC_next) || (msg == CRCInput::RC_prev)) {
|
||||
res = messages_return::cancel_info;
|
||||
g_RCInput->postMsg(msg, data);
|
||||
else if(msg == CRCInput::RC_mode) {
|
||||
res = messages_return::handled;
|
||||
break;
|
||||
}
|
||||
else if((msg == CRCInput::RC_next) || (msg == CRCInput::RC_prev)) {
|
||||
res = messages_return::cancel_all;
|
||||
g_RCInput->postMsg(msg, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -264,14 +270,14 @@ int ShowHintUTF(const neutrino_locale_t Caption, const char * const Text, const
|
||||
|
||||
// raus hier und dar<61>ber behandeln...
|
||||
g_RCInput->postMsg(msg, data);
|
||||
res = messages_return::cancel_info;
|
||||
res = messages_return::cancel_all;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hintBox->hide();
|
||||
delete hintBox;
|
||||
return 1;
|
||||
return res;
|
||||
}
|
||||
|
||||
int ShowLocalizedHint(const neutrino_locale_t Caption, const neutrino_locale_t Text, const int Width, int timeout, const char * const Icon)
|
||||
|
@@ -511,42 +511,42 @@ void CDateInput::onAfterExec()
|
||||
{
|
||||
struct tm tmTime;
|
||||
sscanf( value, "%02d.%02d.%04d %02d:%02d", &tmTime.tm_mday, &tmTime.tm_mon,
|
||||
&tmTime.tm_year,
|
||||
&tmTime.tm_hour, &tmTime.tm_min);
|
||||
&tmTime.tm_year,
|
||||
&tmTime.tm_hour, &tmTime.tm_min);
|
||||
tmTime.tm_mon-=1;
|
||||
tmTime.tm_year-=1900;
|
||||
tmTime.tm_sec=0;
|
||||
tmTime.tm_isdst=dst;
|
||||
|
||||
if(tmTime.tm_year>129)
|
||||
tmTime.tm_year=129;
|
||||
if(tmTime.tm_year<0)
|
||||
tmTime.tm_year=0;
|
||||
if(tmTime.tm_mon>11)
|
||||
tmTime.tm_mon=11;
|
||||
if(tmTime.tm_mon<0)
|
||||
tmTime.tm_mon=0;
|
||||
if(tmTime.tm_mday>31) //-> eine etwas laxe pruefung, aber mktime biegt das wieder grade
|
||||
tmTime.tm_mday=31;
|
||||
if(tmTime.tm_mday<1)
|
||||
tmTime.tm_mday=1;
|
||||
if(tmTime.tm_hour>23)
|
||||
tmTime.tm_hour=23;
|
||||
if(tmTime.tm_hour<0)
|
||||
tmTime.tm_hour=0;
|
||||
if(tmTime.tm_min>59)
|
||||
tmTime.tm_min=59;
|
||||
if(tmTime.tm_min<0)
|
||||
tmTime.tm_min=0;
|
||||
if(tmTime.tm_sec>59)
|
||||
tmTime.tm_sec=59;
|
||||
if(tmTime.tm_sec<0)
|
||||
tmTime.tm_sec=0;
|
||||
tmTime.tm_year=129;
|
||||
if(tmTime.tm_year<0)
|
||||
tmTime.tm_year=0;
|
||||
if(tmTime.tm_mon>11)
|
||||
tmTime.tm_mon=11;
|
||||
if(tmTime.tm_mon<0)
|
||||
tmTime.tm_mon=0;
|
||||
if(tmTime.tm_mday>31) //-> eine etwas laxe pruefung, aber mktime biegt das wieder grade
|
||||
tmTime.tm_mday=31;
|
||||
if(tmTime.tm_mday<1)
|
||||
tmTime.tm_mday=1;
|
||||
if(tmTime.tm_hour>23)
|
||||
tmTime.tm_hour=23;
|
||||
if(tmTime.tm_hour<0)
|
||||
tmTime.tm_hour=0;
|
||||
if(tmTime.tm_min>59)
|
||||
tmTime.tm_min=59;
|
||||
if(tmTime.tm_min<0)
|
||||
tmTime.tm_min=0;
|
||||
if(tmTime.tm_sec>59)
|
||||
tmTime.tm_sec=59;
|
||||
if(tmTime.tm_sec<0)
|
||||
tmTime.tm_sec=0;
|
||||
*time=mktime(&tmTime);
|
||||
struct tm *tmTime2 = localtime(time);
|
||||
sprintf( value, "%02d.%02d.%04d %02d:%02d", tmTime2->tm_mday, tmTime2->tm_mon+1,
|
||||
tmTime2->tm_year+1900,
|
||||
tmTime2->tm_hour, tmTime2->tm_min);
|
||||
tmTime2->tm_year+1900,
|
||||
tmTime2->tm_hour, tmTime2->tm_min);
|
||||
}
|
||||
//-----------------------------#################################-------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user