From c363bd0864d4cf8075ccf16a196310fe6c356a18 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Wed, 21 Sep 2016 08:17:14 +0200 Subject: [PATCH 1/4] CLuaInstMessagebox::MessageboxExec: Fix 'show_buttons' handling Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/6f7ee35f241d85cc01c5d50208aedd1993060b0b Author: Michael Liebmann Date: 2016-09-21 (Wed, 21 Sep 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/lua/lua_messagebox.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/lua/lua_messagebox.cpp b/src/gui/lua/lua_messagebox.cpp index 3d5760525..303db0541 100644 --- a/src/gui/lua/lua_messagebox.cpp +++ b/src/gui/lua/lua_messagebox.cpp @@ -66,7 +66,7 @@ int CLuaInstMessagebox::MessageboxExec(lua_State *L) tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name); tableLookup(L, "text", text); tableLookup(L, "icon", icon); - lua_Integer timeout = -1, width = 450, return_default_on_timeout = 0, show_buttons = CMessageBox::mbAll, default_button = CMessageBox::mbrYes; + lua_Integer timeout = -1, width = 450, return_default_on_timeout = 0, show_buttons = 0, default_button = 0; tableLookup(L, "timeout", timeout); tableLookup(L, "width", width); tableLookup(L, "return_default_on_timeout", return_default_on_timeout); @@ -80,13 +80,13 @@ int CLuaInstMessagebox::MessageboxExec(lua_State *L) { "right", CMessageBox::mbBtnAlignRight }, { NULL, 0 } }; - show_buttons = 0; for (int i = 0; mb[i].name; i++) if (!strcmp(mb[i].name, tmp.c_str())) { show_buttons |= mb[i].code; break; } } + lua_pushstring(L, "buttons"); lua_gettable(L, -2); for (lua_pushnil(L); lua_next(L, -2); lua_pop(L, 2)) { @@ -108,6 +108,8 @@ int CLuaInstMessagebox::MessageboxExec(lua_State *L) } } lua_pop(L, 1); + if ((show_buttons & 0xFF) == 0) + show_buttons |= CMessageBox::mbAll; table_key mbr[] = { { "yes", CMessageBox::mbrYes }, @@ -118,7 +120,6 @@ int CLuaInstMessagebox::MessageboxExec(lua_State *L) { NULL, 0 } }; if (tableLookup(L, "default", tmp)) { - default_button = 0; for (int i = 0; mbr[i].name; i++) if (!strcmp(mbr[i].name, tmp.c_str())) { default_button = mbr[i].code; From df3ffab9b6f9f60ceab1b2fa15dd67403843db9d Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 21 Sep 2016 18:40:32 +0200 Subject: [PATCH 2/4] CSignalBox: add missing member to set frontend Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/0e2623fa542d0e8f036da61f8e672b7945796075 Author: Thilo Graf Date: 2016-09-21 (Wed, 21 Sep 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_signalbars.cpp | 5 ++--- src/gui/components/cc_frm_signalbars.h | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index ed43f3ade..edc7804c2 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -339,10 +339,9 @@ void CSignalBox::paintScale() void CSignalBox::paint(bool do_save_bg) { //paint frame and body - if (!is_painted){ - initSignalItems(); + initSignalItems(); + if (!is_painted) paintForm(do_save_bg); - } //paint current signal value paintScale(); diff --git a/src/gui/components/cc_frm_signalbars.h b/src/gui/components/cc_frm_signalbars.h index be9ade31c..c27b69962 100644 --- a/src/gui/components/cc_frm_signalbars.h +++ b/src/gui/components/cc_frm_signalbars.h @@ -296,7 +296,10 @@ class CSignalBox : public CComponentsForm, public CCTextScreen ///returns the signal object, type = CSignalBar* CSignalBar* getScaleObject(){return sbar;}; ///returns the signal noise ratio object, type = CSignalNoiseRatioBar* - CSignalNoiseRatioBar* getLabelObject(){return snrbar;}; + CSignalNoiseRatioBar* getLabelObject(){return snrbar;} + + ///assigns the current used frontend, simplified a tuner object, see frontend_c.h + void setFrontEnd(CFrontend *frontend_ref){sbx_frontend = frontend_ref;} ///sets the caption color of signalbars, see also property 'sbx_caption_color' void setTextColor(const fb_pixel_t& caption_color){ sbx_caption_color = caption_color;}; From 224c7a0545b9637c438e2bb117c665fd45c47acf Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 21 Sep 2016 18:47:20 +0200 Subject: [PATCH 3/4] CInfoViewer: try to fix show current frontend before paint signallbars In some constellations it is possible that the wrong fe is assigned, so it's ensured we have the current fe assigned. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/4ff40432ccb935a4de33fe7ea0b6163066a78b05 Author: Thilo Graf Date: 2016-09-21 (Wed, 21 Sep 2016) ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index e4a3799e3..eca6d3c89 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1744,7 +1744,8 @@ void CInfoViewer::showSNR () sigbox->setColorBody(numbox->getColorBody()); sigbox->doPaintBg(false); sigbox->enableTboxSaveScreen(numbox->getColBodyGradientMode()); - } + }else + sigbox->setFrontEnd(CFEManager::getInstance()->getLiveFE()); sigbox->paint(CC_SAVE_SCREEN_NO); } if(showButtonBar) From 78acdd764d0c91f9e413bfe66773312cfbce7706 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 23 Sep 2016 19:15:59 +0200 Subject: [PATCH 4/4] imageinfo_ni: fix generic build Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/7fd056da176559e2a4d5ad075519262740651d25 Author: vanhofen Date: 2016-09-23 (Fri, 23 Sep 2016) Origin message was: ------------------ - imageinfo_ni: fix generic build ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/imageinfo_ni.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/imageinfo_ni.cpp b/src/gui/imageinfo_ni.cpp index f5769a66b..f6c6ccb55 100644 --- a/src/gui/imageinfo_ni.cpp +++ b/src/gui/imageinfo_ni.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include