From 3f417116a585117f7da83af6302c2363e323ca06 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Wed, 17 May 2017 17:23:22 +0200 Subject: [PATCH 1/3] cables.xml: update Antennengemeinschaft "Goeltzschtalbruecke" Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/b7ef6e47fe0e9b909988b75a73636c55f104b94b Author: vanhofen Date: 2017-05-17 (Wed, 17 May 2017) Origin message was: ------------------ - cables.xml: update Antennengemeinschaft "Goeltzschtalbruecke" --- data/cables.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/cables.xml b/data/cables.xml index e05516a44..fa4baec60 100644 --- a/data/cables.xml +++ b/data/cables.xml @@ -534,7 +534,7 @@ - + From 44af471dd9ae0b8e1ba0900a56c9c5e61d56a34f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 17 May 2017 20:08:50 +0200 Subject: [PATCH 2/3] CHintBox: fix position in case of missing text Without text, position was not complete calculated. Only default position was used. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/e48cc87b6fa93c38783cfc791c8bff94fd6ecd8c Author: Thilo Graf Date: 2017-05-17 (Wed, 17 May 2017) --- src/gui/widget/hintbox.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/gui/widget/hintbox.cpp b/src/gui/widget/hintbox.cpp index 45ef2b6ed..47d0e474c 100644 --- a/src/gui/widget/hintbox.cpp +++ b/src/gui/widget/hintbox.cpp @@ -162,6 +162,8 @@ void CHintBox::init(const std::string& Text, const int& Width, const std::string if (!Text.empty()) addHintItem(Text, text_mode, Picon, COL_MENUCONTENT_TEXT, hb_font); + else + ReSize(); } CHintBox::~CHintBox() @@ -312,13 +314,8 @@ void CHintBox::addHintItem(const std::string& Text, const int& text_mode, const info_box->setPicture(Picon); info_box->doPaintBg(false); - /* recalculate new hintbox height */ + /* recalculate new hintbox dimensions and position*/ ReSize(); - - /* set hint box position general to center and refresh window */ - setCenterPos(CC_ALONG_X); - y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight() - height) >> 2), - Refresh(); } void CHintBox::setMsgText(const std::string& Text, const uint& hint_id, const int& mode, Font* font_text, const fb_pixel_t& color_text, const int& style) @@ -350,6 +347,10 @@ void CHintBox::ReSize() h += item->getHeight(); } height = min(HINTBOX_MAX_HEIGHT, max(HINTBOX_MIN_HEIGHT, max(height,h))); + + /* set hint box position general to center and refresh window */ + setCenterPos(CC_ALONG_X); + y = frameBuffer->getScreenY() + ((frameBuffer->getScreenHeight() - height) >> 2), Refresh(); } From da1903c11d1254f97fdab56756faecc25011d873 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 17 May 2017 22:15:15 +0200 Subject: [PATCH 3/3] src/gui/lua/lua_cc_text.cpp avoid segfault Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/ffe986f36ba3bee015f22cbb46c9628253ffb44f Author: Jacek Jendrzej Date: 2017-05-17 (Wed, 17 May 2017) --- src/gui/lua/lua_cc_text.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/lua/lua_cc_text.cpp b/src/gui/lua/lua_cc_text.cpp index 461164e1a..2cbaa45d3 100644 --- a/src/gui/lua/lua_cc_text.cpp +++ b/src/gui/lua/lua_cc_text.cpp @@ -208,10 +208,11 @@ int CLuaInstCCText::CCTextSetText(lua_State *L) std::string text = ""; lua_Integer mode = D->mode; lua_Integer font_text = D->font_text; - tableLookup(L, "text", text); - tableLookup(L, "mode", mode); - tableLookup(L, "font_text", font_text); - + if (lua_istable(L, -1)){ + tableLookup(L, "text", text); + tableLookup(L, "mode", mode); + tableLookup(L, "font_text", font_text); + } D->ct->setText(text, mode, g_Font[font_text]); return 0; }