From 992b7b6980eefecd1bb1cbe5c846252bb900eefb Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 19 Dec 2016 17:55:15 +0100 Subject: [PATCH 01/38] bump neutrino version to 3.30 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/d97261772c62967c4cf1182a5463af31c811ccc4 Author: vanhofen Date: 2016-12-19 (Mon, 19 Dec 2016) Origin message was: ------------------ - bump neutrino version to 3.30 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5cd5ebdce..ec2df6fdb 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(NI-Neutrino,3.20.0) +AC_INIT(NI-Neutrino,3.30.0) AM_INIT_AUTOMAKE([1.0.1 nostdinc]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) From adbcd485d677653ec66356cba74bbf78987bd876 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 19 Dec 2016 18:05:09 +0100 Subject: [PATCH 02/38] themes: change text color on cursor to black Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/169c25cfd2cc9b8750395f27dfc1fa7fb106c78b Author: vanhofen Date: 2016-12-19 (Mon, 19 Dec 2016) Origin message was: ------------------ - themes: change text color on cursor to black --- src/gui/themes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/themes.cpp b/src/gui/themes.cpp index 4c7df9c1c..8d14cf529 100644 --- a/src/gui/themes.cpp +++ b/src/gui/themes.cpp @@ -351,9 +351,9 @@ void CThemes::getTheme(CConfigFile &configfile) t.menu_Content_Selected_green = configfile.getInt32( "menu_Content_Selected_green", 43 ); t.menu_Content_Selected_blue = configfile.getInt32( "menu_Content_Selected_blue", 7 ); t.menu_Content_Selected_Text_alpha = configfile.getInt32( "menu_Content_Selected_Text_alpha", 0 ); - t.menu_Content_Selected_Text_red = configfile.getInt32( "menu_Content_Selected_Text_red", 13 ); - t.menu_Content_Selected_Text_green = configfile.getInt32( "menu_Content_Selected_Text_green", 13 ); - t.menu_Content_Selected_Text_blue = configfile.getInt32( "menu_Content_Selected_Text_blue", 13 ); + t.menu_Content_Selected_Text_red = configfile.getInt32( "menu_Content_Selected_Text_red", 0 ); + t.menu_Content_Selected_Text_green = configfile.getInt32( "menu_Content_Selected_Text_green", 0 ); + t.menu_Content_Selected_Text_blue = configfile.getInt32( "menu_Content_Selected_Text_blue", 0 ); t.menu_Content_inactive_alpha = configfile.getInt32( "menu_Content_inactive_alpha", 10 ); t.menu_Content_inactive_red = configfile.getInt32( "menu_Content_inactive_red", 13 ); t.menu_Content_inactive_green = configfile.getInt32( "menu_Content_inactive_green", 13 ); From 8a08ec206ddcbbe4f3bd5b077c10718730e403c6 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 20 Dec 2016 10:26:59 +0100 Subject: [PATCH 03/38] settings-h: add SCROLLBAR_WIDTH define Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/e427ae5bf6707b59657c178b09727243ce578feb Author: vanhofen Date: 2016-12-20 (Tue, 20 Dec 2016) Origin message was: ------------------ - settings-h: add SCROLLBAR_WIDTH define --- src/system/settings.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/system/settings.h b/src/system/settings.h index 1d4477cb4..9d0290f78 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -915,6 +915,8 @@ const time_settings_struct_t timing_setting[SNeutrinoSettings::TIMING_SETTING_CO #define OFFSET_INNER_MIN 2 #define OFFSET_INNER_NONE 0 +#define SCROLLBAR_WIDTH OFFSET_INNER_MID + 2*OFFSET_INNER_MIN + struct SglobalInfo { unsigned char box_Type; From 86adfe9bdab63e1d3e9806ff71ad312221484c27 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 20 Dec 2016 10:26:59 +0100 Subject: [PATCH 04/38] menue: use SCROLLBAR_WIDTH define Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/97cfb36041a496c5cbccc2da18a9715a3bb8311d Author: vanhofen Date: 2016-12-20 (Tue, 20 Dec 2016) Origin message was: ------------------ - menue: use SCROLLBAR_WIDTH define --- src/gui/widget/menue.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index dc268cb49..38aef6c58 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1194,7 +1194,7 @@ void CMenuWidget::calcSize() //scrollbar width sb_width=0; if(total_pages > 1) - sb_width=15; + sb_width=SCROLLBAR_WIDTH; full_width = /*ConnectLineBox_Width+*/width+sb_width+OFFSET_SHADOW; full_height = height+RADIUS_LARGE+OFFSET_SHADOW*2 /*+hint_height+OFFSET_INTER*/; @@ -1325,9 +1325,9 @@ void CMenuWidget::paintItems() if(total_pages>1) { int item_height=height-(item_start_y-y); - paintScrollBar(x+ width, item_start_y, 15, item_height, total_pages, current_page); -// /* background of menu items, paint every time because different items can have -// * different height and this might leave artifacts otherwise after changing pages */ + paintScrollBar(x+ width, item_start_y, sb_width, item_height, total_pages, current_page); + /* background of menu items, paint every time because different items can have + * different height and this might leave artifacts otherwise after changing pages */ frameBuffer->paintBoxRel(x,item_start_y, width,item_height, COL_MENUCONTENT_PLUS_0); } From 66a2c95b0d2d95b8f24a66e7029f3a17ea10f172 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 20 Dec 2016 10:26:59 +0100 Subject: [PATCH 05/38] cc_frm_scrollbar: use SCROLLBAR_WIDTH define Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/52ad1f76c2ed0eb08a938373484a8c15dc28df84 Author: vanhofen Date: 2016-12-20 (Tue, 20 Dec 2016) Origin message was: ------------------ - cc_frm_scrollbar: use SCROLLBAR_WIDTH define --- src/gui/components/cc_frm_scrollbar.cpp | 1 - src/gui/components/cc_frm_scrollbar.h | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm_scrollbar.cpp b/src/gui/components/cc_frm_scrollbar.cpp index ad2189689..529d0102a 100644 --- a/src/gui/components/cc_frm_scrollbar.cpp +++ b/src/gui/components/cc_frm_scrollbar.cpp @@ -25,7 +25,6 @@ #include #endif -#include #include #include "cc_frm_scrollbar.h" #include "system/debug.h" diff --git a/src/gui/components/cc_frm_scrollbar.h b/src/gui/components/cc_frm_scrollbar.h index 8057147ec..778349ac1 100644 --- a/src/gui/components/cc_frm_scrollbar.h +++ b/src/gui/components/cc_frm_scrollbar.h @@ -24,6 +24,8 @@ #ifndef __CC_FORM_SCROLLBAR_H__ #define __CC_FORM_SCROLLBAR_H__ +#include + #include "cc_frm_chain.h" #include "cc_item_picture.h" @@ -77,7 +79,7 @@ class CComponentsScrollBar : public CComponentsFrmChain */ CComponentsScrollBar( const int &x_pos, const int &y_pos, - const int &w = 15, + const int &w = SCROLLBAR_WIDTH, const int &h = 0, const int& count = 1, CComponentsForm *parent = NULL, From ef62628418189f74d9ecbf5b5c067e47640772ba Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 20 Dec 2016 16:35:43 +0100 Subject: [PATCH 06/38] lib/libtuxtxt/tuxtxt_common.h fix out of bounds Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/20268781e3e56b7a007fd3e91e719775716e16a8 Author: Jacek Jendrzej Date: 2016-12-20 (Tue, 20 Dec 2016) --- lib/libtuxtxt/tuxtxt_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libtuxtxt/tuxtxt_common.h b/lib/libtuxtxt/tuxtxt_common.h index 6607b589e..7f95dbc41 100644 --- a/lib/libtuxtxt/tuxtxt_common.h +++ b/lib/libtuxtxt/tuxtxt_common.h @@ -309,7 +309,7 @@ void tuxtxt_decode_adip() /* additional information table */ #endif } /* next adip page i */ - while (!tuxtxt_cache.adippg[tuxtxt_cache.maxadippg] && (tuxtxt_cache.maxadippg >= 0)) /* and shrink table */ + while ((tuxtxt_cache.maxadippg >= 0) && !tuxtxt_cache.adippg[tuxtxt_cache.maxadippg]) /* and shrink table */ tuxtxt_cache.maxadippg--; } /****************************************************************************** From c9692070003a4dcfb0d1fafb8dea418fc08e002c Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 20 Dec 2016 22:03:43 +0100 Subject: [PATCH 07/38] src/gui/timerlist.cpp init changed Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c868ad53002f748bbb7725359f3de1f6dc17d489 Author: Jacek Jendrzej Date: 2016-12-20 (Tue, 20 Dec 2016) --- src/gui/timerlist.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 0de73459c..06ef816d8 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -281,6 +281,7 @@ CTimerList::CTimerList() timerNew_message = ""; timerNew_pluginName = ""; httpConnectTimeout = 3; + changed = false; /* most probable default */ saved_dispmode = (int)CVFD::MODE_TVRADIO; From 9dbb076f26146c98bcdcfee092aa910e0a84b206 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Wed, 21 Dec 2016 10:13:41 +0100 Subject: [PATCH 08/38] volumebar font reset after change (thx dboxoldie) to avoid segfault Signed-off-by: Thilo Graf picked from Duckbox-Developers/neutrino-mp-cst-next 4365761b2a47e12666154821c2ce982f74ef0627 needs supplements Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/1ea12764dae240b434d471ce8737b110cdcc244d Author: TangoCash Date: 2016-12-21 (Wed, 21 Dec 2016) --- src/gui/volumebar.cpp | 15 +++++++++++++++ src/gui/volumebar.h | 1 + 2 files changed, 16 insertions(+) diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index 52f4af4ed..22aaf6c3c 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -34,6 +34,7 @@ #include #include #include +#include using namespace std; @@ -260,9 +261,23 @@ CVolumeHelper::CVolumeHelper() frameBuffer = CFrameBuffer::getInstance(); + CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(sigc::mem_fun(this, &CVolumeHelper::resetFont)); + Init(); } +void CVolumeHelper::resetFont() +{ + if (vb_font){ + vb_font = NULL; + dprintf(DEBUG_INFO, "\033[33m[CVolumeHelper][%s - %d] reset vb font \033[0m\n", __func__, __LINE__); + } + if (clock_font){ + clock_font = NULL; + dprintf(DEBUG_INFO, "\033[33m[CVolumeHelper][%s - %d] reset clock font \033[0m\n", __func__, __LINE__); + } +} + void CVolumeHelper::Init(Font* font) { diff --git a/src/gui/volumebar.h b/src/gui/volumebar.h index 1f09a056b..62ce4d90c 100644 --- a/src/gui/volumebar.h +++ b/src/gui/volumebar.h @@ -108,6 +108,7 @@ class CVolumeHelper Font* clock_font; CFrameBuffer *frameBuffer; + void resetFont(); void Init(Font* font=NULL); void initVolBarSize(); void initMuteIcon(); From ffa2a927a299fecd70c3399096a910e5090cc612 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 21 Dec 2016 10:19:35 +0100 Subject: [PATCH 09/38] CVolumeHelper: remove unnecessary reinit of font Is already done in previous block. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/9839db97290b71c9d39f0032d341feb3d3199eaf Author: Thilo Graf Date: 2016-12-21 (Wed, 21 Dec 2016) --- src/gui/volumebar.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gui/volumebar.cpp b/src/gui/volumebar.cpp index 22aaf6c3c..acf528f1e 100644 --- a/src/gui/volumebar.cpp +++ b/src/gui/volumebar.cpp @@ -300,10 +300,7 @@ void CVolumeHelper::initInfoClock(Font* font) else clock_font = font; } - else { - if (font != NULL) - clock_font = font; - } + digit_offset = (clock_font)->getDigitOffset(); digit_h = (clock_font)->getDigitHeight(); int t1 = (clock_font)->getMaxDigitWidth(); From d2d84a70b163116926720d74815d166867f7b9c4 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 21 Dec 2016 11:08:47 +0100 Subject: [PATCH 10/38] CTextBox: More precise function description Note: In this context i noticed, it seems method getRenderWith() in Fontrender class returns wrong values with BOLD font types. It would be nice if anybody could verify this possible bug. If I see that correctly, we should fix this. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/f26103cd65493972079173e421b1c64e8d78f828 Author: Thilo Graf Date: 2016-12-21 (Wed, 21 Dec 2016) --- src/gui/widget/textbox.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/widget/textbox.h b/src/gui/widget/textbox.h index 5df0762a7..c38ea5ef1 100644 --- a/src/gui/widget/textbox.h +++ b/src/gui/widget/textbox.h @@ -222,7 +222,7 @@ class CTextBox : public sigc::trackable int getLines(){return(m_nNrOfLines);} /** - * Returns maximal width of passed text + * Returns width of largest line from passed text * @param[in] text * @li exepts type std::string * @param[in] font @@ -233,9 +233,10 @@ class CTextBox : public sigc::trackable static int getMaxLineWidth(const std::string& text, Font* font); /** - * Returns internal defined maximal line width of an existent CTextBox instance. + * Returns internal defined largest line width of an existant CTextBox instance. * @return width of largest line as int * @see static version getMaxLineWidth() + * setText(), parameter: max_width */ int getMaxLineWidth() {return(m_nMaxTextWidth);} From 9b76cf01e620dc15ba1c1992fb95f4a4af5a8356 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 22 Dec 2016 09:49:40 +0100 Subject: [PATCH 11/38] partial revert: "CTextBox: expand parameters of member setTextBorderWidth()" related commit: 43a759358d1cb82827f6c5a1dc6474f3342c1cfe Since this commit, TextBox received a lot of optimizations, so it is possible we have no described side effects. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/fad2adffa2c4465698d5b36afa1fd7c7faad5c2a Author: Thilo Graf Date: 2016-12-22 (Thu, 22 Dec 2016) --- src/gui/components/cc_item_text.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gui/components/cc_item_text.cpp b/src/gui/components/cc_item_text.cpp index bf52a4f33..f56733584 100644 --- a/src/gui/components/cc_item_text.cpp +++ b/src/gui/components/cc_item_text.cpp @@ -92,10 +92,7 @@ void CComponentsText::initVarText( const int x_pos, const int y_pos, const int w width = width_old = w; height = height_old = h; - /* we need a minimal borderwith of 1px because the edge-smoothing - (or fontrenderer?) otherwise will paint single pixels outside the - defined area. e.g. 'j' is leaving such residues */ - ct_text_Hborder = 1; + ct_text_Hborder = 0; ct_text_Vborder = 0; shadow = shadow_mode; From 02f613dbb7a7dca0e162671cac25673ce53842d2 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 22 Dec 2016 10:01:53 +0100 Subject: [PATCH 12/38] CHintBox: small cosmetics for initial positions This should have no effect, because calculation of position and dimensions is mostly dependency from message text. So this is only formality. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/b71499806562c503ebc7532e90304b3a8a9b4b11 Author: Thilo Graf Date: 2016-12-22 (Thu, 22 Dec 2016) --- src/gui/widget/hintbox.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 2439f57ed..45883cc22 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -65,7 +65,7 @@ CHintBox::CHintBox( const neutrino_locale_t Caption, const char * const Picon, const int& header_buttons, const int& text_mode, - const int& indent): CComponentsWindow( 1, 1, width, + const int& indent): CComponentsWindow( 0, 0, width, HINTBOX_MIN_HEIGHT, Caption, string(Icon == NULL ? "" : Icon), @@ -82,7 +82,7 @@ CHintBox::CHintBox( const char * const Caption, const char * const Picon, const int& header_buttons, const int& text_mode, - const int& indent):CComponentsWindow( 1, 1, width, + const int& indent):CComponentsWindow( 0, 0, width, HINTBOX_MIN_HEIGHT, Caption, string(Icon == NULL ? "" : Icon), @@ -99,7 +99,7 @@ CHintBox::CHintBox( const neutrino_locale_t Caption, const char * const Picon, const int& header_buttons, const int& text_mode, - const int& indent):CComponentsWindow( 1, 1, width, + const int& indent):CComponentsWindow( 0, 0, width, HINTBOX_MIN_HEIGHT, Caption, string(Icon == NULL ? "" : Icon), @@ -116,7 +116,7 @@ CHintBox::CHintBox( const char * const Caption, const char * const Picon, const int& header_buttons, const int& text_mode, - const int& indent):CComponentsWindow( 1, 1, width, + const int& indent):CComponentsWindow( 0, 0, width, HINTBOX_MIN_HEIGHT, Caption, string(Icon == NULL ? "" : Icon), From 89c74ec99eb7cc6917a067b8f958d177b3ce6bff Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 22 Dec 2016 23:09:07 +0100 Subject: [PATCH 13/38] src/gui/lua/lua_curl.cpp ACCEPT_ENCODING for gzip compressed data, need build libcurl with --with-zlib Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/7fee7784aefe4b596752ae647b79adf3cc092340 Author: Jacek Jendrzej Date: 2016-12-22 (Thu, 22 Dec 2016) --- src/gui/lua/lua_curl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/lua/lua_curl.cpp b/src/gui/lua/lua_curl.cpp index 389aad1f9..9bcf47ef5 100644 --- a/src/gui/lua/lua_curl.cpp +++ b/src/gui/lua/lua_curl.cpp @@ -265,6 +265,8 @@ Example: curl_easy_setopt(curl_handle, CURLOPT_CONNECTTIMEOUT, (long)connectTimeout); curl_easy_setopt(curl_handle, CURLOPT_NOSIGNAL, 1L); 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()) curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, userAgent.c_str()); From adac232005545512c2191b511d2bd6425bbba23b Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 22 Dec 2016 23:49:01 +0100 Subject: [PATCH 14/38] CMenuWidget: add menu name reinit Ensures correct display of menu name while runtime. For example: it's required on changed language settings, otherwise we have old language in menu head. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/114bba2ab7895644f5faadc8f3f034246060671b Author: Thilo Graf Date: 2016-12-22 (Thu, 22 Dec 2016) --- src/gui/widget/menue.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index 38aef6c58..4a990afb1 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -1248,6 +1248,7 @@ void CMenuWidget::paint() header->enableShadow(CC_SHADOW_RIGHT | CC_SHADOW_CORNER_TOP_RIGHT | CC_SHADOW_CORNER_BOTTOM_RIGHT); header->setOffset(10); } + header->setCaption(getName()); header->setColorAll(COL_FRAME_PLUS_0, COL_MENUHEAD_PLUS_0, COL_SHADOW_PLUS_0); header->setCaptionColor(COL_MENUHEAD_TEXT); header->enableColBodyGradient(g_settings.theme.menu_Head_gradient, COL_MENUCONTENT_PLUS_0); From 3ff0191b20cb57801ce85b0f7f6217792afe0a30 Mon Sep 17 00:00:00 2001 From: Marc Szymkowiak Date: Fri, 23 Dec 2016 14:12:46 +0100 Subject: [PATCH 15/38] fix link to developer forum Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/44177324624ef617fad8bf0fdeb45fa851218678 Author: Marc Szymkowiak Date: 2016-12-23 (Fri, 23 Dec 2016) --- data/y-web/Y_Info_Help.yhtm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/y-web/Y_Info_Help.yhtm b/data/y-web/Y_Info_Help.yhtm index 39f457636..d9cecd04d 100644 --- a/data/y-web/Y_Info_Help.yhtm +++ b/data/y-web/Y_Info_Help.yhtm @@ -10,7 +10,7 @@
  • Tuxbox-Wiki Help
  • Tuxbox Forum
  • CST User Forum
  • -
  • CST Developer Forum
  • +
  • CST Developer Forum
  • From d2860579e1d62d7b70e00794c332526cd8e2dbbe Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 23 Dec 2016 20:46:30 +0100 Subject: [PATCH 16/38] menue.cpp: CChangeObserver add overloaded changeNotify() with string param Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c92fa3f0f4721093cb9d0c1108e846f12fc9ddf7 Author: Thilo Graf Date: 2016-12-23 (Fri, 23 Dec 2016) --- src/gui/widget/menue.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/widget/menue.h b/src/gui/widget/menue.h index 5da3cc3f5..5cfa58da2 100644 --- a/src/gui/widget/menue.h +++ b/src/gui/widget/menue.h @@ -88,6 +88,10 @@ class CChangeObserver { 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*/) { return false; From a98daeccc6e08d859483ee3004e67666749e52e6 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 23 Dec 2016 20:51:39 +0100 Subject: [PATCH 17/38] megbox.cpp/h: add overloaded version of ShowMsg() with string/locale combination Constellation was missed. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/22a7006644530841aa2b28951883fe34b956c4f6 Author: Thilo Graf Date: 2016-12-23 (Fri, 23 Dec 2016) --- src/gui/widget/msgbox.cpp | 16 ++++++++++++++++ src/gui/widget/msgbox.h | 11 +++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/gui/widget/msgbox.cpp b/src/gui/widget/msgbox.cpp index 5f6e375e0..b5144fa97 100644 --- a/src/gui/widget/msgbox.cpp +++ b/src/gui/widget/msgbox.cpp @@ -528,6 +528,22 @@ int ShowMsg( const std::string & Title, 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) { ShowMsg(caption, ErrorMsg, CMsgBox::mbrCancel, CMsgBox::mbBack, NEUTRINO_ICON_ERROR, 500, NO_TIMEOUT, false, Text_mode, COL_RED); diff --git a/src/gui/widget/msgbox.h b/src/gui/widget/msgbox.h index 5325bd764..f20083296 100644 --- a/src/gui/widget/msgbox.h +++ b/src/gui/widget/msgbox.h @@ -392,6 +392,17 @@ int ShowMsg( const std::string & Title, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE, 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 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 From 40151669efae331a5f8d15e466df4be89342d4c5 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 23 Dec 2016 21:03:11 +0100 Subject: [PATCH 18/38] CStringInput: remove possible display of NONEXISTANT_LOCALE This should fix possible incorrect titles with content of NONEXISTANT_LOCALE with lua script handler Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/4e853d98c2b2b289f0dce1c7dc9fed53eb317ce1 Author: Thilo Graf Date: 2016-12-23 (Fri, 23 Dec 2016) --- src/gui/widget/stringinput.cpp | 16 +++++++--------- src/gui/widget/stringinput.h | 3 +-- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 8301a0a99..09e847322 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -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) { - name = Name; - head = g_Locale->getText(Name); + title = g_Locale->getText(Name); valueString = Value; lower_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) { - name = NONEXISTANT_LOCALE; - head = Name; + title = Name; valueString = Value; lower_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); - 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())) { @@ -497,7 +495,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) else if ( (msg==CRCInput::RC_home) || (msg==CRCInput::RC_timeout) ) { 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]); continue; } @@ -542,7 +540,7 @@ int CStringInput::exec( CMenuTarget* parent, const std::string & ) if ( (observ) && (msg==CRCInput::RC_ok) ) { - observ->changeNotify(name, (void *) valueString->c_str()); + observ->changeNotify(title, (void *) valueString->c_str()); } 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, 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); 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) ) { - observ->changeNotify(name, (void *) valueString->c_str()); + observ->changeNotify(title, (void *) valueString->c_str()); } return res; diff --git a/src/gui/widget/stringinput.h b/src/gui/widget/stringinput.h index d435a7f84..8b0f69b5c 100644 --- a/src/gui/widget/stringinput.h +++ b/src/gui/widget/stringinput.h @@ -53,8 +53,7 @@ class CStringInput : public CMenuTarget uint32_t smstimer; - std::string head; - neutrino_locale_t name; + std::string title; neutrino_locale_t hint_1, hint_2; std::string iconfile; const char * validchars; From fd223074fe7aa88b22f69a196fcb63195f432b06 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 23 Dec 2016 21:05:15 +0100 Subject: [PATCH 19/38] CKeyboardInput: remove possible display of NONEXISTANT_LOCALE This should fix possible incorrect titles with content of NONEXISTANT_LOCALE with lua script handler Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/3d6a0c381a1cebf88e48bfd477cf1cc0531fd5fb Author: Thilo Graf Date: 2016-12-23 (Fri, 23 Dec 2016) --- src/gui/widget/keyboard_input.cpp | 17 +++++++---------- src/gui/widget/keyboard_input.h | 3 +-- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/gui/widget/keyboard_input.cpp b/src/gui/widget/keyboard_input.cpp index 92b5efaeb..7e910d618 100644 --- a/src/gui/widget/keyboard_input.cpp +++ b/src/gui/widget/keyboard_input.cpp @@ -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) { - name = Name; - head = g_Locale->getText(Name); + title = g_Locale->getText(Name); valueString = Value; 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) { - name = NONEXISTANT_LOCALE; - head = Name; + title = Name; valueString = Value; 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) { - name = NONEXISTANT_LOCALE; - head = Name; + title = Name; valueString = Value; inputSize = Size; @@ -286,7 +283,7 @@ void CKeyboardInput::init() } 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())) { 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)) { 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]); continue; } @@ -675,7 +672,7 @@ int CKeyboardInput::exec(CMenuTarget* parent, const std::string &) inputString = NULL; if ((observ) && (msg == CRCInput::RC_red)) - observ->changeNotify(name, (void *) valueString->c_str()); + observ->changeNotify(title, (void *) valueString->c_str()); 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, 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); key_y = y+ hheight+ offset+ input_h+ offset; diff --git a/src/gui/widget/keyboard_input.h b/src/gui/widget/keyboard_input.h index 7af5c1c17..23a3b3601 100644 --- a/src/gui/widget/keyboard_input.h +++ b/src/gui/widget/keyboard_input.h @@ -92,8 +92,7 @@ class CKeyboardInput : public CMenuTarget std::string (*keyboard)[KEY_COLUMNS]; CInputString * inputString; - std::string head; - neutrino_locale_t name; + std::string title; neutrino_locale_t hint_1, hint_2; std::string hintText_1, hintText_2; std::string iconfile; From 78f106b53a7ba0e0db246c3cc78cf4cd3646b4ed Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 23 Dec 2016 23:40:24 +0100 Subject: [PATCH 20/38] NIyWeb: fix display of imageinfo ... and disable online check; needs several fixes Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/477c394f293fafb6f2afe42f558a31b6308ae082 Author: vanhofen Date: 2016-12-23 (Fri, 23 Dec 2016) Origin message was: ------------------ - NIyWeb: fix display of imageinfo ... and disable online check; needs several fixes --- data/y-web/Y_NI_About.yhtm | 18 +++++++++++------- data/y-web/scripts/Y_NI_Tools.sh | 11 ++++++----- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/data/y-web/Y_NI_About.yhtm b/data/y-web/Y_NI_About.yhtm index 7a592aa8f..4267b782e 100644 --- a/data/y-web/Y_NI_About.yhtm +++ b/data/y-web/Y_NI_About.yhtm @@ -69,7 +69,8 @@ jQuery(document).ready(function(){ Image:
    Version:
    - Commits:
    + Branch:
    + Commit:
    Datum:
    Ersteller:
    @@ -77,28 +78,31 @@ jQuery(document).ready(function(){ {=ini-get:/.version;imagename=}

    - NI: {=ini-get:/.version;origin-commit=}; - CST: {=ini-get:/.version;remote-commit=}
    + {=ini-get:/.version;branch=}
    + {=ini-get:/.version;commit=}

    {=ini-get:/.version;creator=}
    + diff --git a/data/y-web/scripts/Y_NI_Tools.sh b/data/y-web/scripts/Y_NI_Tools.sh index cde554ffb..35296e119 100644 --- a/data/y-web/scripts/Y_NI_Tools.sh +++ b/data/y-web/scripts/Y_NI_Tools.sh @@ -139,13 +139,14 @@ case "$action" in ;; get_update_txt) version="n/a" - wget -O /tmp/NI_release.txt "http://neutrino-images.de/neutrino-images/release/release.txt" - test -e /tmp/NI_release.txt && version=$(cat /tmp/NI_release.txt | grep ".img" | cut -d" " -f2) - echo "version=${version// /}" > /tmp/NI_update.txt - rm -f /tmp/NI_release.txt + #FIXME align url to box specs + wget -O /tmp/release.txt "http://neutrino-images.de/neutrino-images/update.php" + test -e /tmp/release.txt && version=$(cat /tmp/release.txt | grep ".img" | cut -d" " -f2) + echo "version=${version// /}" > /tmp/update.txt + rm -f /tmp/release.txt ;; rm_update_txt) - rm -f /tmp/NI_update.txt + rm -f /tmp/update.txt ;; get_flash_info) MTPT="" From 66c48cc1de204668c14cc4f273416acddd514b0f Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 23 Dec 2016 23:45:06 +0100 Subject: [PATCH 21/38] NI-yWeb: small whitespace cleanup Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/c9e5fa36afcbd725e02e347533cdbe7178abc154 Author: vanhofen Date: 2016-12-23 (Fri, 23 Dec 2016) Origin message was: ------------------ - NI-yWeb: small whitespace cleanup --- data/y-web/Y_NI_About.yhtm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/y-web/Y_NI_About.yhtm b/data/y-web/Y_NI_About.yhtm index 4267b782e..47730af46 100644 --- a/data/y-web/Y_NI_About.yhtm +++ b/data/y-web/Y_NI_About.yhtm @@ -22,7 +22,7 @@