From 311c29efc41a29501b7e4032050259144bf2cbb5 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 8 Oct 2024 22:23:59 +0200 Subject: [PATCH] fix compile; cleanup EPG replacements Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/4c77ec8624adb13917607a4710d64d76d4d4047e Author: vanhofen Date: 2024-10-08 (Tue, 08 Oct 2024) Origin message was: ------------------ - fix compile; cleanup EPG replacements ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/eitd/SIevents.cpp | 1 - src/gui/channellist.cpp | 8 ++------ src/gui/epgplus.cpp | 1 - src/gui/epgview.cpp | 4 ---- src/gui/eventlist.cpp | 3 --- 5 files changed, 2 insertions(+), 15 deletions(-) diff --git a/src/eitd/SIevents.cpp b/src/eitd/SIevents.cpp index b58c00dcc..d4f994c32 100644 --- a/src/eitd/SIevents.cpp +++ b/src/eitd/SIevents.cpp @@ -517,7 +517,6 @@ void SIevent::setName(const std::string &lang, const std::string &name) void SIevent::setName(unsigned int lang, const std::string &name) { std::string tmp = name; - std::replace(tmp.begin(), tmp.end(), '\\n', ' '); std::replace(tmp.begin(), tmp.end(), '\n', ' '); std::replace(tmp.begin(), tmp.end(), '\t', ' '); diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 44296613e..3adaf9961 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -1699,11 +1699,11 @@ void CChannelList::paintDetails(int index) } if (!(text2.empty())) { - text2 = str_replace("\\n", " ", text2); while ( text2.find_first_of("[ -.+*#?=!$%&/]+") == 0 ) text2 = text2.substr( 1 ); text2 = text2.substr( 0, text2.find('\n') ); -#if 0 //FIXME: to discuss, eat too much cpu time if string long enough +#if 0 + // FIXME: to discuss, eat too much cpu time if string long enough int pos = 0; while ( ( pos != -1 ) && (g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->getRenderWidth(text2) > (full_width - 3*OFFSET_INNER_MID - noch_len) ) ) { pos = text2.find_last_of(" "); @@ -2767,10 +2767,6 @@ void CChannelList::processTextToArray(std::string text, int screening) // UTF-8 std::string aktLine = ""; std::string aktWord = ""; int aktWidth = 0; - - if(!text.empty()) - text = str_replace("\\n", "\n", text); - text += ' '; const char *text_= text.c_str(); diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index 41702c43d..5266cc12c 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -390,7 +390,6 @@ void EpgPlus::ChannelEventEntry::paint(bool pisSelected, bool toggleColor) std::string shortepg = shortEpgData.info1; if(!shortepg.empty()) { - shortepg = str_replace("\\n", " ", shortepg); shortepg = str_replace("\n", " ", shortepg); shortepg = str_replace("\t", " ", shortepg); } diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index b7dc121ff..e6477f9bd 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -191,10 +191,6 @@ void CEpgData::processTextToArray(std::string text, int screening, bool has_cove std::string aktLine = ""; std::string aktWord = ""; int aktWidth = 0; - - if(!text.empty()) - text = str_replace("\\n", "\n", text); - text += ' '; char* text_= (char*) text.c_str(); diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index e370cbdd9..0d8e156b0 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -880,9 +880,6 @@ void CEventList::paintDescription(int index) else infozone_text = g_Locale->getText(LOCALE_EPGLIST_NOEVENTS); - if(!infozone_text.empty()) - infozone_text = str_replace("\\n", "\n", infozone_text); - infozone->setText(infozone_text, CTextBox::TOP, g_Font[SNeutrinoSettings::FONT_TYPE_EVENTLIST_EVENT]); infozone->doPaintBg(false); infozone->doPaintTextBoxBg(true);