From bbb04bfb20ede8fb1476d1f51304d4a27fb88c3d Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 6 May 2017 22:25:40 +0200 Subject: [PATCH 1/6] CEpgData: remove unused vars --- 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 86c18141dd9cdd33388898a96f4d454d6ae819ac Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 6 May 2017 22:32:16 +0200 Subject: [PATCH 2/6] CChannelList: add missing compare for existant header object. --- 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 d7f839dcc96d994532cceef91a9318e3d864e842 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 6 May 2017 23:18:05 +0200 Subject: [PATCH 3/6] CChannelList: remove init of cc_minitv from constructor. Is not a member of CChannelList and already inititialized as static outside of constructor. --- 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 1359248f7218d72ede17d4971d10b896d2d182d1 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 7 May 2017 14:18:47 +0200 Subject: [PATCH 4/6] CChannelList: add connection to ResetModuls() Ensures re init after font changes. --- 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 cf7a21032c3a43c4c89fac537ca14fec3fdfe5ac Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 7 May 2017 14:18:47 +0200 Subject: [PATCH 5/6] CChannelList: delete and reset minitv object inside unified scope --- 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(); From 66c109f8f987c14e0ad1547a54d5b7c9aa7cded3 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 7 May 2017 18:09:45 +0200 Subject: [PATCH 6/6] CChannelList: ensure disconnect signal/slot on delete of channellist ojects --- src/gui/channellist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/channellist.h b/src/gui/channellist.h index edde1bbda..40d2c74d1 100644 --- a/src/gui/channellist.h +++ b/src/gui/channellist.h @@ -67,7 +67,7 @@ enum { class CFrameBuffer; class CBouquet; -class CChannelList : public CListHelpers +class CChannelList : public CListHelpers, public sigc::trackable { private: enum state_