mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-14 08:53:43 +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
This commit is contained in:
@@ -876,7 +876,7 @@ printf("CChannelList::adjustToChannelID me %x [%s] list size %d channel_id %llx\
|
||||
|
||||
tuned = i;
|
||||
if (bToo && (bouquetList != NULL)) {
|
||||
int old_mode = g_settings.channel_mode;
|
||||
int old_mode = CNeutrinoApp::getInstance()->GetChannelMode();
|
||||
int new_mode = old_mode;
|
||||
bool has_channel;
|
||||
if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_tv) {
|
||||
|
@@ -802,82 +802,86 @@ void CInfoViewer::showSubchan ()
|
||||
}
|
||||
|
||||
if (!(subChannelName.empty ())) {
|
||||
char text[100];
|
||||
sprintf (text, "%d - %s", subchannel, subChannelName.c_str ());
|
||||
if( g_settings.infobar_subchan_disp_pos == 4 ) {
|
||||
g_RCInput->postMsg( NeutrinoMessages::SHOW_INFOBAR , 0 );
|
||||
} else {
|
||||
char text[100];
|
||||
sprintf (text, "%d - %s", subchannel, subChannelName.c_str ());
|
||||
|
||||
int dx = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth (text) + 20;
|
||||
int dy = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight(); // 25;
|
||||
int dx = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getRenderWidth (text) + 20;
|
||||
int dy = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->getHeight(); // 25;
|
||||
|
||||
if (g_RemoteControl->director_mode) {
|
||||
int w = 20 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth (g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE), true) + 20; // UTF-8
|
||||
int h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
|
||||
if (w > dx)
|
||||
dx = w;
|
||||
dy = dy + h + 5; //dy * 2;
|
||||
} else
|
||||
dy = dy + 5;
|
||||
if (g_RemoteControl->director_mode) {
|
||||
int w = 20 + g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getRenderWidth (g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE), true) + 20; // UTF-8
|
||||
int h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
|
||||
if (w > dx)
|
||||
dx = w;
|
||||
dy = dy + h + 5; //dy * 2;
|
||||
} else
|
||||
dy = dy + 5;
|
||||
|
||||
int x = 0, y = 0;
|
||||
if (g_settings.infobar_subchan_disp_pos == 0) {
|
||||
// Rechts-Oben
|
||||
x = g_settings.screen_EndX - dx - 10;
|
||||
y = g_settings.screen_StartY + 10;
|
||||
} else if (g_settings.infobar_subchan_disp_pos == 1) {
|
||||
// Links-Oben
|
||||
x = g_settings.screen_StartX + 10;
|
||||
y = g_settings.screen_StartY + 10;
|
||||
} else if (g_settings.infobar_subchan_disp_pos == 2) {
|
||||
// Links-Unten
|
||||
x = g_settings.screen_StartX + 10;
|
||||
y = g_settings.screen_EndY - dy - 10;
|
||||
} else if (g_settings.infobar_subchan_disp_pos == 3) {
|
||||
// Rechts-Unten
|
||||
x = g_settings.screen_EndX - dx - 10;
|
||||
y = g_settings.screen_EndY - dy - 10;
|
||||
}
|
||||
int x = 0, y = 0;
|
||||
if (g_settings.infobar_subchan_disp_pos == 0) {
|
||||
// Rechts-Oben
|
||||
x = g_settings.screen_EndX - dx - 10;
|
||||
y = g_settings.screen_StartY + 10;
|
||||
} else if (g_settings.infobar_subchan_disp_pos == 1) {
|
||||
// Links-Oben
|
||||
x = g_settings.screen_StartX + 10;
|
||||
y = g_settings.screen_StartY + 10;
|
||||
} else if (g_settings.infobar_subchan_disp_pos == 2) {
|
||||
// Links-Unten
|
||||
x = g_settings.screen_StartX + 10;
|
||||
y = g_settings.screen_EndY - dy - 10;
|
||||
} else if (g_settings.infobar_subchan_disp_pos == 3) {
|
||||
// Rechts-Unten
|
||||
x = g_settings.screen_EndX - dx - 10;
|
||||
y = g_settings.screen_EndY - dy - 10;
|
||||
}
|
||||
|
||||
fb_pixel_t pixbuf[(dx + 2 * borderwidth) * (dy + 2 * borderwidth)];
|
||||
lframeBuffer->SaveScreen (x - borderwidth, y - borderwidth, dx + 2 * borderwidth, dy + 2 * borderwidth, pixbuf);
|
||||
fb_pixel_t pixbuf[(dx + 2 * borderwidth) * (dy + 2 * borderwidth)];
|
||||
lframeBuffer->SaveScreen (x - borderwidth, y - borderwidth, dx + 2 * borderwidth, dy + 2 * borderwidth, pixbuf);
|
||||
|
||||
// clear border
|
||||
lframeBuffer->paintBackgroundBoxRel (x - borderwidth, y - borderwidth, dx + 2 * borderwidth, borderwidth);
|
||||
lframeBuffer->paintBackgroundBoxRel (x - borderwidth, y + dy, dx + 2 * borderwidth, borderwidth);
|
||||
lframeBuffer->paintBackgroundBoxRel (x - borderwidth, y, borderwidth, dy);
|
||||
lframeBuffer->paintBackgroundBoxRel (x + dx, y, borderwidth, dy);
|
||||
// clear border
|
||||
lframeBuffer->paintBackgroundBoxRel (x - borderwidth, y - borderwidth, dx + 2 * borderwidth, borderwidth);
|
||||
lframeBuffer->paintBackgroundBoxRel (x - borderwidth, y + dy, dx + 2 * borderwidth, borderwidth);
|
||||
lframeBuffer->paintBackgroundBoxRel (x - borderwidth, y, borderwidth, dy);
|
||||
lframeBuffer->paintBackgroundBoxRel (x + dx, y, borderwidth, dy);
|
||||
|
||||
lframeBuffer->paintBoxRel (x, y, dx, dy, COL_MENUCONTENT_PLUS_0);
|
||||
//g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + 30, dx - 20, text, COL_MENUCONTENT, 0, true);
|
||||
lframeBuffer->paintBoxRel (x, y, dx, dy, COL_MENUCONTENT_PLUS_0);
|
||||
//g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + 30, dx - 20, text, COL_MENUCONTENT, 0, true);
|
||||
|
||||
if (g_RemoteControl->director_mode) {
|
||||
lframeBuffer->paintIcon (NEUTRINO_ICON_BUTTON_YELLOW, x + 8, y + dy - 20);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString (x + 30, y + dy - 2, dx - 40, g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE), COL_MENUCONTENT, 0, true); // UTF-8
|
||||
int h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - h - 2, dx - 20, text, COL_MENUCONTENT, 0, true);
|
||||
} else
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - 2, dx - 20, text, COL_MENUCONTENT, 0, true);
|
||||
if (g_RemoteControl->director_mode) {
|
||||
lframeBuffer->paintIcon (NEUTRINO_ICON_BUTTON_YELLOW, x + 8, y + dy - 20);
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->RenderString (x + 30, y + dy - 2, dx - 40, g_Locale->getText (LOCALE_NVODSELECTOR_DIRECTORMODE), COL_MENUCONTENT, 0, true); // UTF-8
|
||||
int h = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight();
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - h - 2, dx - 20, text, COL_MENUCONTENT, 0, true);
|
||||
} else
|
||||
g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_INFO]->RenderString (x + 10, y + dy - 2, dx - 20, text, COL_MENUCONTENT, 0, true);
|
||||
|
||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd (2);
|
||||
int res = messages_return::none;
|
||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd (2);
|
||||
int res = messages_return::none;
|
||||
|
||||
neutrino_msg_t msg;
|
||||
neutrino_msg_data_t data;
|
||||
neutrino_msg_t msg;
|
||||
neutrino_msg_data_t data;
|
||||
|
||||
while (!(res & (messages_return::cancel_info | messages_return::cancel_all))) {
|
||||
g_RCInput->getMsgAbsoluteTimeout (&msg, &data, &timeoutEnd);
|
||||
while (!(res & (messages_return::cancel_info | messages_return::cancel_all))) {
|
||||
g_RCInput->getMsgAbsoluteTimeout (&msg, &data, &timeoutEnd);
|
||||
|
||||
if (msg == CRCInput::RC_timeout) {
|
||||
res = messages_return::cancel_info;
|
||||
} else {
|
||||
res = neutrino->handleMsg (msg, data);
|
||||
|
||||
if (res & messages_return::unhandled) {
|
||||
// raus hier und im Hauptfenster behandeln...
|
||||
g_RCInput->postMsg (msg, data);
|
||||
if (msg == CRCInput::RC_timeout) {
|
||||
res = messages_return::cancel_info;
|
||||
} else {
|
||||
res = neutrino->handleMsg (msg, data);
|
||||
|
||||
if (res & messages_return::unhandled) {
|
||||
// raus hier und im Hauptfenster behandeln...
|
||||
g_RCInput->postMsg (msg, data);
|
||||
res = messages_return::cancel_info;
|
||||
}
|
||||
}
|
||||
}
|
||||
lframeBuffer->RestoreScreen (x - borderwidth, y - borderwidth, dx + 2 * borderwidth, dy + 2 * borderwidth, pixbuf);
|
||||
}
|
||||
lframeBuffer->RestoreScreen (x - borderwidth, y - borderwidth, dx + 2 * borderwidth, dy + 2 * borderwidth, pixbuf);
|
||||
} else {
|
||||
g_RCInput->postMsg (NeutrinoMessages::SHOW_INFOBAR, 0);
|
||||
}
|
||||
|
@@ -98,6 +98,8 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
||||
neutrino_msg_data_t data;
|
||||
TP_params TP;
|
||||
int wasgrow = 0;
|
||||
uint8_t origPosition;
|
||||
|
||||
last_snr = 0;
|
||||
moving = 0;
|
||||
|
||||
@@ -131,6 +133,7 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
||||
break;
|
||||
}
|
||||
}
|
||||
origPosition = motorPosition;
|
||||
|
||||
g_Zapit->setScanSatelliteList( satList);
|
||||
|
||||
@@ -329,9 +332,26 @@ int CMotorControl::exec(CMenuTarget* parent, const std::string &)
|
||||
|
||||
case CRCInput::RC_green:
|
||||
case CRCInput::RC_5:
|
||||
printf("[motorcontrol] 5 key received... store present satellite number: %d\n", motorPosition);
|
||||
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6A, 1, motorPosition, 0);
|
||||
//g_Zapit->tune_TP(TP);
|
||||
{
|
||||
bool store = true;
|
||||
printf("[motorcontrol] 5 key received... store present satellite number: %d\n", motorPosition);
|
||||
if(motorPosition != origPosition) {
|
||||
printf("[motorcontrol] position changed %d -> %d\n", origPosition, motorPosition);
|
||||
for(sit = satellitePositions.begin(); sit != satellitePositions.end(); sit++) {
|
||||
if(sit->second.motor_position == motorPosition)
|
||||
break;
|
||||
}
|
||||
if(sit != satellitePositions.end()) {
|
||||
printf("[motorcontrol] new positions configured for %s\n", sit->second.name.c_str());
|
||||
std::string buf = g_Locale->getText(LOCALE_MOTORCONTROL_OVERRIDE);
|
||||
buf += sit->second.name;
|
||||
store = (ShowMsgUTF(LOCALE_MESSAGEBOX_INFO, buf,CMessageBox::mbrNo,CMessageBox::mbNo|CMessageBox::mbYes) == CMessageBox::mbrYes);
|
||||
}
|
||||
}
|
||||
if(store)
|
||||
g_Zapit->sendMotorCommand(0xE0, 0x31, 0x6A, 1, motorPosition, 0);
|
||||
//g_Zapit->tune_TP(TP);
|
||||
}
|
||||
break;
|
||||
|
||||
case CRCInput::RC_6:
|
||||
|
@@ -1659,7 +1659,7 @@ bool CMovieBrowser::onButtonPressMainFrame(neutrino_msg_t msg)
|
||||
}
|
||||
else if (msg == CRCInput::RC_setup)
|
||||
{
|
||||
if(m_movieSelectionHandler != NULL)
|
||||
//if(m_movieSelectionHandler != NULL)
|
||||
showMenu(m_movieSelectionHandler);
|
||||
}
|
||||
else if (msg == CRCInput::RC_text || msg == CRCInput::RC_radio) {
|
||||
|
@@ -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