From 7e62915fdff5f13ce5790467acaf4090ad0e470d Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 1 Jun 2016 15:41:08 +0200 Subject: [PATCH 1/4] src/gui/eventlist.cpp restore channel name after call search if not used Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/be2417068ee793e03807c5f2fdb07904aded4efc Author: Jacek Jendrzej Date: 2016-06-01 (Wed, 01 Jun 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/eventlist.cpp | 23 +++++++++++------------ src/gui/eventlist.h | 2 +- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 22246ca31..7956d7870 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -647,7 +647,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna oldIndex = -1; oldEventID = -1; bgRightBoxPaint = false; - in_search = findEvents(); + in_search = findEvents(channel_id, channelname); timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); } else if (msg == CRCInput::RC_sat || msg == CRCInput::RC_favorites || msg == CRCInput::RC_www) { @@ -1034,12 +1034,11 @@ int CEventListHandler::exec(CMenuTarget* parent, const std::string &/*actionkey* } /************************************************************************************************/ -bool CEventList::findEvents(void) +bool CEventList::findEvents(t_channel_id channel_id, std::string channelname) /************************************************************************************************/ { bool res = false; int event = 0; - t_channel_id channel_id = 0; if((m_search_keyword.empty() || m_search_keyword == m_search_autokeyword) && evtlist[selected].eventID != 0) { @@ -1130,14 +1129,11 @@ bool CEventList::findEvents(void) } if(evtlist.empty()) { - if ( evtlist.empty() ) - { - CChannelEvent evt; - //evt.description = m_search_keyword + ": " + g_Locale->getText(LOCALE_EPGVIEWER_NOTFOUND); - evt.description = g_Locale->getText(LOCALE_EPGVIEWER_NOTFOUND); - evt.eventID = 0; - evtlist.push_back(evt); - } + CChannelEvent evt; + //evt.description = m_search_keyword + ": " + g_Locale->getText(LOCALE_EPGVIEWER_NOTFOUND); + evt.description = g_Locale->getText(LOCALE_EPGVIEWER_NOTFOUND); + evt.eventID = 0; + evtlist.push_back(evt); } if (current_event == (unsigned int)-1) current_event = 0; @@ -1163,7 +1159,10 @@ bool CEventList::findEvents(void) } } - paintHead(0, search_head_name); + if(event) + paintHead(0, search_head_name); + else + paintHead(channel_id, channelname); paint(); showFunctionBar(true, channel_id); return(res); diff --git a/src/gui/eventlist.h b/src/gui/eventlist.h index 1dcdd6dac..25e9e656e 100644 --- a/src/gui/eventlist.h +++ b/src/gui/eventlist.h @@ -79,7 +79,7 @@ class CEventList : public CListHelpers event_id_t oldEventID; bool bgRightBoxPaint; - bool findEvents(void); + bool findEvents(t_channel_id channel_id, std::string channelname); // Eventfinder end CFrameBuffer *frameBuffer; From 9b3103420668df27bc2c7a013f4a7c7bb41902cf Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 2 Jun 2016 16:48:35 +0200 Subject: [PATCH 2/4] CComponentsChannelLogo: rework logic of inital statement in setChannel() This should fix missing logos on existant chnannellogo instances. For example, this was to see if user has opened eventlist and opens timerlist with button '0'. After closed timerlist logos were lost. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/69ab25e11166af0dcb222ce14077426f4ff0e198 Author: Thilo Graf Date: 2016-06-02 (Thu, 02 Jun 2016) ------------------ This commit was generated by Migit --- src/gui/components/cc_item_picture.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index be77e7a44..ba35b446b 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -399,17 +399,15 @@ void CComponentsChannelLogo::setAltLogo(const char* picture_name) void CComponentsChannelLogo::setChannel(const uint64_t& channelId, const std::string& channelName) { - if (channel_id) - if (channel_id == channelId) - return; - channel_id = channelId; - - if (!channel_name.empty()) - if (channel_name == channelName) - return; - need_init = true; + if (channelId || !channelName.empty()){ + if ((channel_id == channelId) && (channel_name == channelName)) + need_init = false; + } + + channel_id = channelId; channel_name = channelName; + int dummy; has_logo = g_PicViewer->GetLogoName(channel_id, channel_name, pic_name, &dummy, &dummy); From 47dff9395143460a22273f4f8f20204123d237c4 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 2 Jun 2016 20:13:38 +0200 Subject: [PATCH 3/4] CMovieBrowser: remove hide() from destructor hide() in constructor could make problems on created moviebrowser instances if gui functionality of moviebrowser is not required, eg if only members are used without gui. Gui parts could be unintended removed from screen. Note: hide() must be called explicit now. I didn't found any problems at the moment, but please report if you found problems, so we can fix it. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/137598d36834eb0ceb98f757a7b7c9e3896c4938 Author: Thilo Graf Date: 2016-06-02 (Thu, 02 Jun 2016) ------------------ This commit was generated by Migit --- src/gui/moviebrowser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/moviebrowser.cpp b/src/gui/moviebrowser.cpp index 71729f51e..ae4c5b550 100644 --- a/src/gui/moviebrowser.cpp +++ b/src/gui/moviebrowser.cpp @@ -351,7 +351,7 @@ CMovieBrowser::CMovieBrowser(): configfile ('\t') CMovieBrowser::~CMovieBrowser() { //TRACE("[mb] del\n"); - hide(); + m_dir.clear(); m_dirNames.clear(); From 75dc6e0027ed901a48ebe60e447f69fe52b4decf Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 2 Jun 2016 20:34:51 +0200 Subject: [PATCH 4/4] CSignalBar: use correct initial value This should fix wrong values if signal = 0. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/ff3f44d4d22187c59787a7b152c4e909250a70db Author: Thilo Graf Date: 2016-06-02 (Thu, 02 Jun 2016) ------------------ This commit was generated by Migit --- src/gui/components/cc_frm_signalbars.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/components/cc_frm_signalbars.cpp b/src/gui/components/cc_frm_signalbars.cpp index ccef5a4af..ed43f3ade 100644 --- a/src/gui/components/cc_frm_signalbars.cpp +++ b/src/gui/components/cc_frm_signalbars.cpp @@ -140,7 +140,7 @@ void CSignalBar::initSBarValue() //create value label object with basic properties if (sb_vlbl == NULL){ sb_vlbl = new CComponentsLabel(); - sb_vlbl->setText(REF_PERCENT_TXT, sb_val_mode, sb_font); + sb_vlbl->setText("0%", sb_val_mode, sb_font); } sb_vlbl->doPaintBg(false);