From 0553e502283ff4f63d58202170844af8822fb7d6 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 6 May 2017 22:25:40 +0200 Subject: [PATCH 1/5] CEpgData: remove unused vars Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/bbb04bfb20ede8fb1476d1f51304d4a27fb88c3d Author: Thilo Graf Date: 2017-05-06 (Sat, 06 May 2017) --- src/gui/epgview.cpp | 7 ------- src/gui/epgview.h | 2 -- 2 files changed, 9 deletions(-) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index ace7a977d..393bbb1ad 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -127,10 +127,6 @@ CEpgData::CEpgData() mp_movie_info = NULL; header = NULL; Bottombox = NULL; - lpic = NULL; - rpic = NULL; - lText = NULL; - rText = NULL; pb = NULL; font_title = NULL; } @@ -1515,9 +1511,6 @@ void CEpgData::ResetModules() } if (Bottombox){ delete Bottombox; Bottombox = NULL; - // bottom box items are destroyed but explicit reset of bottom box items here required - lpic = rpic = NULL; - lText = rText = NULL; } if (pb){ delete pb; pb = NULL; diff --git a/src/gui/epgview.h b/src/gui/epgview.h index d873b82de..617fff66f 100644 --- a/src/gui/epgview.h +++ b/src/gui/epgview.h @@ -52,8 +52,6 @@ class CEpgData CEPGData epgData; CComponentsHeader *header; CNaviBar *Bottombox; - CComponentsPictureScalable *lpic, *rpic; - CComponentsText *lText, *rText; CProgressBar *pb; Font *font_title; std::string epg_date; From 4853fffbf59afb405912533c2ace64a5aa171a77 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 6 May 2017 22:32:16 +0200 Subject: [PATCH 2/5] CChannelList: add missing compare for existant header object. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/86c18141dd9cdd33388898a96f4d454d6ae819ac Author: Thilo Graf Date: 2017-05-06 (Sat, 06 May 2017) --- src/gui/channellist.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 32d70dbd8..db257a86c 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2158,13 +2158,17 @@ void CChannelList::paintHead() CComponentsHeader* CChannelList::getHeaderObject() { - return header; + if (header) + return header; + return NULL; } void CChannelList::ResetModules() { - delete header; - header = NULL; + if (header){ + delete header; + header = NULL; + } if(dline){ delete dline; dline = NULL; From dceb593867dbfc6b7e5f07f50ce61373deb39521 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 6 May 2017 23:18:05 +0200 Subject: [PATCH 3/5] CChannelList: remove init of cc_minitv from constructor. Is not a member of CChannelList and already inititialized as static outside of constructor. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/d7f839dcc96d994532cceef91a9318e3d864e842 Author: Thilo Graf Date: 2017-05-06 (Sat, 06 May 2017) --- src/gui/channellist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index db257a86c..8b796cd91 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -122,7 +122,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl previous_channellist_additional = -1; eventFont = SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT; dline = NULL; - cc_minitv = NULL; + minitv_is_active = false; headerNew = true; bouquet = NULL; From 4fb21cadc2592cd700b24463b6a359edb9871407 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 7 May 2017 14:18:47 +0200 Subject: [PATCH 4/5] CChannelList: add connection to ResetModuls() Ensures re init after font changes. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/1359248f7218d72ede17d4971d10b896d2d182d1 Author: Thilo Graf Date: 2017-05-07 (Sun, 07 May 2017) --- src/gui/channellist.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 8b796cd91..5ab87058e 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -133,6 +133,7 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl paint_events_index = -2; CFrameBuffer::getInstance()->OnAfterSetPallette.connect(sigc::mem_fun(this, &CChannelList::ResetModules)); + CNeutrinoApp::getInstance()->OnAfterSetupFonts.connect(sigc::mem_fun(this, &CChannelList::ResetModules)); } CChannelList::~CChannelList() From d7b5cb3cafdf2b2179d91f66d006fcea4abe732a Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 7 May 2017 14:18:47 +0200 Subject: [PATCH 5/5] CChannelList: delete and reset minitv object inside unified scope Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/cf7a21032c3a43c4c89fac537ca14fec3fdfe5ac Author: Thilo Graf Date: 2017-05-07 (Sun, 07 May 2017) --- src/gui/channellist.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 5ab87058e..841d52990 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -949,9 +949,9 @@ void CChannelList::hide() paint_events(-2); // cancel paint_events thread if ((g_settings.channellist_additional == 2) || (previous_channellist_additional == 2)) // with miniTV { - if (cc_minitv) - delete cc_minitv; - cc_minitv = NULL; + if (cc_minitv){ + delete cc_minitv; cc_minitv = NULL; + } } if(header) header->kill();