mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
Merge branch 'master' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/tuxbox
Origin commit data
------------------
Branch: ni/coolstream
Commit: 41c29a4210
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-12-24 (Sat, 24 Dec 2016)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
<li><a href="http://wiki.tuxbox.org/Neutrino:yWeb" class="exlink" title="yWeb Help from Tuxbox Wiki" target="_blank">Tuxbox-Wiki Help</a></li>
|
<li><a href="http://wiki.tuxbox.org/Neutrino:yWeb" class="exlink" title="yWeb Help from Tuxbox Wiki" target="_blank">Tuxbox-Wiki Help</a></li>
|
||||||
<li><a href="http://forum.tuxbox.org/forum" class="exlink" title="Tuxbox Dicussion Forum" target="_blank">Tuxbox Forum</a></li>
|
<li><a href="http://forum.tuxbox.org/forum" class="exlink" title="Tuxbox Dicussion Forum" target="_blank">Tuxbox Forum</a></li>
|
||||||
<li><a href="http://www.cstworld.net" class="exlink" title="CST User Forum" target="_blank">CST User Forum</a></li>
|
<li><a href="http://www.cstworld.net" class="exlink" title="CST User Forum" target="_blank">CST User Forum</a></li>
|
||||||
<li><a href="http://www.dbox2world.net/board329-development/" class="exlink" title="CST Dev Forum" target="_blank">CST Developer Forum</a></li>
|
<li><a href="https://dbox2world.net/board/329-development/" class="exlink" title="CST Dev Forum" target="_blank">CST Developer Forum</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -265,6 +265,8 @@ Example:
|
|||||||
curl_easy_setopt(curl_handle, CURLOPT_CONNECTTIMEOUT, (long)connectTimeout);
|
curl_easy_setopt(curl_handle, CURLOPT_CONNECTTIMEOUT, (long)connectTimeout);
|
||||||
curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1L);
|
curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1L);
|
||||||
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, 0L);
|
curl_easy_setopt(curl_handle, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||||
|
/* enable all supported built-in compressions */
|
||||||
|
curl_easy_setopt(curl_handle, CURLOPT_ACCEPT_ENCODING, "");
|
||||||
|
|
||||||
if (!userAgent.empty())
|
if (!userAgent.empty())
|
||||||
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, userAgent.c_str());
|
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, userAgent.c_str());
|
||||||
|
@@ -181,8 +181,7 @@ const char* CInputString::c_str()
|
|||||||
|
|
||||||
CKeyboardInput::CKeyboardInput(const neutrino_locale_t Name, std::string* Value, int Size, CChangeObserver* Observ, const char * const Icon, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2)
|
CKeyboardInput::CKeyboardInput(const neutrino_locale_t Name, std::string* Value, int Size, CChangeObserver* Observ, const char * const Icon, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2)
|
||||||
{
|
{
|
||||||
name = Name;
|
title = g_Locale->getText(Name);
|
||||||
head = g_Locale->getText(Name);
|
|
||||||
valueString = Value;
|
valueString = Value;
|
||||||
inputSize = Size;
|
inputSize = Size;
|
||||||
|
|
||||||
@@ -205,8 +204,7 @@ CKeyboardInput::CKeyboardInput(const neutrino_locale_t Name, std::string* Value,
|
|||||||
|
|
||||||
CKeyboardInput::CKeyboardInput(const std::string &Name, std::string *Value, int Size, CChangeObserver* Observ, const char * const Icon, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2)
|
CKeyboardInput::CKeyboardInput(const std::string &Name, std::string *Value, int Size, CChangeObserver* Observ, const char * const Icon, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2)
|
||||||
{
|
{
|
||||||
name = NONEXISTANT_LOCALE;
|
title = Name;
|
||||||
head = Name;
|
|
||||||
valueString = Value;
|
valueString = Value;
|
||||||
inputSize = Size;
|
inputSize = Size;
|
||||||
|
|
||||||
@@ -229,8 +227,7 @@ CKeyboardInput::CKeyboardInput(const std::string &Name, std::string *Value, int
|
|||||||
|
|
||||||
CKeyboardInput::CKeyboardInput(const std::string &Name, std::string *Value, int Size, CChangeObserver* Observ, const char * const Icon, std::string HintText_1, std::string HintText_2)
|
CKeyboardInput::CKeyboardInput(const std::string &Name, std::string *Value, int Size, CChangeObserver* Observ, const char * const Icon, std::string HintText_1, std::string HintText_2)
|
||||||
{
|
{
|
||||||
name = NONEXISTANT_LOCALE;
|
title = Name;
|
||||||
head = Name;
|
|
||||||
valueString = Value;
|
valueString = Value;
|
||||||
inputSize = Size;
|
inputSize = Size;
|
||||||
|
|
||||||
@@ -286,7 +283,7 @@ void CKeyboardInput::init()
|
|||||||
}
|
}
|
||||||
inputString = new CInputString(inputSize);
|
inputString = new CInputString(inputSize);
|
||||||
|
|
||||||
int tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(head);
|
int tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(title);
|
||||||
if (!(iconfile.empty()))
|
if (!(iconfile.empty()))
|
||||||
{
|
{
|
||||||
int icol_w, icol_h;
|
int icol_w, icol_h;
|
||||||
@@ -637,7 +634,7 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &)
|
|||||||
else if ((msg == CRCInput::RC_home) || (msg == CRCInput::RC_timeout))
|
else if ((msg == CRCInput::RC_home) || (msg == CRCInput::RC_timeout))
|
||||||
{
|
{
|
||||||
if ((inputString->getValue() != oldval) &&
|
if ((inputString->getValue() != oldval) &&
|
||||||
(ShowMsg(name, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbCancel) == CMsgBox::mbrCancel)) {
|
(ShowMsg(title, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbCancel) == CMsgBox::mbrCancel)) {
|
||||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -675,7 +672,7 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &)
|
|||||||
inputString = NULL;
|
inputString = NULL;
|
||||||
|
|
||||||
if ((observ) && (msg == CRCInput::RC_red))
|
if ((observ) && (msg == CRCInput::RC_red))
|
||||||
observ->changeNotify(name, (void *) valueString->c_str());
|
observ->changeNotify(title, (void *) valueString->c_str());
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -709,7 +706,7 @@ void CKeyboardInput::paint()
|
|||||||
frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + OFFSET_SHADOW, width, height, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round
|
frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + OFFSET_SHADOW, width, height, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round
|
||||||
frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0);
|
frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0);
|
||||||
|
|
||||||
CComponentsHeader header(x, y, width, hheight, head, iconfile);
|
CComponentsHeader header(x, y, width, hheight, title, iconfile);
|
||||||
header.paint(CC_SAVE_SCREEN_NO);
|
header.paint(CC_SAVE_SCREEN_NO);
|
||||||
|
|
||||||
key_y = y+ hheight+ offset+ input_h+ offset;
|
key_y = y+ hheight+ offset+ input_h+ offset;
|
||||||
|
@@ -92,8 +92,7 @@ class CKeyboardInput : public CMenuTarget
|
|||||||
std::string (*keyboard)[KEY_COLUMNS];
|
std::string (*keyboard)[KEY_COLUMNS];
|
||||||
CInputString * inputString;
|
CInputString * inputString;
|
||||||
|
|
||||||
std::string head;
|
std::string title;
|
||||||
neutrino_locale_t name;
|
|
||||||
neutrino_locale_t hint_1, hint_2;
|
neutrino_locale_t hint_1, hint_2;
|
||||||
std::string hintText_1, hintText_2;
|
std::string hintText_1, hintText_2;
|
||||||
std::string iconfile;
|
std::string iconfile;
|
||||||
|
@@ -1266,6 +1266,7 @@ void CMenuWidget::paint()
|
|||||||
header->enableShadow(CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT);
|
header->enableShadow(CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT);
|
||||||
header->setOffset(10);
|
header->setOffset(10);
|
||||||
}
|
}
|
||||||
|
header->setCaption(getName());
|
||||||
header->setColorAll(COL_FRAME_PLUS_0, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0);
|
header->setColorAll(COL_FRAME_PLUS_0, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0);
|
||||||
header->setCaptionColor(COL_MENUHEAD_TEXT);
|
header->setCaptionColor(COL_MENUHEAD_TEXT);
|
||||||
header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0);
|
header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0);
|
||||||
|
@@ -88,6 +88,10 @@ class CChangeObserver
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
virtual bool changeNotify(const std::string & /*OptionName*/, void * /*Data*/)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
virtual bool changeNotify(lua_State * /*L*/, const std::string & /*luaId*/, const std::string & /*luaAction*/, void * /*Data*/)
|
virtual bool changeNotify(lua_State * /*L*/, const std::string & /*luaId*/, const std::string & /*luaAction*/, void * /*Data*/)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@@ -528,6 +528,22 @@ int ShowMsg( const std::string & Title,
|
|||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ShowMsg( const std::string & Title,
|
||||||
|
const neutrino_locale_t Text,
|
||||||
|
const CMsgBox::msg_result_t Default,
|
||||||
|
const uint32_t ShowButtons,
|
||||||
|
const char * const Icon,
|
||||||
|
const int Width,
|
||||||
|
const int Timeout,
|
||||||
|
bool returnDefaultOnTimeout,
|
||||||
|
const int& Text_mode,
|
||||||
|
fb_pixel_t color_frame)
|
||||||
|
{
|
||||||
|
int result = ShowMsg2UTF(Title.c_str(), g_Locale->getText(Text), Default, ShowButtons, Icon, Width, Timeout, returnDefaultOnTimeout, Text_mode, color_frame);
|
||||||
|
|
||||||
|
return (result);
|
||||||
|
}
|
||||||
|
|
||||||
void DisplayErrorMessage(const char * const ErrorMsg, const neutrino_locale_t& caption, const int& Text_mode)
|
void DisplayErrorMessage(const char * const ErrorMsg, const neutrino_locale_t& caption, const int& Text_mode)
|
||||||
{
|
{
|
||||||
ShowMsg(caption, ErrorMsg, CMsgBox::mbrCancel, CMsgBox::mbBack, NEUTRINO_ICON_ERROR, 500, NO_TIMEOUT, false, Text_mode, COL_RED);
|
ShowMsg(caption, ErrorMsg, CMsgBox::mbrCancel, CMsgBox::mbBack, NEUTRINO_ICON_ERROR, 500, NO_TIMEOUT, false, Text_mode, COL_RED);
|
||||||
|
@@ -392,6 +392,17 @@ int ShowMsg( const std::string & Title,
|
|||||||
const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE,
|
const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE,
|
||||||
fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8
|
fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8
|
||||||
|
|
||||||
|
int ShowMsg( const std::string & Title,
|
||||||
|
const neutrino_locale_t Text,
|
||||||
|
const CMsgBox::msg_result_t Default,
|
||||||
|
const uint32_t ShowButtons,
|
||||||
|
const char * const Icon = NULL,
|
||||||
|
const int Width = MSGBOX_MIN_WIDTH,
|
||||||
|
const int Timeout = NO_TIMEOUT,
|
||||||
|
bool returnDefaultOnTimeout = false,
|
||||||
|
const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE,
|
||||||
|
fb_pixel_t color_frame = HINTBOX_DEFAULT_FRAME_COLOR); // UTF-8
|
||||||
|
|
||||||
void DisplayErrorMessage(const char * const ErrorMsg, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8
|
void DisplayErrorMessage(const char * const ErrorMsg, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8
|
||||||
void DisplayErrorMessage(const char * const ErrorMsg, const neutrino_locale_t& caption, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8
|
void DisplayErrorMessage(const char * const ErrorMsg, const neutrino_locale_t& caption, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8
|
||||||
void DisplayErrorMessage(const char * const ErrorMsg, const std::string& caption, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8
|
void DisplayErrorMessage(const char * const ErrorMsg, const std::string& caption, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); // UTF-8
|
||||||
|
@@ -47,8 +47,7 @@
|
|||||||
|
|
||||||
CStringInput::CStringInput(const neutrino_locale_t Name, std::string* Value, int Size, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2, const char * const Valid_Chars, CChangeObserver* Observ, const char * const Icon)
|
CStringInput::CStringInput(const neutrino_locale_t Name, std::string* Value, int Size, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2, const char * const Valid_Chars, CChangeObserver* Observ, const char * const Icon)
|
||||||
{
|
{
|
||||||
name = Name;
|
title = g_Locale->getText(Name);
|
||||||
head = g_Locale->getText(Name);
|
|
||||||
valueString = Value;
|
valueString = Value;
|
||||||
lower_bound = -1;
|
lower_bound = -1;
|
||||||
upper_bound = -1;
|
upper_bound = -1;
|
||||||
@@ -65,8 +64,7 @@ CStringInput::CStringInput(const neutrino_locale_t Name, std::string* Value, int
|
|||||||
|
|
||||||
CStringInput::CStringInput(const std::string &Name, std::string *Value, int Size, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2, const char * const Valid_Chars, CChangeObserver* Observ, const char * const Icon)
|
CStringInput::CStringInput(const std::string &Name, std::string *Value, int Size, const neutrino_locale_t Hint_1, const neutrino_locale_t Hint_2, const char * const Valid_Chars, CChangeObserver* Observ, const char * const Icon)
|
||||||
{
|
{
|
||||||
name = NONEXISTANT_LOCALE;
|
title = Name;
|
||||||
head = Name;
|
|
||||||
valueString = Value;
|
valueString = Value;
|
||||||
lower_bound = -1;
|
lower_bound = -1;
|
||||||
upper_bound = -1;
|
upper_bound = -1;
|
||||||
@@ -115,7 +113,7 @@ void CStringInput::init()
|
|||||||
|
|
||||||
width = std::max(size*input_w + 2*offset, (int) frameBuffer->getScreenWidth() / 100 * 45);
|
width = std::max(size*input_w + 2*offset, (int) frameBuffer->getScreenWidth() / 100 * 45);
|
||||||
|
|
||||||
int tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(head);
|
int tmp_w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getRenderWidth(title);
|
||||||
|
|
||||||
if (!(iconfile.empty()))
|
if (!(iconfile.empty()))
|
||||||
{
|
{
|
||||||
@@ -497,7 +495,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
|
|||||||
else if ( (msg==CRCInput::RC_home) || (msg==CRCInput::RC_timeout) )
|
else if ( (msg==CRCInput::RC_home) || (msg==CRCInput::RC_timeout) )
|
||||||
{
|
{
|
||||||
if ((*valueString != oldval) &&
|
if ((*valueString != oldval) &&
|
||||||
(ShowMsg(name, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbCancel) == CMsgBox::mbrCancel)) {
|
(ShowMsg(title, LOCALE_MESSAGEBOX_DISCARD, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbCancel) == CMsgBox::mbrCancel)) {
|
||||||
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_MENU] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_MENU]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -542,7 +540,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & )
|
|||||||
|
|
||||||
if ( (observ) && (msg==CRCInput::RC_ok) )
|
if ( (observ) && (msg==CRCInput::RC_ok) )
|
||||||
{
|
{
|
||||||
observ->changeNotify(name, (void *) valueString->c_str());
|
observ->changeNotify(title, (void *) valueString->c_str());
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -563,7 +561,7 @@ void CStringInput::paint(bool sms)
|
|||||||
frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + OFFSET_SHADOW, width, height, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round
|
frameBuffer->paintBoxRel(x + OFFSET_SHADOW, y + OFFSET_SHADOW, width, height, COL_SHADOW_PLUS_0, RADIUS_LARGE, CORNER_ALL); //round
|
||||||
frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0, sms ? 0 : RADIUS_LARGE, CORNER_BOTTOM);
|
frameBuffer->paintBoxRel(x, y + hheight, width, bheight, COL_MENUCONTENT_PLUS_0, sms ? 0 : RADIUS_LARGE, CORNER_BOTTOM);
|
||||||
|
|
||||||
CComponentsHeader header(x, y, width, hheight, head, iconfile);
|
CComponentsHeader header(x, y, width, hheight, title, iconfile);
|
||||||
header.paint(CC_SAVE_SCREEN_NO);
|
header.paint(CC_SAVE_SCREEN_NO);
|
||||||
|
|
||||||
int tmp_y = y+ hheight+ offset+ input_h+ offset;
|
int tmp_y = y+ hheight+ offset+ input_h+ offset;
|
||||||
@@ -861,7 +859,7 @@ int CPINInput::exec( CMenuTarget* parent, const std::string & )
|
|||||||
|
|
||||||
if ( (observ) && (msg==CRCInput::RC_ok) )
|
if ( (observ) && (msg==CRCInput::RC_ok) )
|
||||||
{
|
{
|
||||||
observ->changeNotify(name, (void *) valueString->c_str());
|
observ->changeNotify(title, (void *) valueString->c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
@@ -53,8 +53,7 @@ class CStringInput : public CMenuTarget
|
|||||||
|
|
||||||
uint32_t smstimer;
|
uint32_t smstimer;
|
||||||
|
|
||||||
std::string head;
|
std::string title;
|
||||||
neutrino_locale_t name;
|
|
||||||
neutrino_locale_t hint_1, hint_2;
|
neutrino_locale_t hint_1, hint_2;
|
||||||
std::string iconfile;
|
std::string iconfile;
|
||||||
const char * validchars;
|
const char * validchars;
|
||||||
|
Reference in New Issue
Block a user