From 21896d808fab85dc1131fa5b78a7fee3ee1a7ecb Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 5 Sep 2024 21:34:45 +0200 Subject: [PATCH] =?UTF-8?q?fix=20epg=20newline=20for=C3=96R=20channels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b07bef983fef361c89a35ec462da077044ffa9e4 Author: Jacek Jendrzej Date: 2024-09-05 (Thu, 05 Sep 2024) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/channellist.cpp | 4 ++++ src/gui/epgview.cpp | 4 ++++ src/gui/eventlist.cpp | 3 +++ 3 files changed, 11 insertions(+) diff --git a/src/gui/channellist.cpp b/src/gui/channellist.cpp index 1ab16ddbe..b23eb8102 100644 --- a/src/gui/channellist.cpp +++ b/src/gui/channellist.cpp @@ -2766,6 +2766,10 @@ 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/epgview.cpp b/src/gui/epgview.cpp index e6477f9bd..b7dc121ff 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -191,6 +191,10 @@ 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 0d8e156b0..e370cbdd9 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -880,6 +880,9 @@ 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);